[cairo] cacheable image representation now on a branch

Jeff Muizelaar jeff at infidigm.net
Fri Dec 12 14:59:04 PST 2008


On Mon, Dec 01, 2008 at 09:37:02AM +0100, Paolo Bonzini wrote:
> Hi all,
> 
> I've implemented the cacheable representation idea and pushed it to
> http://www.inf.unisi.ch/~bonzini/webdav/cairo.git in branch "cache".
> 
> To recap, the idea is to replace Quartz image surfaces with a cache
> living in a "standard" image surface, which can be queried by backends.
>  This removes the need to explicitly create special surfaces such as the
> Quartz image surfaces, or to paint the surfaces onto other
> backend-specific surfaces just to avoid creating repeatedly a
> backend-specific representation.  To test the performance impact, I
> modified cairogears (the Glitz benchmark) to use image surfaces instead
> of Glitz surfaces for the .png files it loads.  The fps impact was -90%
> with non-cacheable surfaces, while no slowdown was measurable with
> cacheable surfaces.

I've just started looking at your code, but I agree this is an area
where cairo needs work.
> 
> The branch uses the idea in the Quartz and Glitz backends.  Other
> branches that would benefit are Xlib/XCB (to cache a shared memory copy
> of an image surface), or PDF (to automatically generate and cache PNG
> representations of the surface).
> 
> 
> The branch includes a few preparatory patches that clean up the code or
> add some side features.  These may be worth considering indpendent of
> the cacheable representation idea, so I placed them at the beginning of
> the branch; the cache implementation proper is done only in the last two
> patches.  In particular:
> 
> 1) I fixed the large-source failure for Quartz.

I don't if modifying the test is the best way to fix the problem.
Instead it probably makes sense to have api for querying the maximum
size of a surface à la glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize);

-Jeff


More information about the cairo mailing list