Bug 729726 - Use BGRA-texture-backed FBOs where available. r=bjacob

This commit is contained in:
Jeff Gilbert 2012-06-16 10:01:24 -04:00
parent 1df0bbcdcc
commit f6a9c3c189

View File

@ -1278,7 +1278,12 @@ GLContext::ChooseGLFormats(ContextFormat& aCF)
GLFormats formats;
if (aCF.alpha) {
formats.texColor = LOCAL_GL_RGBA;
if (mIsGLES2 && IsExtensionSupported(EXT_texture_format_BGRA8888)) {
formats.texColor = LOCAL_GL_BGRA;
} else {
formats.texColor = LOCAL_GL_RGBA;
}
if (mIsGLES2 && !IsExtensionSupported(OES_rgb8_rgba8)) {
formats.rbColor = LOCAL_GL_RGBA4;
aCF.red = aCF.green = aCF.blue = aCF.alpha = 4;