Bug 1189903 - Don't use RGBA surfaces on GLX if surface sharing is not used. r=jgilbert

This commit is contained in:
Andrew Comminos 2015-08-04 07:12:00 -04:00
parent 0fa33147de
commit 50467a0882

View File

@ -685,10 +685,14 @@ CreateOffscreen(GLContext* gl, const WebGLContextOptions& options,
if (!baseCaps.alpha)
baseCaps.premultAlpha = true;
if (gl->IsANGLE() || gl->GetContextType() == GLContextType::GLX) {
if (gl->IsANGLE() ||
(gl->GetContextType() == GLContextType::GLX &&
gfxPlatform::GetPlatform()->GetCompositorBackend() == LayersBackend::LAYERS_OPENGL))
{
// We can't use no-alpha formats on ANGLE yet because of:
// https://code.google.com/p/angleproject/issues/detail?id=764
// GLX only supports GL_RGBA pixmaps as well.
// GLX only supports GL_RGBA pixmaps as well. Since we can't blit from
// an RGB FB to GLX's RGBA FB, force RGBA when surface sharing.
baseCaps.alpha = true;
}