diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-08 20:44:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-08 20:58:02 +0100 |
commit | 097669cd728e612bf3e3c531b83892e37481ee7b (patch) | |
tree | 49d0bf2135692a167e2a91a94af767d6dd40f3dd | |
parent | cbf1f97d5dadbf569c7d26e78899bda95b28b16d (diff) |
sna/dri: Do not create a scanout-capable buffer if not flipping
Avoid paying the penalty of creating an uncached buffer if we never
intend to flip to it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 0083b524..1569251f 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -305,7 +305,8 @@ sna_dri_create_buffer(DrawablePtr draw, case DRI2BufferFakeFrontRight: bpp = draw->bitsPerPixel; if (draw->width == sna->front->drawable.width && - draw->height == sna->front->drawable.height) + draw->height == sna->front->drawable.height && + (sna->flags & SNA_NO_FLIP) == 0) flags |= CREATE_SCANOUT; DBG(("%s: creating back buffer %dx%d, suitable for scanout? %d\n", __FUNCTION__, |