summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-22 11:21:43 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-22 11:23:02 +0000
commit86121a3af9a9fc9a2c76d7ac9f3ec17105d20d80 (patch)
tree05a803f6d4256a4bc72dbc0b26cbde1a3a73ad77 /src/sna
parenta6b48dd7f1eeb1a8e3841b8f3326c60b300ee9e9 (diff)
sna: Adjust the damage region for the composite offset
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_composite.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index e5031c0d..d2817762 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -487,9 +487,19 @@ sna_composite(CARD8 op,
get_drawable_dx(dst->pDrawable),
get_drawable_dy(dst->pDrawable)));
- if (op <= PictOpSrc)
+ if (op <= PictOpSrc) {
+ int16_t x, y;
+
+ get_drawable_deltas(dst->pDrawable, pixmap, &x, &y);
+ if (x|y)
+ pixman_region_translate(&region, x, y);
+
sna_damage_subtract(&priv->cpu_damage, &region);
+ if (x|y)
+ pixman_region_translate(&region, -x, -y);
+ }
+
memset(&tmp, 0, sizeof(tmp));
if (!sna->render.composite(sna,
op, src, mask, dst,