Bug 1426280 - Remove explicit MakeCurrents from WebGL now that we use implicit MakeCurrent. - r=lenzak
MozReview-Commit-ID: HxWWPmD1Yzu
This commit is contained in:
@@ -20,8 +20,6 @@ WebGLContext::Clear(GLbitfield mask)
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
MakeContextCurrent();
|
||||
|
||||
uint32_t m = mask & (LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT | LOCAL_GL_STENCIL_BUFFER_BIT);
|
||||
if (mask != m)
|
||||
return ErrorInvalidValue("%s: invalid mask bits", funcName);
|
||||
@@ -79,8 +77,6 @@ WebGLContext::ClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
MakeContextCurrent();
|
||||
|
||||
const bool supportsFloatColorBuffers = (IsExtensionEnabled(WebGLExtensionID::EXT_color_buffer_float) ||
|
||||
IsExtensionEnabled(WebGLExtensionID::EXT_color_buffer_half_float) ||
|
||||
IsExtensionEnabled(WebGLExtensionID::WEBGL_color_buffer_float));
|
||||
@@ -105,7 +101,6 @@ WebGLContext::ClearDepth(GLclampf v)
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
MakeContextCurrent();
|
||||
mDepthClearValue = GLClampFloat(v);
|
||||
gl->fClearDepth(mDepthClearValue);
|
||||
}
|
||||
@@ -116,7 +111,6 @@ WebGLContext::ClearStencil(GLint v)
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
MakeContextCurrent();
|
||||
mStencilClearValue = v;
|
||||
gl->fClearStencil(v);
|
||||
}
|
||||
@@ -127,7 +121,6 @@ WebGLContext::ColorMask(WebGLboolean r, WebGLboolean g, WebGLboolean b, WebGLboo
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
MakeContextCurrent();
|
||||
mColorWriteMask[0] = r;
|
||||
mColorWriteMask[1] = g;
|
||||
mColorWriteMask[2] = b;
|
||||
@@ -141,7 +134,6 @@ WebGLContext::DepthMask(WebGLboolean b)
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
MakeContextCurrent();
|
||||
mDepthWriteMask = b;
|
||||
gl->fDepthMask(b);
|
||||
}
|
||||
@@ -195,7 +187,6 @@ WebGLContext::StencilMask(GLuint mask)
|
||||
mStencilWriteMaskFront = mask;
|
||||
mStencilWriteMaskBack = mask;
|
||||
|
||||
MakeContextCurrent();
|
||||
gl->fStencilMask(mask);
|
||||
}
|
||||
|
||||
@@ -221,7 +212,6 @@ WebGLContext::StencilMaskSeparate(GLenum face, GLuint mask)
|
||||
break;
|
||||
}
|
||||
|
||||
MakeContextCurrent();
|
||||
gl->fStencilMaskSeparate(face, mask);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user