diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-22 11:21:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-22 11:23:02 +0000 |
commit | 86121a3af9a9fc9a2c76d7ac9f3ec17105d20d80 (patch) | |
tree | 05a803f6d4256a4bc72dbc0b26cbde1a3a73ad77 /src/sna | |
parent | a6b48dd7f1eeb1a8e3841b8f3326c60b300ee9e9 (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.c | 12 |
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(®ion, x, y); + sna_damage_subtract(&priv->cpu_damage, ®ion); + if (x|y) + pixman_region_translate(®ion, -x, -y); + } + memset(&tmp, 0, sizeof(tmp)); if (!sna->render.composite(sna, op, src, mask, dst, |