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-05-01 09:47:12 -0700 |
commit | 0d9d3f3e361f769822caedccf4c2a58cc9930ecc (patch) | |
tree | 15ba254a8a0b036de90045d0b7867a276f4618f6 | |
parent | 57aff88c7d0761e590806d07bee1c9410680c89f (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>
-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, | |||
206 | * attachments. The counting logic in the loop accounts for the case | 206 | * attachments. The counting logic in the loop accounts for the case |
207 | * where the client requests both the fake and real front-buffer. | 207 | * where the client requests both the fake and real front-buffer. |
208 | */ | 208 | */ |
209 | if (pDraw->type == DRAWABLE_WINDOW) { | 209 | if (attachment == DRI2BufferBackLeft) { |
210 | if (attachment == DRI2BufferBackLeft) { | 210 | need_real_front++; |
211 | need_real_front++; | 211 | front_format = format; |
212 | front_format = format; | 212 | } |
213 | } | ||
214 | 213 | ||
215 | if (attachment == DRI2BufferFrontLeft) { | 214 | if (attachment == DRI2BufferFrontLeft) { |
216 | need_real_front--; | 215 | need_real_front--; |
216 | front_format = format; | ||
217 | |||
218 | if (pDraw->type == DRAWABLE_WINDOW) { | ||
217 | need_fake_front++; | 219 | need_fake_front++; |
218 | front_format = format; | ||
219 | } | 220 | } |
221 | } | ||
220 | 222 | ||
223 | if (pDraw->type == DRAWABLE_WINDOW) { | ||
221 | if (attachment == DRI2BufferFakeFrontLeft) { | 224 | if (attachment == DRI2BufferFakeFrontLeft) { |
222 | need_fake_front--; | 225 | need_fake_front--; |
223 | have_fake_front = 1; | 226 | have_fake_front = 1; |