From b264ae76bd2621363cbc1e2b5bcdc4b0583d4b1f Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 25 Sep 2012 11:34:52 +0200 Subject: [PATCH] xcb: Check if traps are supported before using them This code tried to optimize the clip away by intersecting the boxes with the clip polygon. However, it also did so when the server didn't support traps. Fixes: clip-stroke-unbounded clip-fill-nz-unbounded clip-fill-eo-unbounded clip-fill clip-fill-rule a1-clip-fill-rule clip-group-shapes-circles clip-intersect clip-nesting clip-operator clip-push-group clip-polygons clip-shape clip-text clip-twice inverted-clip mask random-clip rotate-clip-image-surface-paint trap-clip unantialiased-shapes Signed-off-by: Uli Schlachter --- src/cairo-xcb-surface-render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c index 6f86a4f8e..09a0236a8 100644 --- a/src/cairo-xcb-surface-render.c +++ b/src/cairo-xcb-surface-render.c @@ -3106,7 +3106,8 @@ _clip_and_composite_boxes (cairo_xcb_surface_t *dst, } /* Can we reduce drawing through a clip-mask to simply drawing the clip? */ - if (extents->clip->path != NULL && extents->is_bounded) { + if (dst->connection->flags & CAIRO_XCB_RENDER_HAS_COMPOSITE_TRAPEZOIDS && + extents->clip->path != NULL && extents->is_bounded) { cairo_polygon_t polygon; cairo_fill_rule_t fill_rule; cairo_antialias_t antialias;