diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-25 01:31:34 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-25 01:31:34 +0000 |
commit | 46252bc7bcc7e08e47d00cdc87d6c1ed93830fcc (patch) | |
tree | 0b6be345551506cb4662bd5bfefa527d5dda5335 | |
parent | ae6d3a311783d7e063de0347363331f14bd74d74 (diff) |
sna: Set the source clip for CopyArea fallback correctly
The source window is (src->x, src->y)x(src->width, src->height) in
pixmap space. However, we then need to use this to clip against the
desination region, and so we need to translate from the source
coordinate to the destination coordinate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index f86bb625..2d838689 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3629,8 +3629,8 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc, { RegionRec clip; - clip.extents.x1 = -(src_x - dst_x - dst->x + src->x); - clip.extents.y1 = -(src_y - dst_y - dst->y + src->y); + clip.extents.x1 = src->x - (src->x + src_x) + (dst->x + dst_x); + clip.extents.y1 = src->y - (src->y + src_y) + (dst->y + dst_y); clip.extents.x2 = clip.extents.x1 + src->width; clip.extents.y2 = clip.extents.y1 + src->height; clip.data = NULL; |