summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-15 12:38:22 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-15 12:39:43 +0000
commitc5c61ef378cad3c8259631138ea1e03eb02036af (patch)
tree12e7cd988399b7e172324ed1ea418b6a8e464da0
parentfba49e1bb8e5b6b0e3ceace2dbddb5796ece954e (diff)
sna/traps: dst IN WHITE does not reduce to SRC!
I was getting too carried with my reductions. However, IN over a clear surface is a no-op, though unlikely! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_trapezoids.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index e73805df..907ece08 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -4071,7 +4071,6 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst,
struct sna_pixmap *priv;
RegionRec region;
uint32_t color;
- bool unbounded;
int16_t dst_x, dst_y;
int dx, dy;
int n;
@@ -4120,17 +4119,14 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst,
return false;
}
- unbounded = false;
switch (op) {
- case PictOpIn:
- unbounded = true;
- if (priv->clear && priv->clear_color == 0xff)
- op = PictOpSrc;
- break;
case PictOpAdd:
if (priv->clear && priv->clear_color == 0)
op = PictOpSrc;
break;
+ case PictOpIn:
+ if (priv->clear && priv->clear_color == 0)
+ return true;
case PictOpSrc:
break;
default:
@@ -4251,7 +4247,7 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst,
inplace.opacity = color >> 24;
tor_render(NULL, &tor, (void*)&inplace,
- dst->pCompositeClip, span, unbounded);
+ dst->pCompositeClip, span, op == PictOpIn);
tor_fini(&tor);