Bug 912196 - Handle alpha for webgl backbuffer copyTexImage reads. - r=kamidphish
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 08 Oct 2014 16:36:33 -0700
changeset 212600 7ccefd960453bb30d5612bcb541c0387747ddb30
parent 212599 42836d13bba5b656341c0955a8bbaca304b554e2
child 212601 f9cb6f547e238743815763aa156d62af8aa2eecc
push id27721
push usercbook@mozilla.com
push dateTue, 28 Oct 2014 14:55:05 +0000
treeherdermozilla-central@c0ddb1b098ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish
bugs912196
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 912196 - Handle alpha for webgl backbuffer copyTexImage reads. - r=kamidphish
dom/canvas/WebGLContextValidate.cpp
--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -1095,17 +1095,17 @@ WebGLContext::ValidateTexInputData(GLenu
 bool
 WebGLContext::ValidateCopyTexImage(GLenum format,
                                    WebGLTexImageFunc func,
                                    WebGLTexDimensions dims)
 {
     MOZ_ASSERT(IsCopyFunc(func));
 
     // Default framebuffer format
-    GLenum fboFormat = bool(gl->GetPixelFormat().alpha > 0) ? LOCAL_GL_RGBA : LOCAL_GL_RGB;
+    GLenum fboFormat = mOptions.alpha ? LOCAL_GL_RGBA : LOCAL_GL_RGB;
 
     if (mBoundFramebuffer) {
         if (!mBoundFramebuffer->CheckAndInitializeAttachments()) {
             ErrorInvalidFramebufferOperation("%s: incomplete framebuffer", InfoFrom(func, dims));
             return false;
         }
 
         GLenum readPlaneBits = LOCAL_GL_COLOR_BUFFER_BIT;