Merge "opengles emulator: filter-out non-RGB configs"

This commit is contained in:
David Turner
2011-08-10 01:58:06 -07:00
committed by Android Code Review

View File

@@ -170,6 +170,15 @@ InitConfigStatus FBConfig::initConfigList(FrameBuffer *fb)
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_numConfigs = j;