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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user