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>
This commit is contained in:
parent
b33be7fbac
commit
92119ef093
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue