diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-05 15:30:30 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-05 15:30:30 +0000 |
commit | 79d2f96bdfa0d7ae1567bf4b57b4f86aae424f50 (patch) | |
tree | f736dd0c51c309836552de360527186358615c5e | |
parent | 02eceefa2909075aca0ba3df7fdba835079aeb78 (diff) |
sna: Add some DBG around tiled blts
References: https://bugs.freedesktop.org/show_bug.cgi?id=74550
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 758bf887..e57cb17f 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -11955,8 +11955,9 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable, int tile_width, tile_height; int16_t dx, dy; - DBG(("%s x %d [(%d, %d)x(%d, %d)...]\n", - __FUNCTION__, n, rect->x, rect->y, rect->width, rect->height)); + DBG(("%s x %d [(%d, %d)x(%d, %d)...], clipped? %d\n", + __FUNCTION__, n, rect->x, rect->y, rect->width, rect->height, + clipped)); tile_width = tile->drawable.width; tile_height = tile->drawable.height; @@ -12014,6 +12015,7 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable, } get_drawable_deltas(drawable, pixmap, &dx, &dy); + DBG(("%s: drawable offset into pixmap = (%d, %d)\n", __FUNCTION__, dx, dy)); if (!clipped) { dx += drawable->x; dy += drawable->y; @@ -12070,6 +12072,8 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable, if (clip.data == NULL) { const BoxRec *box = &clip.extents; + DBG(("%s: single clip box [(%d, %d), (%d, %d)]", + __FUNCTION__, box->x1, box->y1, box->x2, box->y2)); while (n--) { BoxRec r; @@ -12079,6 +12083,13 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable, r.y2 = bound(r.y1, rect->height); rect++; + DBG(("%s: rectangle [(%d, %d), (%d, %d)]\n", + __FUNCTION__, r.x1, r.y1, r.x2, r.y2)); + assert(r.x1 + dx >= 0); + assert(r.y1 + dy >= 0); + assert(r.x2 + dx <= pixmap->drawable.width); + assert(r.y2 + dy <= pixmap->drawable.height); + if (box_intersect(&r, box)) { int height = r.y2 - r.y1; int dst_y = r.y1; @@ -12140,11 +12151,23 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable, region.extents.y2 = bound(region.extents.y1, rect->height); rect++; + DBG(("%s: rectangle [(%d, %d), (%d, %d)]\n", + __FUNCTION__, + region.extents.x1, + region.extents.y1, + region.extents.x2, + region.extents.y2)); + assert(region.extents.x1 + dx >= 0); + assert(region.extents.y1 + dy >= 0); + assert(region.extents.x2 + dx <= pixmap->drawable.width); + assert(region.extents.y2 + dy <= pixmap->drawable.height); + region.data = NULL; RegionIntersect(®ion, ®ion, &clip); nbox = RegionNumRects(®ion); box = RegionRects(®ion); + DBG(("%s: split into %d boxes after clipping\n", __FUNCTION__, nbox)); while (nbox--) { int height = box->y2 - box->y1; int dst_y = box->y1; |