summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-30 13:27:19 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-30 13:27:19 +0100
commit1d6a9d4a422b351440df3496d3d6cdefa82ce6c3 (patch)
treeb102549ca2f21916e9ce6672d630f2808c3b8982 /src/sna/sna_composite.c
parentb9bce2303e3e51d2a703154869bb36564aad7921 (diff)
sna: Only reduce Over to Src if the rects do not overlap
Similar to the previous commit, we have to allow overlapping OVER rectangles to be drawn one after another. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r--src/sna/sna_composite.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 668c244e..c6d6d2d3 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -838,7 +838,10 @@ sna_composite_rectangles(CARD8 op,
}
}
- if (op == PictOpOver && sna_drawable_is_clear(dst->pDrawable))
+ /* Avoid reducing overlapping translucent rectangles */
+ if (op == PictOpOver &&
+ num_rects == 1 &&
+ sna_drawable_is_clear(dst->pDrawable))
op = PictOpSrc;
DBG(("%s: converted to op %d\n", __FUNCTION__, op));