[cairo-commit] src/cairo-xcb-surface-render.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Jul 24 11:46:38 PDT 2011
src/cairo-xcb-surface-render.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
New commits:
commit f5d602cb59ad8eec19dc07043635a50eb7616e09
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Jul 24 19:45:31 2011 +0100
xcb: Make composite_opacity_boxes slightly less silly
Being called with no clip, might be unexpected, but it means to fill the
whole extents with the opacity. So do so.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index a9d000b..f0f3564 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -3322,7 +3322,10 @@ _composite_opacity_boxes (void *closure,
op = CAIRO_OPERATOR_SOURCE;
}
- if (op == CAIRO_OPERATOR_SOURCE && clip == NULL)
+ if (op == CAIRO_OPERATOR_SOURCE &&
+ (clip == NULL ||
+ (clip->extents.width >= extents->width &&
+ clip->extents.height >= extents->height)))
dst->deferred_clear = FALSE;
if (dst->deferred_clear) {
@@ -3348,6 +3351,13 @@ _composite_opacity_boxes (void *closure,
for (i = 0; i < clip->num_boxes; i++)
do_unaligned_box(composite_opacity, &info,
&clip->boxes[i], dst_x, dst_y);
+ } else {
+ composite_opacity(&info,
+ extents->x - dst_x,
+ extents->y - dst_y,
+ extents->width,
+ extents->height,
+ 0xffff);
}
cairo_surface_destroy (&info.src->base);
@@ -3438,7 +3448,8 @@ _cairo_xcb_surface_render_mask (cairo_xcb_surface_t *surface,
extents.clip->path == NULL &&
! _cairo_clip_is_region (extents.clip)) {
status = _clip_and_composite (surface, op, source,
- _composite_opacity_boxes, NULL,
+ _composite_opacity_boxes,
+ _composite_opacity_boxes,
(void *) mask,
&extents, need_unbounded_clip (&extents));
} else {
More information about the cairo-commit
mailing list