[cairo-commit] cairo/src cairo-xlib-surface.c,1.102,1.103
Tim Rowley
commit at pdx.freedesktop.org
Thu Aug 4 15:53:33 PDT 2005
- Previous message: [cairo-commit] cairo ChangeLog,1.810,1.811
- Next message: [cairo-commit]
cairo/src cairo-font-subset.c, 1.3, 1.4 cairo-font.c,
1.60, 1.61 cairo-ft-font.c, 1.87, 1.88 cairo-glitz-surface.c,
1.54, 1.55 cairo-gstate.c, 1.153, 1.154 cairo-image-surface.c,
1.54, 1.55 cairo-meta-surface.c, 1.5, 1.6 cairo-pattern.c,
1.52, 1.53 cairo-pdf-surface.c, 1.54, 1.55 cairo-surface.c,
1.86, 1.87 cairo-xcb-surface.c, 1.44,
1.45 cairo-xlib-surface.c, 1.103, 1.104 cairo.c, 1.117,
1.118 cairo.h, 1.144, 1.145 cairoint.h, 1.177, 1.178
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: tor
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv15798/src
Modified Files:
cairo-xlib-surface.c
Log Message:
* src/cairo-xlib-surface.c ( _categorize_composite_operation):
Check for render bug involving repeated patterns with a general
transform matrix.
Index: cairo-xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-surface.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- cairo-xlib-surface.c 1 Aug 2005 20:33:47 -0000 1.102
+++ cairo-xlib-surface.c 4 Aug 2005 22:53:30 -0000 1.103
@@ -91,6 +91,14 @@
*
* We can't test for this because it depends on whether the
* picture is in video memory or not.
+ *
+ * We also use this variable as a guard against a second
+ * independent bug with transformed repeating pictures:
+ *
+ * http://lists.freedesktop.org/archives/cairo/2004-September/001839.html
+ *
+ * Both are fixed in xorg >= 6.9 and hopefully in > 6.8.2, so
+ * we can reuse the test for now.
*/
cairo_bool_t buggy_repeat;
@@ -878,11 +886,13 @@
return TRUE;
}
-/* There is a bug in most older X servers with compositing using a repeating
- * source pattern when the source is in off-screen video memory. When that
- * bug could be triggered, we need a fallback: in the common case where we have no
- * transformation and the source and destination have the same format/visual,
- * we can do the operation using the core protocol, otherwise, we need
+/* There is a bug in most older X servers with compositing using a
+ * untransformed repeating source pattern when the source is in off-screen
+ * video memory, and another with repeated transformed images using a
+ * general tranform matrix. When these bugs could be triggered, we need a
+ * fallback: in the common case where we have no transformation and the
+ * source and destination have the same format/visual, we can do the
+ * operation using the core protocol for the first bug, otherwise, we need
* a software fallback.
*
* We can also often optimize a compositing operation by calling XCopyArea
@@ -896,9 +906,11 @@
DO_UNSUPPORTED /* software fallback */
} composite_operation_t;
-/* Initial check for the bug; we need to recheck after we turn
- * patterns into surfaces, since that may introduce a repeating
- * pattern for gradient patterns.
+/* Initial check for the render bugs; we need to recheck for the
+ * offscreen-memory bug after we turn patterns into surfaces, since that
+ * may introduce a repeating pattern for gradient patterns. We don't need
+ * to check for the repeat+transform bug because gradient surfaces aren't
+ * transformed.
*
* All we do here is reject cases where we *know* are going to
* hit the bug and won't be able to use a core protocol fallback.
@@ -920,8 +932,10 @@
if (_cairo_matrix_is_integer_translation (&src_pattern->matrix, NULL, NULL) &&
src_pattern->extend == CAIRO_EXTEND_REPEAT)
{
- /* This is the case where we have a bug; reject some cases where a
- * core protocol fallback is impossible.
+ /* This is the case where we have the bug involving
+ * untransformed repeating source patterns with off-screen
+ * video memory; reject some cases where a core protocol
+ * fallback is impossible.
*/
if (have_mask ||
!(operator == CAIRO_OPERATOR_SOURCE || operator == CAIRO_OPERATOR_OVER))
@@ -942,6 +956,12 @@
return DO_UNSUPPORTED;
}
}
+
+ /* Check for the other bug involving repeat patterns with general
+ * transforms. */
+ if (!_cairo_matrix_is_integer_translation (&src_pattern->matrix, NULL, NULL) &&
+ src_pattern->extend == CAIRO_EXTEND_REPEAT)
+ return DO_UNSUPPORTED;
}
return DO_RENDER;
- Previous message: [cairo-commit] cairo ChangeLog,1.810,1.811
- Next message: [cairo-commit]
cairo/src cairo-font-subset.c, 1.3, 1.4 cairo-font.c,
1.60, 1.61 cairo-ft-font.c, 1.87, 1.88 cairo-glitz-surface.c,
1.54, 1.55 cairo-gstate.c, 1.153, 1.154 cairo-image-surface.c,
1.54, 1.55 cairo-meta-surface.c, 1.5, 1.6 cairo-pattern.c,
1.52, 1.53 cairo-pdf-surface.c, 1.54, 1.55 cairo-surface.c,
1.86, 1.87 cairo-xcb-surface.c, 1.44,
1.45 cairo-xlib-surface.c, 1.103, 1.104 cairo.c, 1.117,
1.118 cairo.h, 1.144, 1.145 cairoint.h, 1.177, 1.178
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list