Bug 1719437 - Do not initialize shaders when creating SingletonGL for software webrender. r=aosmond

It leads to OpenGL errors, as we must initialize a webrender Device in
order to initialize the shaders, and this Device attempts to use
OpenGL commands not supported by the GL context. For example the GL
context may only support GLES 2, hence why we are using SWGL in the
first place.

Differential Revision: https://phabricator.services.mozilla.com/D120356
This commit is contained in:
Jamie Nicol 2021-07-20 19:10:58 +00:00
Родитель b40ac20343
Коммит ebb76fd7e3
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -930,7 +930,7 @@ gl::GLContext* RenderThread::SingletonGL(nsACString& aError) {
CreateSingletonGL(aError);
mShaders = nullptr;
}
if (mSingletonGL && !mShaders) {
if (mSingletonGL && mSingletonGLIsForHardwareWebRender && !mShaders) {
mShaders = MakeUnique<WebRenderShaders>(mSingletonGL, mProgramCache.get());
}