summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-30 18:39:06 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-30 18:39:36 +0100
commiteec12faf82370a8540114287c224953aa66d7bd9 (patch)
tree61a09cefadb30d13ab3a62b678e7603f2c2e171a
parent8e23251aad6d56a59e626b623e59bafac3143562 (diff)
sna/dri: Check back/front buffers of a pixmap for format change
Highly unlikely. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 4dc96473..69c1b425 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1091,15 +1091,15 @@ can_exchange(struct sna * sna,
WindowPtr win = (WindowPtr)draw;
PixmapPtr pixmap;
- if (draw->type == DRAWABLE_PIXMAP)
- return true;
-
if (front->format != back->format) {
DBG(("%s: no, format mismatch, front = %d, back = %d\n",
__FUNCTION__, front->format, back->format));
return false;
}
+ if (draw->type == DRAWABLE_PIXMAP)
+ return true;
+
pixmap = get_window_pixmap(win);
if (pixmap == sna->front) {
DBG(("%s: no, window is attached to the front buffer\n",