summaryrefslogtreecommitdiff
path: root/test/self-copy.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2005-05-26 11:35:44 +0000
committerKeith Packard <keithp@keithp.com>2005-05-26 11:35:44 +0000
commit45a966f69528c86dd6e3d4736805803b80de9f9b (patch)
treeaab7935e6367421d168dfda9bee057e6c2fca238 /test/self-copy.c
parentbe903f4c2232bfa8b48c1dca60ad5cf65f403c77 (diff)
downloadcairo-45a966f69528c86dd6e3d4736805803b80de9f9b.tar.gz
Replace nesting-only surface clipping with gstate contained serial-number tracked clipping sets that are loaded into the surface on demand just before each rendering operation. This permits multiple cairo_t contexts to reference a surface without regard to ordering of operations among the contexts.
Also in this patch is a change to the xlib surface that creates two separate Pictures, one for source and one for destination operands which separates the source clipping from destination clipping. Cairo now specifies that sources are never clipped by any clipping applied to them as destinations. Move cairo_clip_t (renamed from cairo_clip_rec_t) from cairoint.h to cairo-gstate-private.h. Eliminate stack of clip state from surfaces. Add new surface clipping API. Manage clip objects entirely within the gstate, loading the whole thing into the surface just before drawing. Source surfaces need not have clipping modified as the surface interface now specifies that source surfaces are always unclipped. Eliminate nested clipping contexts, leaving clip management entirely to the gstate. Create new clip API for the gstate which uses per-surface serial numbers to match gstate clipping against current surface clipping values. Surfaces no longer track clipping regions at all, so the old _cairo_surface_get_clip_extents has been replaced with _cairo_surface_get_extents. For PDF/PS surfaces, this function is expected to return a rectangle covering the entire fixed point coordinate space to leave rendering unclipped by the surface. Region clipping capability is now signalled by a non-NULL function pointer in set_clip_region. Each surface now contains two Pictures, one for source and one for destination operands so that source operands are never clipped by destination clipping. CAIRO_STATUS_BAD_NESTING removed self-copy now passes (Xlib only, until libpixman changes land) reviewed by: krh, otaylor, cworth
Diffstat (limited to 'test/self-copy.c')
-rw-r--r--test/self-copy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/self-copy.c b/test/self-copy.c
index 3ad406ecc..5f4398b25 100644
--- a/test/self-copy.c
+++ b/test/self-copy.c
@@ -85,6 +85,5 @@ draw (cairo_t *cr, int width, int height)
int
main (void)
{
- return cairo_test_expect_failure (&test, draw,
- "copying from a surface to itself doesn't handle clipping properly");
+ return cairo_test (&test, draw);
}