diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-24 10:23:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-24 10:55:54 +0100 |
commit | 92119ef0939897dd1850b417d04a2ba558aee8ca (patch) | |
tree | 82cd52340f6728469271756261ba422db6c75f41 /src | |
parent | b33be7fbac005eb222302ffbb533ded1cd700953 (diff) |
sna/glyphs: Clip damage to dst
We only check if the hardware will automatically discard writes outside
of the target pixmap, but we must manually clip the damage before adding
it to our tracker.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c58
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_glyphs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 96279e66..28cb58df 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -548,7 +548,15 @@ static inline bool clipped_glyphs(PicturePtr dst, int nlist, GlyphListPtr list, if (dst->pCompositeClip->data == NULL && region_matches_pixmap(dst->pCompositeClip, get_drawable_pixmap(dst->pDrawable))) { - DBG(("%s: no, region matches drawable\n", __FUNCTION__)); + DBG(("%s: no, clip region (%d, %d), (%d, %d) matches drawable pixmap=%ld size=%dx%d\n", + __FUNCTION__, + dst->pCompositeClip->extents.x1, + dst->pCompositeClip->extents.y1, + dst->pCompositeClip->extents.x2, + dst->pCompositeClip->extents.y2, + get_drawable_pixmap(dst->pDrawable), + get_drawable_pixmap(dst->pDrawable)->drawable.width, + get_drawable_pixmap(dst->pDrawable)->drawable.height)); return false; } @@ -900,7 +908,7 @@ next_glyph_N: r.width, r.height)); tmp.blt(sna, &tmp, &r); - apply_damage(&tmp, &r); + apply_damage_clipped_to_dst(&tmp, &r, dst->pDrawable); next_glyph_0: x += glyph->info.xOff; |