diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-23 17:30:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-23 17:38:27 +0000 |
commit | e916c922ce3913712cd8a9b76ab037840b7f07f1 (patch) | |
tree | bceb4d0e04a3d07aa2101a6f5b1d5cafde07c9ba /src/sna/sna_render.c | |
parent | 59e769e1b1eede466482a950b242ce81c52b276b (diff) |
sna: Avoid erroneous discarding operations for partial composites
Composite operations were presumed to cover their entire width x height
area. However, a few paths submit boxes that do not cover the clip
region and so the optimisation made during prepare to discard completely
overwritten data is incorrect (and leads to corruption - stale data is
seen which the client expected to have been overdrawn). So along these
more unusual paths, we must add a flag to prevent the overzealous
discard. Notably, xfce4 triggers this as it uses a lot of unantialiased
trapezoids in its theme drawing.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69528
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r-- | src/sna/sna_render.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index c183b285..7acca365 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -93,6 +93,7 @@ no_render_composite(struct sna *sna, int16_t mask_x, int16_t mask_y, int16_t dst_x, int16_t dst_y, int16_t width, int16_t height, + unsigned flags, struct sna_composite_op *tmp) { DBG(("%s (op=%d, mask? %d)\n", __FUNCTION__, op, mask != NULL)); @@ -109,7 +110,7 @@ no_render_composite(struct sna *sna, src_x, src_y, dst_x, dst_y, width, height, - tmp, true); + flags | COMPOSITE_FALLBACK, tmp); (void)mask_x; (void)mask_y; } @@ -849,7 +850,7 @@ fixup: 0, 0, b.x1, b.y1, b.x2 - b.x1, b.y2 - b.y1, - &op)) + 0, &op)) goto cleanup_src; op.box(sna, &op, &b); |