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:
Markus Stange
2025-04-08 16:37:59 +00:00
parent c36db8f9e1
commit f2bd02ddbc

View File

@@ -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());
}