mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
6918615b37
We noticed a cold_view_nav_start regression on Fenix from enabling the GPU process, and profiles showed time spent synchronously waiting for the GPU process to launch. This occured because the compositor was being created in nsWindow::Create, and as it requires the GPU process to be running it had to block until launch completed. The process is launched when the gfxPlatform is first initialized, but that was only occuring immediately prior to creating the compositor, which did not give it enough time to complete asynchronously. This patch makes it so that we initialize the gfxPlatform slightly earlier, and importantly delay creating the compositor until it is actually required. This gives the process enough time to launch asynchronously meaning we do not have to block. We started deliberately creating the compositor early on Android because of bug 1453501, to avoid a race condition where the compositor didn't exist when RemoteLayerTreeOwner::Initialize was called, causing us to use a basic layer manager. However, since bug 1741156 landed we now create the compositor on-demand, meaning this is no longer a possibility. Delaying compositor creation can, however, uncover another race condition. If the UICompositorControllerChild is opened on the UI thread before the main thread is able to set its pointer to the widget, then the java GeckoSession will never be notified that the compositor has been opened, and composition will never be resumed. This patch fixes this issue by setting the UiCompositorControllerChild's widget pointer in its constructor rather than immediately afterwards. Differential Revision: https://phabricator.services.mozilla.com/D139842 |
||
---|---|---|
.. | ||
CanvasManagerChild.cpp | ||
CanvasManagerChild.h | ||
CanvasManagerParent.cpp | ||
CanvasManagerParent.h | ||
CompositorOptions.h | ||
CompositorSession.cpp | ||
CompositorSession.h | ||
CompositorWidgetVsyncObserver.cpp | ||
CompositorWidgetVsyncObserver.h | ||
CrossProcessPaint.cpp | ||
CrossProcessPaint.h | ||
D3DMessageUtils.cpp | ||
D3DMessageUtils.h | ||
GfxMessageUtils.h | ||
GPUChild.cpp | ||
GPUChild.h | ||
GPUParent.cpp | ||
GPUParent.h | ||
GPUProcessHost.cpp | ||
GPUProcessHost.h | ||
GPUProcessImpl.cpp | ||
GPUProcessImpl.h | ||
GPUProcessListener.h | ||
GPUProcessManager.cpp | ||
GPUProcessManager.h | ||
GraphicsMessages.ipdlh | ||
InProcessCompositorSession.cpp | ||
InProcessCompositorSession.h | ||
moz.build | ||
PCanvasManager.ipdl | ||
PGPU.ipdl | ||
PVsyncBridge.ipdl | ||
RemoteCompositorSession.cpp | ||
RemoteCompositorSession.h | ||
VsyncBridgeChild.cpp | ||
VsyncBridgeChild.h | ||
VsyncBridgeParent.cpp | ||
VsyncBridgeParent.h | ||
VsyncIOThreadHolder.cpp | ||
VsyncIOThreadHolder.h |