summaryrefslogtreecommitdiff
path: root/src/sna/gen5_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-23 17:30:29 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-23 17:38:27 +0000
commite916c922ce3913712cd8a9b76ab037840b7f07f1 (patch)
treebceb4d0e04a3d07aa2101a6f5b1d5cafde07c9ba /src/sna/gen5_render.c
parent59e769e1b1eede466482a950b242ce81c52b276b (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/gen5_render.c')
-rw-r--r--src/sna/gen5_render.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 8ec25877..23b0c147 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -1830,6 +1830,7 @@ gen5_render_composite(struct sna *sna,
int16_t msk_x, int16_t msk_y,
int16_t dst_x, int16_t dst_y,
int16_t width, int16_t height,
+ unsigned flags,
struct sna_composite_op *tmp)
{
DBG(("%s: %dx%d, current mode=%d\n", __FUNCTION__,
@@ -1846,7 +1847,7 @@ gen5_render_composite(struct sna *sna,
src_x, src_y,
dst_x, dst_y,
width, height,
- tmp, false))
+ flags, tmp))
return true;
if (gen5_composite_fallback(sna, src, mask, dst))
@@ -1991,7 +1992,7 @@ fallback:
src_x, src_y,
dst_x, dst_y,
width, height,
- tmp, true));
+ flags | COMPOSITE_FALLBACK, tmp));
}
#if !NO_COMPOSITE_SPANS