зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1592026 - Move NativeLayerRoot::CommitToScreen call from PostRender into the compositors. r=jrmuizel
This makes it more similar to how SwapBuffers was used. This patch also makes us call glFlush directly when using native layers, rather than going through the misleadingly-named GLContext::SwapBuffers method. Differential Revision: https://phabricator.services.mozilla.com/D57062 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c96a136f94
Коммит
239125933c
|
@ -1296,6 +1296,10 @@ bool LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
|
||||||
AUTO_PROFILER_LABEL("LayerManagerComposite::Render:EndFrame", GRAPHICS);
|
AUTO_PROFILER_LABEL("LayerManagerComposite::Render:EndFrame", GRAPHICS);
|
||||||
|
|
||||||
mCompositor->EndFrame();
|
mCompositor->EndFrame();
|
||||||
|
|
||||||
|
if (usingNativeLayers) {
|
||||||
|
mNativeLayerRoot->CommitToScreen();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mCompositor->GetWidget()->PostRender(&widgetContext);
|
mCompositor->GetWidget()->PostRender(&widgetContext);
|
||||||
|
|
|
@ -119,10 +119,16 @@ RenderedFrameId RenderCompositorOGL::EndFrame(
|
||||||
const FfiVec<DeviceIntRect>& aDirtyRects) {
|
const FfiVec<DeviceIntRect>& aDirtyRects) {
|
||||||
RenderedFrameId frameId = GetNextRenderFrameId();
|
RenderedFrameId frameId = GetNextRenderFrameId();
|
||||||
InsertFrameDoneSync();
|
InsertFrameDoneSync();
|
||||||
mGL->SwapBuffers();
|
|
||||||
|
if (!mNativeLayerRoot) {
|
||||||
|
mGL->SwapBuffers();
|
||||||
|
return frameId;
|
||||||
|
}
|
||||||
|
|
||||||
if (mNativeLayerForEntireWindow) {
|
if (mNativeLayerForEntireWindow) {
|
||||||
|
mGL->fFlush();
|
||||||
mNativeLayerForEntireWindow->NotifySurfaceReady();
|
mNativeLayerForEntireWindow->NotifySurfaceReady();
|
||||||
|
mNativeLayerRoot->CommitToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
return frameId;
|
return frameId;
|
||||||
|
@ -208,6 +214,8 @@ void RenderCompositorOGL::CompositorEndFrame() {
|
||||||
mDrawnPixelCount = 0;
|
mDrawnPixelCount = 0;
|
||||||
|
|
||||||
mNativeLayerRoot->SetLayers(mAddedLayers);
|
mNativeLayerRoot->SetLayers(mAddedLayers);
|
||||||
|
mGL->fFlush();
|
||||||
|
mNativeLayerRoot->CommitToScreen();
|
||||||
mSurfacePoolHandle->OnEndFrame();
|
mSurfacePoolHandle->OnEndFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1708,11 +1708,7 @@ bool nsChildView::PreRender(WidgetRenderingContext* aContext) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsChildView::PostRender(WidgetRenderingContext* aContext) {
|
void nsChildView::PostRender(WidgetRenderingContext* aContext) { mViewTearDownLock.Unlock(); }
|
||||||
mNativeLayerRoot->CommitToScreen();
|
|
||||||
|
|
||||||
mViewTearDownLock.Unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<layers::NativeLayerRoot> nsChildView::GetNativeLayerRoot() { return mNativeLayerRoot; }
|
RefPtr<layers::NativeLayerRoot> nsChildView::GetNativeLayerRoot() { return mNativeLayerRoot; }
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче