summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-02 18:11:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-02 18:11:56 +0000
commitf890fc25c6c2ca358323be5a0d636c3f2ab4b298 (patch)
tree10aeb2de7c2ec04dbf5f5ab6618de4b104073817 /src/sna/sna_composite.c
parent4f853acfeccb92885f154b03125d5716591a87bd (diff)
sna: And fix compilation for last commit
I skipped a GCC warning about the implicit function declaration, which of course results in a runtime silent death. Oops. 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.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 5b815964..55a496e6 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -740,15 +740,18 @@ sna_composite_rectangles(CARD8 op,
goto fallback;
}
+ priv = sna_pixmap(pixmap);
+ if (priv == NULL) {
+ DBG(("%s: fallback, not attached\n", __FUNCTION__));
+ goto fallback;
+ }
+
/* If we going to be overwriting any CPU damage with a subsequent
* operation, then we may as well delete it without moving it
* first to the GPU.
*/
- if (op <= PictOpSrc) {
- priv = sna_pixmap_attach(pixmap);
- if (priv)
- sna_damage_subtract(&priv->cpu_damage, &region);
- }
+ if (op <= PictOpSrc)
+ sna_damage_subtract(&priv->cpu_damage, &region);
priv = sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_WRITE);
if (priv == NULL) {