summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-04 20:07:49 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-04 20:07:49 +0000
commitb899a4b69696141ca8b897a7abf52649b09f7b3b (patch)
treed797815eeaf7760906b2a241d774e81014c0e1b4 /src/sna/sna_composite.c
parentc107b90a44abb45c837ff8924939872be5b490eb (diff)
sna: Always pass the clear colour for PictOpClear
Having made that optimisation for Composite, and then made the assumption that it is always true in the backends, we failed to clear the unbounded area outside of a trapezoid since we passed in the original colour and the operation was optimised as a continuation. 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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 8eb0c942..5b815964 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -43,20 +43,18 @@
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
-static PicturePtr clear;
-
Bool sna_composite_create(struct sna *sna)
{
xRenderColor color ={ 0 };
int error;
- clear = CreateSolidPicture(0, &color, &error);
- return clear != NULL;
+ sna->clear = CreateSolidPicture(0, &color, &error);
+ return sna->clear != NULL;
}
void sna_composite_close(struct sna *sna)
{
- FreePicture(clear, 0);
+ FreePicture(sna->clear, 0);
}
static inline bool
@@ -436,7 +434,7 @@ sna_composite(CARD8 op,
if (op == PictOpClear) {
DBG(("%s: discarding source and mask for clear\n", __FUNCTION__));
mask = NULL;
- src = clear;
+ src = sna->clear;
}
if (mask && sna_composite_mask_is_opaque(mask)) {