[cairo] glitz surface fixes

David Reveman davidr at novell.com
Fri Dec 23 06:15:15 PST 2005


On Fri, 2005-12-23 at 13:44 +0100, Vladimir Vukicevic wrote:
> The attached patch fixes the cairo glitz surface; the culprit seemed
> to be that glitz (now?) applies the clip region when glitz_get_pixels
> is called; this is not what acquire_*_image expects, and so bad
> results happen in both writing a png out from a glitz surface, and any
> fallback paths that have to be taken that require pixman compositing.
> 
> There's also a patch to the image surface, which attempts to find a
> standard pixman format given a set of masks.  This is necessary so
> that the generic cairo_surface_write_to_png() will work with glitz
> surfaces; glitz surfaces use _cairo_image_surface_create_with_masks()
> to create an image surface, and the png code would bail because it
> didn't recognize the cairo_format_t.
> 
> All tests pass except for two -- there's a problem with unbounded
> operators and glyph rendering, and self-copy also fails.  (The
> unantialiased rendering tests also fail; I think the fix there is to
> just use a fallback path if non-AA rendering is desired.)  A number of
> tests pass but are marked as fails; there are a lot of different
> pixels (especially in rendered gradients), but the results are
> actually correct.  Not sure what to do about this in the test
> framework; there may be a need for per-backend reference images.
> 
> David, Carl, is it ok to commit this if it looks correct?

looks ok, you can commit it.

btw, I haven't had time to look at the glitz test suite yet but I think
you mentioned that you added pbuffer surface support, right? It'd like
to test normal offscreen drawables (FBO drawables) as well. pbuffers
will probably be supported by glitz for some time but eventually they'll
be phased out in favor of FBOs. Feel free to add support for this or
I'll add it as soon as I have time to look at the test suite.

Thanks,

-David



More information about the cairo mailing list