diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-17 21:56:56 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-17 21:56:56 +0000 |
commit | 16dac417c8049d65b3641e0f662865772faad61f (patch) | |
tree | 00df8da97d49ac09ae5fbb728c149bad9e3742ab | |
parent | 85213d5d450eec5696496128c1acecb5ca13c53b (diff) |
sna/dri: Fix stale Pixmap detection
NB the back buffer is not associated with the Drawable and so has no
pixmap field set. Hence comparing the front->pixmap against the
back->pixmap was always rejecting the blit. All we can check is that
front->pixmap corresponds with the current Drawable and so reject stale
configuration.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 2d3a2620..1a02449e 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -884,8 +884,13 @@ can_blit(struct sna * sna, if (draw->type == DRAWABLE_PIXMAP) return true; - if (get_private(front)->pixmap != get_private(back)->pixmap) + if (get_private(front)->pixmap != get_drawable_pixmap(draw)) { + DBG(("%s: reject as front pixmap=%ld, but expecting pixmap=%ld\n", + __FUNCTION__, + get_private(front)->pixmap ? get_private(front)->pixmap->drawable.serialNumber : 0, + get_drawable_pixmap(draw)->drawable.serialNumber)); return false; + } clip = &((WindowPtr)draw)->clipList; w = clip->extents.x2 - draw->x; |