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/gen2_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/gen2_render.c')
-rw-r--r-- | src/sna/gen2_render.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index ef7b9854..0cb72074 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -1826,6 +1826,7 @@ gen2_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()\n", __FUNCTION__)); @@ -1841,7 +1842,7 @@ gen2_render_composite(struct sna *sna, src_x, src_y, dst_x, dst_y, width, height, - tmp, false)) + flags, tmp)) return true; if (gen2_composite_fallback(sna, src, mask, dst)) @@ -2053,7 +2054,7 @@ fallback: src_x, src_y, dst_x, dst_y, width, height, - tmp, true)); + flags | COMPOSITE_FALLBACK, tmp)); } fastcall static void |