summaryrefslogtreecommitdiff
path: root/src/sna/sna_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-11 15:40:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-11 15:43:06 +0100
commita90160dcecf0a3df21a04b4f467e660f69ddae54 (patch)
treeb86aa06f9603980567738cd253ad15ae0e17a22f /src/sna/sna_render.c
parentc9003c6d9602dba682e577ea7ce39990ea378db3 (diff)
sna: Update damage pointer after the implicit reduction
sna_damage_contains_box() routine implicitly reduces the damage before performing its check. This may alter and even destroy the damage entry, so pass in the handle so that it can be updated correctly. References: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r--src/sna/sna_render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index e58b6e1d..26289e78 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -346,7 +346,7 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
}
if (priv->gpu_bo) {
- switch (sna_damage_contains_box(priv->cpu_damage, box)) {
+ switch (sna_damage_contains_box(&priv->cpu_damage, box)) {
case PIXMAN_REGION_OUT:
DBG(("%s: has GPU bo and no damage to upload\n",
__FUNCTION__));
@@ -362,7 +362,7 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
__FUNCTION__));
return NULL;
}
- if (sna_damage_contains_box(priv->gpu_damage,
+ if (sna_damage_contains_box(&priv->gpu_damage,
box) != PIXMAN_REGION_OUT) {
DBG(("%s: box is damaged on the GPU\n",
__FUNCTION__));
@@ -440,7 +440,7 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box, bool blt)
if (priv->gpu_bo) {
if (priv->cpu_damage &&
- sna_damage_contains_box(priv->cpu_damage,
+ sna_damage_contains_box(&priv->cpu_damage,
box) != PIXMAN_REGION_OUT)
goto upload;