diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-20 17:37:41 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-20 17:58:55 +0100 |
commit | 1229bf6a690e7f315ab22957da23481f58515ff9 (patch) | |
tree | 361e8c5363092c5efe9466541aa3753084413893 /src/sna/sna_damage.h | |
parent | 3526d83e460ce6410f23f59d1315793ff9607253 (diff) |
sna: Actually apply the composite offset for the self-copy
I translated the region to copy by the composite pixmap offset, only
failed to use the translated region for the actual copy command (using
instead the original boxes). Fix that mistake by avoiding the temporary
region entirely and applying the translation inplace.
We also have to be careful in the case of copying between two composited
windows that have different offsets into the same screen pixmap.
This fixes the regression introduced with a3466c8b69af (sna/accel:
Implement a simpler path for CopyArea between the same pixmaps).
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.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sna/sna_damage.h b/src/sna/sna_damage.h index 5fb9aef0..454ad84a 100644 --- a/src/sna/sna_damage.h +++ b/src/sna/sna_damage.h @@ -34,6 +34,16 @@ static inline void sna_damage_add_box(struct sna_damage **damage, *damage = _sna_damage_add_box(*damage, box); } +struct sna_damage *_sna_damage_add_boxes(struct sna_damage *damage, + const BoxRec *box, int n, + int16_t dx, int16_t dy); +static inline void sna_damage_add_boxes(struct sna_damage **damage, + const BoxRec *box, int n, + int16_t dx, int16_t dy) +{ + *damage = _sna_damage_add_boxes(*damage, box, n, dx, dy); +} + struct sna_damage *_sna_damage_is_all(struct sna_damage *damage, int width, int height); static inline bool sna_damage_is_all(struct sna_damage **damage, |