Bug 1959165 - Move the MakeCurrent call to a place that makes more sense. r=lsalzman
The MakeCurrent() call that this patch moves was added in https://phabricator.services.mozilla.com/D196864 . I think the WebRenderShaders destructor is a more reasonable place for this call; WebRenderShaders already stores the GLContext. Differential Revision: https://phabricator.services.mozilla.com/D244782
This commit is contained in:
@@ -1459,12 +1459,7 @@ void RenderThread::ClearSingletonGL() {
|
||||
mProgramsForCompositorOGL->Clear();
|
||||
mProgramsForCompositorOGL = nullptr;
|
||||
}
|
||||
if (mShaders) {
|
||||
if (mSingletonGL) {
|
||||
mSingletonGL->MakeCurrent();
|
||||
}
|
||||
mShaders = nullptr;
|
||||
}
|
||||
mSingletonGL = nullptr;
|
||||
}
|
||||
|
||||
@@ -1547,6 +1542,7 @@ WebRenderShaders::WebRenderShaders(gl::GLContext* gl,
|
||||
}
|
||||
|
||||
WebRenderShaders::~WebRenderShaders() {
|
||||
mGL->MakeCurrent();
|
||||
wr_shaders_delete(mShaders, mGL.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user