summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-20 14:35:35 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-20 14:35:35 +0000
commit671658499bf432666a96b31ac96d2c66e2168c4c (patch)
tree54f45c821571eaf7e31559b2e309ecec6270d588 /src
parent55a933aa29434f23674c851f02dce0ce983a0730 (diff)
sna: Add some more DBG output around the clipping in sna_do_copy()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 40ae4c09..9378c676 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -5656,10 +5656,12 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
region, dx, dy,
bitplane, closure);
- DBG(("%s (boxes=%dx[(%d, %d), (%d, %d)...], src=+(%d, %d), alu=%d, src.size=%dx%d, dst.size=%dx%d)\n",
+ DBG(("%s (boxes=%dx[(%d, %d), (%d, %d)...], src=+(%d, %d), dst=+(%d, %d), alu=%d, src.size=%dx%d, dst.size=%dx%d)\n",
__FUNCTION__, n,
box[0].x1, box[0].y1, box[0].x2, box[0].y2,
- dx, dy, alu,
+ dx, dy,
+ get_drawable_dx(dst), get_drawable_dy(dst),
+ alu,
src_pixmap->drawable.width, src_pixmap->drawable.height,
dst_pixmap->drawable.width, dst_pixmap->drawable.height));
@@ -6247,15 +6249,23 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
region.extents.y2 = bound(dy, height);
region.data = NULL;
- DBG(("%s: dst extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+ DBG(("%s: dst extents (%d, %d), (%d, %d), dst clip extents (%d, %d), (%d, %d), dst size=%dx%d\n", __FUNCTION__,
region.extents.x1, region.extents.y1,
- region.extents.x2, region.extents.y2));
+ region.extents.x2, region.extents.y2,
+ gc->pCompositeClip->extents.x1, gc->pCompositeClip->extents.y1,
+ gc->pCompositeClip->extents.x2, gc->pCompositeClip->extents.y2,
+ dst->width, dst->height));
if (!box_intersect(&region.extents, &gc->pCompositeClip->extents)) {
DBG(("%s: dst clipped out\n", __FUNCTION__));
return NULL;
}
+ DBG(("%s: clipped dst extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+ region.extents.x1, region.extents.y1,
+ region.extents.x2, region.extents.y2));
+ assert_drawable_contains_box(dst, &region.extents);
+
region.extents.x1 = clamp(region.extents.x1, sx - dx);
region.extents.x2 = clamp(region.extents.x2, sx - dx);
region.extents.y1 = clamp(region.extents.y1, sy - dy);
@@ -6264,6 +6274,10 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
src_extents = region.extents;
expose = true;
+ DBG(("%s: unclipped src extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+ region.extents.x1, region.extents.y1,
+ region.extents.x2, region.extents.y2));
+
if (region.extents.x1 < src->x)
region.extents.x1 = src->x;
if (region.extents.y1 < src->y)