diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-03 23:13:24 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-04 00:18:47 +0000 |
commit | 8cb9b8d7d7a1eb62eb3b20e6a50d3f1c9bde40c1 (patch) | |
tree | f6e40da7b4192ba77a0964dc3513044675209624 /src/sna/sna_composite.c | |
parent | feb75c55d6105a9ecc5f5ec7830276d1654918b9 (diff) |
sna: Discard mask and source for PictOpClear
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.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c index 84b633d0..5732047d 100644 --- a/src/sna/sna_composite.c +++ b/src/sna/sna_composite.c @@ -43,6 +43,22 @@ #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; +} + +void sna_composite_close(struct sna *sna) +{ + FreePicture(clear, 0); +} + static inline bool region_is_singular(pixman_region16_t *region) { @@ -417,6 +433,12 @@ sna_composite(CARD8 op, return; } + if (op == PictOpClear) { + DBG(("%s: discarind sourceand mask for clear\n", __FUNCTION__)); + mask = NULL; + src = clear; + } + if (mask && sna_composite_mask_is_opaque(mask)) { DBG(("%s: removing opaque %smask\n", __FUNCTION__, |