opengles emulator: limit X11 configs some more

On Linux/Intel, some configurations are returned which make no sense.
Also, no use for single buffer config, and we don't support pixmap
visuals.

Change-Id: I11f37c8ba612ee10dd654141e6f167add1675dce
diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp
index 44044af..2cc836d 100644
--- a/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp
+++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp
@@ -91,6 +91,7 @@
     int  pMaxWidth,pMaxHeight,pMaxPixels;
     int  tmp;
     int  configId,level,renderable;
+    int  doubleBuffer;
 
     IS_SUCCESS(glXGetFBConfigAttrib(dpy,*frmt,GLX_TRANSPARENT_TYPE,&tmp));
     if(tmp == GLX_TRANSPARENT_INDEX) {
@@ -106,6 +107,12 @@
     }
 
 
+    //
+    // filter out single buffer configurations
+    //
+    IS_SUCCESS(glXGetFBConfigAttrib(dpy,*frmt,GLX_DOUBLEBUFFER,&doubleBuffer));
+    if (!doubleBuffer) return NULL;
+
     IS_SUCCESS(glXGetFBConfigAttrib(dpy,*frmt,GLX_BUFFER_SIZE,&bSize));
     IS_SUCCESS(glXGetFBConfigAttrib(dpy,*frmt,GLX_RED_SIZE,&red));
     IS_SUCCESS(glXGetFBConfigAttrib(dpy,*frmt,GLX_GREEN_SIZE,&green));
@@ -123,13 +130,12 @@
     //supported surfaces types
     IS_SUCCESS(glXGetFBConfigAttrib(dpy,*frmt,GLX_DRAWABLE_TYPE,&tmp));
     supportedSurfaces = 0;
-    if(tmp & GLX_WINDOW_BIT) {
+    if(tmp & GLX_WINDOW_BIT && visualId != 0) {
         supportedSurfaces |= EGL_WINDOW_BIT;
     } else {
         visualId = 0;
         visualType = EGL_NONE;
     }
-    if(tmp & GLX_PIXMAP_BIT)  supportedSurfaces |= EGL_PIXMAP_BIT;
     if(tmp & GLX_PBUFFER_BIT) supportedSurfaces |= EGL_PBUFFER_BIT;
 
     caveat = 0;