Bug 1048108 - Don't require alpha on ANGLE. - r=kamidphish

This commit is contained in:
Jeff Gilbert 2014-10-01 17:05:34 -07:00
parent 6bc5648c2b
commit 101160baec

View File

@ -289,16 +289,26 @@ ChooseConfig(GLContext* gl, GLLibraryEGL* egl, const SurfaceCaps& caps)
EGLConfig config = EGL_NO_CONFIG;
for (int i = 0; i < foundConfigs; i++) {
EGLConfig cur = configs[i];
if (DoesAttribBitsMatchCapBool(egl, cur, LOCAL_EGL_ALPHA_SIZE,
caps.alpha) &&
DoesAttribBitsMatchCapBool(egl, cur, LOCAL_EGL_DEPTH_SIZE,
caps.depth) &&
DoesAttribBitsMatchCapBool(egl, cur, LOCAL_EGL_STENCIL_SIZE,
caps.stencil))
if (!DoesAttribBitsMatchCapBool(egl, cur, LOCAL_EGL_DEPTH_SIZE,
caps.depth) ||
!DoesAttribBitsMatchCapBool(egl, cur, LOCAL_EGL_STENCIL_SIZE,
caps.stencil))
{
config = cur;
break;
continue;
}
// We can't enforce alpha on ANGLE yet because of:
// https://code.google.com/p/angleproject/issues/detail?id=764
if (!gl->IsANGLE()) {
if (!DoesAttribBitsMatchCapBool(egl, cur, LOCAL_EGL_ALPHA_SIZE,
caps.alpha))
{
continue;
}
}
config = cur;
break;
}
if (config == EGL_NO_CONFIG) {