diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2009-04-27 15:11:10 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2009-06-11 22:46:00 -0700 |
commit | ec9f1ae32474bc0507a3c66e63bdf2835d467a34 (patch) | |
tree | f1a111c58b03b6898ed195318755d9cecb5f218c /hw | |
parent | 4fad615d689c61c6c3a000295a1fa755359737cb (diff) |
DRI2: Force allocation of real-front buffer for non-windows as well
For redirected rendering we end up with pixmaps (which the app thinks are
windows) that are double buffered.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Pierre Willenbrock <pierre@pirsoft.de>
(cherry picked from commit 0d9d3f3e361f769822caedccf4c2a58cc9930ecc)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 9ded048eb..1d49d7c65 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -206,18 +206,21 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, * attachments. The counting logic in the loop accounts for the case * where the client requests both the fake and real front-buffer. */ - if (pDraw->type == DRAWABLE_WINDOW) { - if (attachment == DRI2BufferBackLeft) { - need_real_front++; - front_format = format; - } + if (attachment == DRI2BufferBackLeft) { + need_real_front++; + front_format = format; + } - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + front_format = format; + + if (pDraw->type == DRAWABLE_WINDOW) { need_fake_front++; - front_format = format; } + } + if (pDraw->type == DRAWABLE_WINDOW) { if (attachment == DRI2BufferFakeFrontLeft) { need_fake_front--; have_fake_front = 1; |