[cairo] Lander Game

Behdad Esfahbod behdad at behdad.org
Mon Jan 8 17:23:12 PST 2007


On Mon, 2007-01-08 at 20:13 -0500, Travis Griggs wrote:
> 
> Maybe I'm missing what is being asked. But as said, you can "record"
> the result of the display list and reuse that. I did an Akamaru port
> to Smalltalk for a Cairo demo. It was flickery. I simply added a
> push_group; pop_group_to_source; paint sequence around the code and
> suddenly it was all nice and smooth. 

That kinda comes as a surprise to me.  My experience with push/pop_group
has been that it slowed my frame rate to a half (it was in cairo-dock I
believe).  All depends though.  In your case, probably the group was
using fast paths for opaque colors, then do a final blending, while
without the group you were getting slow blending for all ops.

Anyway, just to point out that the push/pop_group API doesn't do magics.
If you can render once and cache, do that.

> Seems you could use pop_group to grab it as a pattern, and then shove
> that as the source to your target. 
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list