summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-surface-render.c
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2011-07-21 17:15:08 +0200
committerUli Schlachter <psychon@znc.in>2011-07-21 19:39:25 +0200
commitb60694cbc75f87a8dbc454bbbe2f663f3132d28d (patch)
treebd03179197b5b46bcd10e0027f7deb94030c7e94 /src/cairo-xcb-surface-render.c
parente2150185fc85a8b3c786b8a9ac5606c42f8af167 (diff)
xcb: Work around wrong extent computation in the X server
This is basically the same fix as e6c3efdd650a. However, this was lost in b132fae5e843 and thus had to be fixed again. Fixes: clip-fill-eo-unbounded clip-fill-nz-unbounded 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.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index b09d5323..4995be7a 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -2913,9 +2913,21 @@ _composite_polygon (cairo_xcb_surface_t *dst,
traps.antialias = antialias;
status = trim_extents_to_traps (extents, &traps.traps);
if (likely (status == CAIRO_STATUS_SUCCESS)) {
- status = _clip_and_composite (dst, op, source,
- _composite_traps, NULL, &traps,
- extents, need_unbounded_clip (extents));
+ unsigned int flags = 0;
+
+ /* For unbounded operations, the X11 server will estimate the
+ * affected rectangle and apply the operation to that. However,
+ * there are cases where this is an overestimate (e.g. the
+ * clip-fill-{eo,nz}-unbounded test).
+ *
+ * The clip will trim that overestimate to our expectations.
+ */
+ if (! extents->is_bounded)
+ flags |= FORCE_CLIP_REGION;
+
+ status = _clip_and_composite (dst, op, source, _composite_traps,
+ NULL, &traps, extents,
+ need_unbounded_clip (extents) | flags);
}
}