summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-01 17:27:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-01 18:10:07 +0100
commit9cb6756ce16491e42c6e21bc74a5f7de5432510f (patch)
tree110406fbb11f6bce34448a0ad305f1697a736556 /src/sna/sna_composite.c
parentc6c6ae71bedce43ff6617179c015c303cbaee9ae (diff)
sna: Always create the clear Picture
As we unconditionally use it irrespective of whether we then call accelerated code paths or not. Fixes regression from commit dc18eaa585c36c8e5f5b4ec405a976a835fd2ac3 [2.20.10] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Aug 12 10:34:10 2012 +0100 sna: Make the failure to create render caches non-fatal in the event we need to start with a hung GPU. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index da3fd62e..566f042e 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -46,9 +46,6 @@ bool sna_composite_create(struct sna *sna)
xRenderColor color = { 0 };
int error;
- if (!can_render(sna))
- return true;
-
sna->clear = CreateSolidPicture(0, &color, &error);
return sna->clear != NULL;
}
@@ -562,7 +559,8 @@ sna_composite(CARD8 op,
if (op == PictOpClear) {
DBG(("%s: discarding source and mask for clear\n", __FUNCTION__));
mask = NULL;
- src = sna->clear;
+ if (sna->clear)
+ src = sna->clear;
}
if (mask && sna_composite_mask_is_opaque(mask)) {