Bug 972622 - MakeCurrent during WebGL.compressedTex(Sub)Image2D(). r=kamidphish, a=lsblakk
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 14 Feb 2014 15:52:39 -0800
changeset 176316 f8a20613302caa5acc598956d6853aca87ea6b14
parent 176315 c515e8ba94f7124e33dd415a903e32e5959b6d77
child 176317 3ceabcc6ff66cad20c90b73ca2fba74edfa6bf9c
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish, lsblakk
bugs972622
milestone28.0
Bug 972622 - MakeCurrent during WebGL.compressedTex(Sub)Image2D(). r=kamidphish, a=lsblakk
content/canvas/src/WebGLContextGL.cpp
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -3382,16 +3382,17 @@ WebGLContext::CompressedTexImage2D(GLenu
         return;
     }
 
     uint32_t byteLength = view.Length();
     if (!ValidateCompressedTextureSize(target, level, internalformat, width, height, byteLength, "compressedTexImage2D")) {
         return;
     }
 
+    MakeContextCurrent();
     gl->fCompressedTexImage2D(target, level, internalformat, width, height, border, byteLength, view.Data());
     tex->SetImageInfo(target, level, width, height, internalformat, LOCAL_GL_UNSIGNED_BYTE,
                       WebGLImageDataStatus::InitializedImageData);
 
     ReattachTextureToAnyFramebufferToWorkAroundBugs(tex, level);
 }
 
 void
@@ -3486,16 +3487,17 @@ WebGLContext::CompressedTexSubImage2D(GL
             }
         }
     }
 
     if (imageInfo.HasUninitializedImageData()) {
         tex->DoDeferredImageInitialization(target, level);
     }
 
+    MakeContextCurrent();
     gl->fCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, byteLength, view.Data());
 
     return;
 }
 
 JS::Value
 WebGLContext::GetShaderParameter(WebGLShader *shader, GLenum pname)
 {