summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-surface-render.c
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2012-09-25 11:34:52 +0200
committerUli Schlachter <psychon@znc.in>2012-09-25 11:34:52 +0200
commitb264ae76bd2621363cbc1e2b5bcdc4b0583d4b1f (patch)
tree24750a859730446fd86566f3f617e06702f76b98 /src/cairo-xcb-surface-render.c
parent0ccbb83eb892aca51838aeb1da45070b385a6d88 (diff)
downloadcairo-b264ae76bd2621363cbc1e2b5bcdc4b0583d4b1f.tar.gz
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 <psychon@znc.in>
Diffstat (limited to 'src/cairo-xcb-surface-render.c')
-rw-r--r--src/cairo-xcb-surface-render.c3
1 files changed, 2 insertions, 1 deletions
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;