Bug 987010 - Fix the way that the presence of an alpha channel on a canvas drawing buffer is propagated - r=jrmuizel

This commit is contained in:
Benoit Jacob
2014-05-14 12:26:13 -04:00
parent 67f8a5c10e
commit a7529cb0d2
4 changed files with 11 additions and 2 deletions

View File

@@ -55,11 +55,14 @@ ClientCanvasLayer::Initialize(const Data& aData)
if (mGLContext) {
GLScreenBuffer* screen = mGLContext->Screen();
SurfaceCaps caps = screen->Caps();
SurfaceCaps caps;
if (mStream) {
// The screen caps are irrelevant if we're using a separate stream
caps = GetContentFlags() & CONTENT_OPAQUE ? SurfaceCaps::ForRGB() : SurfaceCaps::ForRGBA();
caps = aData.mHasAlpha ? SurfaceCaps::ForRGBA() : SurfaceCaps::ForRGB();
} else {
caps = screen->Caps();
}
MOZ_ASSERT(caps.alpha == aData.mHasAlpha);
SurfaceStreamType streamType =
SurfaceStream::ChooseGLStreamType(SurfaceStream::OffMainThread,