Bug 1426280 - Remove explicit MakeCurrents from WebGL now that we use implicit MakeCurrent. - r=lenzak

MozReview-Commit-ID: HxWWPmD1Yzu
This commit is contained in:
Jeff Gilbert
2017-12-19 17:21:18 -08:00
parent c2b754570b
commit acda6087b5
37 changed files with 18 additions and 247 deletions

View File

@@ -655,7 +655,6 @@ WebGLFramebuffer::Delete()
cur.Clear(funcName);
}
mContext->MakeContextCurrent();
mContext->gl->fDeleteFramebuffers(1, &mGLName);
LinkedListElement<WebGLFramebuffer>::removeFrom(mContext->mFramebuffers);
@@ -1087,8 +1086,6 @@ WebGLFramebuffer::ResolveAttachmentData(const char* funcName) const
////
// Clear
mContext->MakeContextCurrent();
const bool hasDrawBuffers = mContext->HasDrawBuffers();
if (hasDrawBuffers) {
fnDrawBuffers(colorAttachmentsToClear);
@@ -1203,7 +1200,6 @@ WebGLFramebuffer::CheckFramebufferStatus(const char* funcName)
// Looks good on our end. Let's ask the driver.
gl::GLContext* const gl = mContext->gl;
gl->MakeCurrent();
const ScopedFBRebinder autoFB(mContext);
gl->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, mGLName);
@@ -1333,8 +1329,6 @@ WebGLFramebuffer::DrawBuffers(const char* funcName, const dom::Sequence<GLenum>&
////
mContext->MakeContextCurrent();
mColorDrawBuffers.swap(newColorDrawBuffers);
RefreshDrawBuffers(); // Calls glDrawBuffers.
RefreshResolvedData();
@@ -1358,8 +1352,6 @@ WebGLFramebuffer::ReadBuffer(const char* funcName, GLenum attachPoint)
////
mContext->MakeContextCurrent();
mColorReadBuffer = attach;
RefreshReadBuffer(); // Calls glReadBuffer.
RefreshResolvedData();
@@ -1936,7 +1928,6 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl,
////
gl->MakeCurrent();
webgl->OnBeforeReadCall();
WebGLContext::ScopedDrawCallWrapper wrapper(*webgl);
gl->fBlitFramebuffer(srcX0, srcY0, srcX1, srcY1,