Bug 1398404 - Make current context when updating max draw buffers; r=jgilbert
authorDaosheng Mu <daoshengmu@gmail.com>
Mon, 11 Sep 2017 10:30:48 +0800
changeset 430285 edd732009802c0fcbdaf88c946d0a27f14fc1a99
parent 430284 b22037b06fb65d176045065ee4c791d6ac016b30
child 430286 fd638dbfa55d4057781a83aa1bb3066c8e26ee73
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1398404
milestone57.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 1398404 - Make current context when updating max draw buffers; r=jgilbert MozReview-Commit-ID: 1OSjjMwCpBb
dom/canvas/WebGLContext.cpp
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -2453,16 +2453,17 @@ WebGLContext::ValidateArrayBufferView(co
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XPCOM goop
 
 void
 WebGLContext::UpdateMaxDrawBuffers()
 {
+    gl->MakeCurrent();
     mGLMaxColorAttachments = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_COLOR_ATTACHMENTS);
     mGLMaxDrawBuffers = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_DRAW_BUFFERS);
 
     // WEBGL_draw_buffers:
     // "The value of the MAX_COLOR_ATTACHMENTS_WEBGL parameter must be greater than or
     //  equal to that of the MAX_DRAW_BUFFERS_WEBGL parameter."
     mGLMaxDrawBuffers = std::min(mGLMaxDrawBuffers, mGLMaxColorAttachments);
 }