[cairo] get-clip-svg-* test failures

Robert O'Callahan rocallahan at novell.com
Mon Oct 2 00:38:29 PDT 2006


I looked into the get-clip SVG failures. Turns out I wasn't testing SVG
or PDF because they were automatically disabled for lack of librsvg and
poppler. Oops, sorry.

get-clip follows a pattern someone suggested for tests that don't
actually create renderable results. It specifies a size of 0,0 and does
a cairo_surface_create_similar(CAIRO_CONTENT_COLOR, 100, 100) on draw's
cr's surface, and does its tests with this secondary surface. For PS and
PDF, the secondary surface is just an image surface so they don't really
get tested. For SVG, the secondary surface is a naked meta-surface so my
get_surface_type check doesn't match any public surface type, and my
test was defaulting to assuming that surfaces support clip rectangles.
Naturally that fails.

In fact, after changing the default to assume clip rectangles are not
supported, the test still fails because its handling of that situation
was completely broken. Patch attached that makes SVG pass.

I'm not sure what to do about cairo_surface_create_similar leading us
astray. Any suggestions?

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 1671 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061002/9c7f0b9a/patch.bin


More information about the cairo mailing list