diff options
author | Ian Romanick <idr@freedesktop.org> | 2009-04-06 15:35:37 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2009-04-09 14:44:44 -0700 |
commit | b8ef30c45c158077d11b9f5839aacb6ff4b67da8 (patch) | |
tree | 75db303ce9dca46399149d0fd5f5f70b176f5e3a /src | |
parent | 4f17040cb10ab9b0c3f36f7ca82f4efd2f9088bc (diff) |
DRI2: Assume that there is always a front buffer
Assume that the front-buffer exists even if the server didn't tell the
client that it exists.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
(cherry picked from commit e6386e0d9a461e7bc96ae7137de9c0a33f24c1a4)
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/x11/dri2_glx.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index 5acb3dd072..c97f9816dc 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -74,7 +74,6 @@ struct __GLXDRIdrawablePrivateRec { int bufferCount; int width, height; int have_back; - int have_front; int have_fake_front; }; @@ -195,7 +194,7 @@ static void dri2CopySubBuffer(__GLXDRIdrawable *pdraw, XserverRegion region; /* Check we have the right attachments */ - if (!(priv->have_front && priv->have_back)) + if (!priv->have_back) return; xrect.x = x; @@ -223,7 +222,7 @@ static void dri2WaitX(__GLXDRIdrawable *pdraw) XserverRegion region; /* Check we have the right attachments */ - if (!(priv->have_fake_front && priv->have_front)) + if (!priv->have_fake_front) return; xrect.x = 0; @@ -243,7 +242,7 @@ static void dri2WaitGL(__GLXDRIdrawable *pdraw) XRectangle xrect; XserverRegion region; - if (!(priv->have_fake_front && priv->have_front)) + if (!priv->have_fake_front) return; xrect.x = 0; @@ -292,7 +291,6 @@ dri2GetBuffers(__DRIdrawable *driDrawable, pdraw->width = *width; pdraw->height = *height; pdraw->bufferCount = *out_count; - pdraw->have_front = 0; pdraw->have_fake_front = 0; pdraw->have_back = 0; @@ -304,8 +302,6 @@ dri2GetBuffers(__DRIdrawable *driDrawable, pdraw->buffers[i].pitch = buffers[i].pitch; pdraw->buffers[i].cpp = buffers[i].cpp; pdraw->buffers[i].flags = buffers[i].flags; - if (pdraw->buffers[i].attachment == __DRI_BUFFER_FRONT_LEFT) - pdraw->have_front = 1; if (pdraw->buffers[i].attachment == __DRI_BUFFER_FAKE_FRONT_LEFT) pdraw->have_fake_front = 1; if (pdraw->buffers[i].attachment == __DRI_BUFFER_BACK_LEFT) |