[cairo] [Patch] Surface cache
behdad at behdad.org
Mon Jan 29 13:10:23 PST 2007
On Mon, 2007-01-29 at 15:05 -0500, Carl Worth wrote:
> On Mon, 29 Jan 2007 18:56:49 +0200, Jorn Baayen wrote:
> > Attached patch adds a simple 16-entry static cache to
> > _cairo_pattern_acquire_surface_for_solid(). It still needs work,
> Excellent! Thanks for providing this first step. What work is still
> needed here? I know Behdad had expressed interest in doing this work,
> so maybe he'll want to pickup your work and run with it.
Excellent indeed. And look how short the patch is! The only things
that immediately come to my mind are:
- Needs locking around the cache. Then you can use a static cursor
too, for faster lookup (a cache of one there in itself).
- With just backend comparison, does this work with two different X
displays? Guess not.
- We have a faster random() implementation in cairo. Lets use that.
"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