diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-24 19:45:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-24 19:45:31 +0100 |
commit | f5d602cb59ad8eec19dc07043635a50eb7616e09 (patch) | |
tree | 7cc25970fba84945c7bfbdb3ced47071679695dc /src/cairo-xcb-surface-render.c | |
parent | 8dc9139fb291605f93ce8409aa203c87d3a5d035 (diff) |
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@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-xcb-surface-render.c')
-rw-r--r-- | src/cairo-xcb-surface-render.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c index a9d000b0..f0f35649 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 { |