Mesa (gallium-0.2): egl: cleanup doublebuffer check

Alan Hourihane alanh at kemper.freedesktop.org
Fri Sep 26 11:27:45 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: bb6a69d1696cacf828a3de21bc57678c0e4aa54a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb6a69d1696cacf828a3de21bc57678c0e4aa54a

Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Fri Sep 26 12:27:29 2008 +0100

egl: cleanup doublebuffer check

---

 src/egl/drivers/glx/egl_glx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 732d15c..7e49674 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -191,6 +191,9 @@ get_visual_attribs(Display *dpy, XVisualInfo *vInfo,
    attribs->render_type = GLX_RGBA_BIT;
    
    glXGetConfig(dpy, vInfo, GLX_DOUBLEBUFFER, &attribs->doubleBuffer);
+   if (!attribs->doubleBuffer)
+      return GL_FALSE;
+
    glXGetConfig(dpy, vInfo, GLX_STEREO, &attribs->stereo);
    glXGetConfig(dpy, vInfo, GLX_AUX_BUFFERS, &attribs->auxBuffers);
    glXGetConfig(dpy, vInfo, GLX_RED_SIZE, &attribs->redSize);
@@ -262,7 +265,6 @@ create_configs(_EGLDisplay *disp, struct GLX_egl_driver *GLX_drv)
       if (!get_visual_attribs(disp->Xdpy, &GLX_drv->visuals[i], &attribs))
 	 continue;
 
-      if (attribs.doubleBuffer) {
       config = CALLOC_STRUCT(GLX_egl_config);
 
       _eglInitConfig(&config->Base, i+1);
@@ -284,7 +286,6 @@ create_configs(_EGLDisplay *disp, struct GLX_egl_driver *GLX_drv)
       /* XXX possibly other things to init... */
 
       _eglAddConfig(disp, &config->Base);
-      }
    }
 
    return EGL_TRUE;




More information about the mesa-commit mailing list