summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-08 09:40:19 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-08 14:26:35 +0100
commit9306a148cbf1a2471540f3301136d57e93197593 (patch)
tree99398a9c1fa9ab5c8fab9d72bf2667ca06c85af9
parent22cd7c873edd0b641e54e81d643ec6b0ea921f88 (diff)
sna/dri2: Use xchg for offscreen drawables where applicable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 314651e6..622a8e6f 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2485,9 +2485,12 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
blit:
DBG(("%s -- blit\n", __FUNCTION__));
- __sna_dri2_copy_region(sna, draw, NULL, back, front, false);
if (info)
sna_dri2_event_free(sna, draw, info);
+ if (can_xchg(sna, draw, front, back))
+ sna_dri2_exchange_buffers(draw, front, back);
+ else
+ __sna_dri2_copy_region(sna, draw, NULL, back, front, false);
skip:
DBG(("%s: unable to show frame, unblocking client\n", __FUNCTION__));
if (crtc == NULL)