summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-22 09:51:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-22 09:51:46 +0000
commit8d75b2ece1de1c95047c5dc5a569348abd0e6325 (patch)
treee8ffad46b32899cc3092ddd6090c1326bad1bed6 /src
parent9f8e86800345d19785eae2dd2099dd7d61a7a3b3 (diff)
sna: Fix computation of clip extents for stippling
The clip extents for the stippled BLT missed applying the drawable offset to the lower-right corner, so inevitably every operation ended up being clipped. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62618 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 011b50f5..67cd276a 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -10659,10 +10659,11 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
int16_t dx, dy;
uint32_t br00, br13;
- DBG(("%s: upload (%d, %d), (%d, %d), origin (%d, %d)\n", __FUNCTION__,
+ DBG(("%s: upload (%d, %d), (%d, %d), origin (%d, %d), clipped=%x\n", __FUNCTION__,
extents->x1, extents->y1,
extents->x2, extents->y2,
- origin->x, origin->y));
+ origin->x, origin->y,
+ clipped));
get_drawable_deltas(drawable, pixmap, &dx, &dy);
kgem_set_mode(&sna->kgem, KGEM_BLT, bo);
@@ -10823,9 +10824,9 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
void *ptr;
box.x1 = r->x + drawable->x;
- box.x2 = bound(r->x, r->width);
+ box.x2 = bound(box.x1, r->width);
box.y1 = r->y + drawable->y;
- box.y2 = bound(r->y, r->height);
+ box.y2 = bound(box.y1, r->height);
r++;
if (!box_intersect(&box, &clip.extents))
@@ -10957,9 +10958,9 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
void *ptr;
unclipped.x1 = r->x + drawable->x;
- unclipped.x2 = bound(r->x, r->width);
+ unclipped.x2 = bound(unclipped.x2, r->width);
unclipped.y1 = r->y + drawable->y;
- unclipped.y2 = bound(r->y, r->height);
+ unclipped.y2 = bound(unclipped.y2, r->height);
r++;
c = find_clip_box_for_y(clip_start,
@@ -11859,7 +11860,7 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect)
if (gc->fillStyle == FillTiled) {
if (!gc->tileIsPixel && sna_pixmap_is_gpu(gc->tile.pixmap)) {
DBG(("%s: source is already on the gpu\n", __FUNCTION__));
- hint |= PREFER_GPU | FORCE_GPU;
+ hint |= FORCE_GPU;
}
}