diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-14 10:40:38 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-14 10:40:38 +0100 |
commit | 80567f61afe77a003e663b17c1fc6b6c3ed04042 (patch) | |
tree | 5f8674869f330d92e1b026ea9a4f0e128d3dc637 | |
parent | 067e9375809ea6cfa0c0b5e2159b359535c3b362 (diff) |
sna/trapezoids: Do not reduce SRC to a clear pixmap to unbounded
As we instruct the migration code to drop the clear when copying from
the GPU to the CPU, we then need to emit the zeros during the span
writing.
Fixes some occassional corruption behind complex clip masks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_trapezoids.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index c06c29dd..3bc32849 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -4176,12 +4176,10 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst, return true; if (priv->clear && priv->clear_color == 0xff) op = PictOpSrc; - if ((color >> 24) == 0) - return true; unbounded = true; break; case PictOpSrc: - unbounded = !(priv->clear && priv->clear_color == 0); + unbounded = true; break; default: DBG(("%s: fallback -- can not perform op [%d] in place\n", @@ -4270,7 +4268,7 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst, DBG(("%s: move-to-cpu\n", __FUNCTION__)); region.data = NULL; if (!sna_drawable_move_region_to_cpu(dst->pDrawable, ®ion, - op == PictOpSrc ? MOVE_WRITE : MOVE_WRITE | MOVE_READ)) + op == PictOpSrc ? MOVE_WRITE | MOVE_INPLACE_HINT : MOVE_WRITE | MOVE_READ)) return true; get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y); |