[cairo] pattern with skew matrix broken with xlib backend

Owen Taylor otaylor at redhat.com
Mon Aug 1 15:33:01 PDT 2005


On Fri, 2005-07-29 at 16:23 -0500, Tim Rowley wrote:
> Patterns with general matrices don't render correctly with the xlib
> backend.  Attached is a testcase and a change for
> _categorize_composite_operation to cause this situation to use
> fallback code.


+       /* Many (most?) X servers have a broken RENDER with respect to
repeat
+        * mode and transforms.
+        */
+       if (!_cairo_matrix_is_integer_translation (&src_pattern->matrix,
NULL, NULL) &&
+           src_pattern->extend == CAIRO_EXTEND_REPEAT)
+           return DO_UNSUPPORTED;
     }
 
To be precise here, xorg-6.8.2 and older are broken for this. The 
fixes have been merged into the xserver tree, and *mostly* into the
Xorg tree. There is a remaining bit that didn't get merged that
I've filed at:
 
 https://bugs.freedesktop.org/show_bug.cgi?id=3949

This doesn't cause misrendering, just horrible inefficiency.

The information about exactly what the bug this second bug is
needs to go up in the comment in the cairo_xlib_surface structure.

Something like:

 * We also use this variable as a guard for a second independent
 * bug with transformed repeating pictures:
 *
 * http://lists.freedesktop.org/archives/cairo/2004-
September/001839.html
 * 
 * This bug was also fixed between xorg 6.8.2 and xorg 6.9 so
 * we can reuse the identical version test.

[ I wish I had a better URL for the problem ... there might be
one elsewhere in the Cairo lists ]

The comments above composite_operation_t also need to be fixed
to indicate that we are also selecting a workaround for this
second bug. Finally the comments around 
_categorize_composite_operation() and inside of it need to be fixed 
up because they talk about a single bug.

It probably also would be good to explain in a comment that while
the gradient code can introduce a repeating pattern, it will never
be a transformed repeating pattern so it can't trigger this bug,
and hence we don't need to check in _recategorize composite repeat.
(As opposed to the other case.)

The actual code of the patch looks fine.

Regards,
					Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050801/59d7e75f/attachment.pgp


More information about the cairo mailing list