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>
This commit is contained in:
Ian Romanick 2009-04-27 15:11:10 -07:00
parent 57aff88c7d
commit 0d9d3f3e36

View File

@ -206,7 +206,6 @@ 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;
@ -214,10 +213,14 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
if (attachment == DRI2BufferFrontLeft) {
need_real_front--;
need_fake_front++;
front_format = format;
if (pDraw->type == DRAWABLE_WINDOW) {
need_fake_front++;
}
}
if (pDraw->type == DRAWABLE_WINDOW) {
if (attachment == DRI2BufferFakeFrontLeft) {
need_fake_front--;
have_fake_front = 1;