Bug 1376527 - Do not call NotifyDidRender when RendererOGL::Render() returned false r=nical

This commit is contained in:
sotaro 2017-07-04 19:25:24 +09:00
Родитель 5deb93cfb1
Коммит 983800adec
2 изменённых файлов: 9 добавлений и 1 удалений

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

@ -239,7 +239,11 @@ RenderThread::UpdateAndRender(wr::WindowId aWindowId)
TimeStamp start = TimeStamp::Now();
renderer->Render();
bool ret = renderer->Render();
if (!ret) {
// Render did not happen, do not call NotifyDidRender.
return;
}
TimeStamp end = TimeStamp::Now();

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

@ -105,6 +105,8 @@ RendererOGL::Render()
{
if (!mGL->MakeCurrent()) {
gfxCriticalNote << "Failed to make render context current, can't draw.";
// XXX This could cause oom in webrender since pending_texture_updates is not handled.
// It needs to be addressed.
return false;
}
@ -118,6 +120,8 @@ RendererOGL::Render()
#endif
if (!mWidget->PreRender(&widgetContext)) {
// XXX This could cause oom in webrender since pending_texture_updates is not handled.
// It needs to be addressed.
return false;
}
// XXX set clear color if MOZ_WIDGET_ANDROID is defined.