summaryrefslogtreecommitdiff
path: root/src/sna/sna_damage.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-07-04 11:02:39 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-07-04 11:25:28 +0100
commit64bcb91f58fba3956f2c66fa37707b9e496da936 (patch)
tree14574fbf608ce24de0973a8a77abdd69d8212555 /src/sna/sna_damage.h
parent821ef20b27f84cc26aec266b0f616a7f39ba9e3d (diff)
sna: Utilise existing cached upload for promoting to GPU bo
If we already have a buffer that represents the data on the GPU, we can simply use that when we need to promote the pixmap onto the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_damage.h')
-rw-r--r--src/sna/sna_damage.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sna/sna_damage.h b/src/sna/sna_damage.h
index 28f7ee60..a55f8598 100644
--- a/src/sna/sna_damage.h
+++ b/src/sna/sna_damage.h
@@ -25,6 +25,7 @@ struct sna_damage {
#define DAMAGE_IS_ALL(ptr) (((uintptr_t)(ptr))&1)
#define DAMAGE_MARK_ALL(ptr) ((struct sna_damage *)(((uintptr_t)(ptr))|1))
#define DAMAGE_PTR(ptr) ((struct sna_damage *)(((uintptr_t)(ptr))&~1))
+#define DAMAGE_REGION(ptr) (&DAMAGE_PTR(ptr)->region)
struct sna_damage *sna_damage_create(void);