summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids_mono.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-13 16:25:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-14 12:07:47 +0000
commitaa5a5684ebada60a1b103624a9b49aa085a406c1 (patch)
tree6a503c3a6f337ae3b4905e7ceee6889753bf56a5 /src/sna/sna_trapezoids_mono.c
parent97e684ab3c887c1992733d0031f0256e9692d452 (diff)
sna/gen6+: Only substitute SRC for CLEAR if using the correct source
If the source has not been verified to be clear, then using the SRC operator will paint the wrong color. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids_mono.c')
-rw-r--r--src/sna/sna_trapezoids_mono.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_trapezoids_mono.c b/src/sna/sna_trapezoids_mono.c
index f7b9a1c7..40d03819 100644
--- a/src/sna/sna_trapezoids_mono.c
+++ b/src/sna/sna_trapezoids_mono.c
@@ -803,6 +803,9 @@ mono_trapezoids_span_converter(struct sna *sna,
unbounded = (!sna_drawable_is_clear(dst->pDrawable) &&
!operator_is_bounded(op));
+ if (op == PictOpClear && mono.sna->clear)
+ src = mono.sna->clear;
+
mono.sna = sna;
if (!mono.sna->render.composite(mono.sna, op, src, NULL, dst,
src_x + mono.clip.extents.x1 - dst_x - dx,