gecko-dev/gfx/ipc
Jamie Nicol 6918615b37 Bug 1756700 - Delay compositor creation on Android to allow time for GPU process to launch. r=gfx-reviewers,geckoview-reviewers,aosmond,calu
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
2022-03-02 16:56:28 +00:00
..
CanvasManagerChild.cpp Bug 1746538 - Make PWebGPU managed by PCanvasManager. r=kvark 2022-02-02 20:49:23 +00:00
CanvasManagerChild.h Bug 1746538 - Make PWebGPU managed by PCanvasManager. r=kvark 2022-02-02 20:49:23 +00:00
CanvasManagerParent.cpp Bug 1746538 - Make PWebGPU managed by PCanvasManager. r=kvark 2022-02-02 20:49:23 +00:00
CanvasManagerParent.h Bug 1746538 - Make PWebGPU managed by PCanvasManager. r=kvark 2022-02-02 20:49:23 +00:00
CompositorOptions.h Bug 1739621 - Remove remaining UseAdvancedLayers() r=jrmuizel,gfx-reviewers,bradwerth 2021-11-07 12:44:53 +00:00
CompositorSession.cpp Bug 1741156 - Reinitialize compositor and request repaint after GPU process restart. r=aosmond,geckoview-reviewers,agi 2021-11-29 20:52:31 +00:00
CompositorSession.h Bug 1741156 - Reinitialize compositor and request repaint after GPU process restart. r=aosmond,geckoview-reviewers,agi 2021-11-29 20:52:31 +00:00
CompositorWidgetVsyncObserver.cpp Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert 2021-12-10 02:57:50 +00:00
CompositorWidgetVsyncObserver.h Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert 2021-12-10 02:57:50 +00:00
CrossProcessPaint.cpp Bug 1744468. Create a high quality scaling flag for cross process paint and propagate it to dependencies. r=emilio 2021-12-14 09:43:52 +00:00
CrossProcessPaint.h Bug 1744468. Create a high quality scaling flag for cross process paint and propagate it to dependencies. r=emilio 2021-12-14 09:43:52 +00:00
D3DMessageUtils.cpp
D3DMessageUtils.h
GfxMessageUtils.h Backed out 2 changesets (bug 1720965) for causing bustages on nsContentUtils.cpp. CLOSED TREE 2021-08-04 03:14:29 +03:00
GPUChild.cpp Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro 2022-02-18 15:59:12 +00:00
GPUChild.h Bug 1743454 - Ensure GPU process crash reports are generated regardless of which IPC actor dies first. r=aosmond 2021-12-08 19:08:17 +00:00
GPUParent.cpp Bug 1756775 Don't disable HW decoding directly on RDD level as we handle RDD crashes by MediaFormatReader r=alwu 2022-02-24 08:54:04 +00:00
GPUParent.h Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro 2022-02-18 15:59:12 +00:00
GPUProcessHost.cpp Backed out 10 changesets (bug 1752332) for bc failures on browser_preferences_usage.js 2022-02-23 20:43:01 +02:00
GPUProcessHost.h Bug 1754159 - Correctly wait for GPU process to be restarted in test. r=tnikkel 2022-02-08 12:06:15 +00:00
GPUProcessImpl.cpp Bug 1723505 - Convert IPC processes to GeckoArgs r=nika,kershaw 2021-10-26 19:42:03 +00:00
GPUProcessImpl.h
GPUProcessListener.h
GPUProcessManager.cpp Bug 1756700 - Delay compositor creation on Android to allow time for GPU process to launch. r=gfx-reviewers,geckoview-reviewers,aosmond,calu 2022-03-02 16:56:28 +00:00
GPUProcessManager.h Bug 1755381 - Avoid relaunching GPU process immediately on Android if app is in background. r=agi,aosmond 2022-02-22 15:59:13 +00:00
GraphicsMessages.ipdlh Bug 1751948 - Part 1: Fix IPDL unified build issues, r=ipc-reviewers,mccr8 2022-02-28 21:01:47 +00:00
InProcessCompositorSession.cpp Bug 1751425 - Add more pointer check around CompositorSession shutdown r=gfx-reviewers,lsalzman 2022-01-23 23:42:42 +00:00
InProcessCompositorSession.h Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel 2021-09-05 22:36:45 +00:00
moz.build Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi 2021-12-23 20:29:07 +00:00
PCanvasManager.ipdl Bug 1754978 - Part 2. Switch WebGPU to use async image pipelines for display. r=kvark 2022-02-18 15:59:13 +00:00
PGPU.ipdl Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro 2022-02-18 15:59:12 +00:00
PVsyncBridge.ipdl Bug 1751948 - Part 1: Fix IPDL unified build issues, r=ipc-reviewers,mccr8 2022-02-28 21:01:47 +00:00
RemoteCompositorSession.cpp Bug 1751425 - Add more pointer check around CompositorSession shutdown r=gfx-reviewers,lsalzman 2022-01-23 23:42:42 +00:00
RemoteCompositorSession.h
VsyncBridgeChild.cpp
VsyncBridgeChild.h
VsyncBridgeParent.cpp
VsyncBridgeParent.h
VsyncIOThreadHolder.cpp Bug 1726594 - Add some documentation about the purpose of VsyncIOThread. r=mstange 2021-08-19 16:35:32 +00:00
VsyncIOThreadHolder.h