am e594f31f: am f3bb27a7: Merge "opengles emulator: filter-out non-RGB configs"

* commit 'e594f31fafd8d4ad9e5a00c260bf5f1b1a36c991':
  opengles emulator: filter-out non-RGB configs
This commit is contained in:
David Turner
2011-08-10 02:09:38 -07:00
committed by Android Git Automerger

View File

@@ -170,6 +170,15 @@ InitConfigStatus FBConfig::initConfigList(FrameBuffer *fb)
if (!(surfaceType & EGL_PBUFFER_BIT)) continue; if (!(surfaceType & EGL_PBUFFER_BIT)) continue;
} }
//
// Filter out not RGB configs
//
EGLint redSize, greenSize, blueSize;
s_egl.eglGetConfigAttrib(dpy, configs[i], EGL_RED_SIZE, &redSize);
s_egl.eglGetConfigAttrib(dpy, configs[i], EGL_BLUE_SIZE, &blueSize);
s_egl.eglGetConfigAttrib(dpy, configs[i], EGL_GREEN_SIZE, &greenSize);
if (redSize==0 || greenSize==0 || blueSize==0) continue;
s_fbConfigs[j++] = new FBConfig(dpy, configs[i]); s_fbConfigs[j++] = new FBConfig(dpy, configs[i]);
} }
s_numConfigs = j; s_numConfigs = j;