Bug 1188195 - always initialize WebGL2 BlitFramebuffer src/dst formats to some value. r=jgilbert
authorLee Salzman <lsalzman@mozilla.com>
Wed, 29 Jul 2015 15:51:14 -0400
changeset 287116 443dd4746c5245fef32a7c5e78a17580422eb985
parent 287115 b268245c9b6f8a95261762527ec223b31fb67915
child 287117 87c4b1fb525534d447a8cd97ed9597b5112a060a
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1188195
milestone42.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 1188195 - always initialize WebGL2 BlitFramebuffer src/dst formats to some value. r=jgilbert
dom/canvas/WebGL2ContextFramebuffers.cpp
--- a/dom/canvas/WebGL2ContextFramebuffers.cpp
+++ b/dom/canvas/WebGL2ContextFramebuffers.cpp
@@ -184,19 +184,19 @@ WebGL2Context::BlitFramebuffer(GLint src
         // the underlying buffers are not the same, not the framebuffers
         // themselves.
         ErrorInvalidOperation("blitFramebuffer: Source and destination must"
                               " differ.");
         return;
     }
 
     GLsizei srcSamples;
-    GLenum srcColorFormat;
-    GLenum srcDepthFormat;
-    GLenum srcStencilFormat;
+    GLenum srcColorFormat = 0;
+    GLenum srcDepthFormat = 0;
+    GLenum srcStencilFormat = 0;
 
     if (mBoundReadFramebuffer) {
         if (!GetFBInfoForBlit(mBoundReadFramebuffer, this, "READ_FRAMEBUFFER",
                               &srcSamples, &srcColorFormat, &srcDepthFormat,
                               &srcStencilFormat))
         {
             return;
         }
@@ -215,19 +215,19 @@ WebGL2Context::BlitFramebuffer(GLint src
             }
             if (mOptions.stencil) {
                 srcStencilFormat = LOCAL_GL_STENCIL_INDEX8;
             }
         }
     }
 
     GLsizei dstSamples;
-    GLenum dstColorFormat;
-    GLenum dstDepthFormat;
-    GLenum dstStencilFormat;
+    GLenum dstColorFormat = 0;
+    GLenum dstDepthFormat = 0;
+    GLenum dstStencilFormat = 0;
 
     if (mBoundDrawFramebuffer) {
         if (!GetFBInfoForBlit(mBoundDrawFramebuffer, this, "DRAW_FRAMEBUFFER",
                               &dstSamples, &dstColorFormat, &dstDepthFormat,
                               &dstStencilFormat))
         {
             return;
         }