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>
This commit is contained in:
parent
ae6d3a3117
commit
46252bc7bc
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue