From: Chris Wilson Date: Wed, 13 Nov 2013 16:25:54 +0000 (+0000) Subject: sna/gen6+: Only substitute SRC for CLEAR if using the correct source X-Git-Tag: 2.99.907~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa5a5684ebada60a1b103624a9b49aa085a406c1;p=platform%2Fupstream%2Fxf86-video-intel.git 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 --- diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 8c57000..a2b4082 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2159,7 +2159,7 @@ gen6_render_composite(struct sna *sna, width, height, tmp); - if (op == PictOpClear) + if (op == PictOpClear && src == sna->clear) op = PictOpSrc; tmp->op = op; if (!gen6_composite_set_target(sna, tmp, dst, diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 82c785f..f940803 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2437,7 +2437,7 @@ gen7_render_composite(struct sna *sna, width, height, tmp); - if (op == PictOpClear) + if (op == PictOpClear && src == sna->clear) op = PictOpSrc; tmp->op = op; if (!gen7_composite_set_target(sna, tmp, dst, diff --git a/src/sna/sna_trapezoids_boxes.c b/src/sna/sna_trapezoids_boxes.c index 4b0346b..23a3b45 100644 --- a/src/sna/sna_trapezoids_boxes.c +++ b/src/sna/sna_trapezoids_boxes.c @@ -197,6 +197,9 @@ composite_aligned_boxes(struct sna *sna, goto done; } + if (op == PictOpClear && sna->clear) + src = sna->clear; + if (force_fallback || !sna->render.composite(sna, op, src, NULL, dst, src_x, src_y, diff --git a/src/sna/sna_trapezoids_mono.c b/src/sna/sna_trapezoids_mono.c index f7b9a1c..40d0381 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,