Author: tack
Date: Tue Nov 28 21:37:47 2006
New Revision: 2106

Modified:
   trunk/canvas/src/displays/buffer.py

Log:
Don't unpremul a region if evas didn't render in that region; also speeds
it up a bit.


Modified: trunk/canvas/src/displays/buffer.py
==============================================================================
--- trunk/canvas/src/displays/buffer.py (original)
+++ trunk/canvas/src/displays/buffer.py Tue Nov 28 21:37:47 2006
@@ -54,14 +54,10 @@
 
     def _render(self):
         regions = super(BufferCanvas, self)._render()
-        w, h = self['size']
-        stride = w * 4
-        y0 = h
-        y1 = 0
-        for (rx, ry, rw, rh) in regions:
-            y0 = min(y0, ry)
-            y1 = max(y1, rh + ry)
-        evas.data_argb_unpremul(self.get_buffer(), stride*y0, stride*(y1-y0))
+        stride = self['size'][0] * 4
+        buf = self.get_buffer()
+        for x, y, w, h in regions:
+            for i in range(y, y+h):
+                evas.data_argb_unpremul(buf, i*stride+(x*4), w*4)
         return regions
 
-

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to