Bug 1685253 - Fix error handling of RenderCompositorEGL::Resume() r=nical

Changed as to return false when resume fails.

Differential Revision: https://phabricator.services.mozilla.com/D100872
This commit is contained in:
sotaro 2021-01-06 12:12:42 +00:00
Родитель 68d22d4e10
Коммит c1ea187aa6
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -146,6 +146,10 @@ bool RenderCompositorEGL::Resume() {
// Destroy EGLSurface if it exists.
DestroyEGLSurface();
mEGLSurface = CreateEGLSurface();
if (mEGLSurface == EGL_NO_SURFACE) {
RenderThread::Get()->HandleWebRenderError(WebRenderError::NEW_SURFACE);
return false;
}
gl::GLContextEGL::Cast(gl())->SetEGLSurfaceOverride(mEGLSurface);
#ifdef MOZ_WIDGET_ANDROID
@ -179,6 +183,7 @@ bool RenderCompositorEGL::Resume() {
egl->fSwapInterval(0);
} else {
RenderThread::Get()->HandleWebRenderError(WebRenderError::NEW_SURFACE);
return false;
}
}
return true;