From 50467a0882046055fbcec0bcfbce93a26f82fa11 Mon Sep 17 00:00:00 2001 From: Andrew Comminos Date: Tue, 4 Aug 2015 07:12:00 -0400 Subject: [PATCH] Bug 1189903 - Don't use RGBA surfaces on GLX if surface sharing is not used. r=jgilbert --- dom/canvas/WebGLContext.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index efb129555f74..34dc0bae70cd 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -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; }