gecko-dev/gfx
Jamie Nicol b3781363fb 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-01 22:09:44 +00:00
..
2d Bug 1757189: Remove unneeded lock in FilterNodeLightingSoftware since we don't use OMTP r=mstange 2022-02-25 19:58:24 +00:00
angle Bug 1737313: Document what is needed to generate a preloaded depot_tools zip r=firefox-build-system-reviewers,glandium 2022-01-05 19:52:45 +00:00
cairo Bug 1322756 - Remove PostScript printing code. r=emilio 2021-12-30 11:41:28 +00:00
config Bug 1751987 [Linux] Add VA-API feature r=aosmond 2022-02-23 11:47:07 +00:00
docs Bug 1757011 - Unify some Moz2D documentation. r=gfx-reviewers,mstange 2022-02-26 18:54:49 +00:00
gl Bug 1755780 - Support CopyToSwapChain on WebGLContext. r=jgilbert 2022-02-21 17:33:09 +00:00
graphite2 Bug 1722127 - Modify rlbox graphite struct defs for windows compat r=tjr 2021-07-27 13:09:44 +00:00
harfbuzz Bug 1756664 - Update HarfBuzz to 3.4.0. r=jfkthame 2022-03-01 17:37:04 +00:00
ipc Bug 1756700 - Delay compositor creation on Android to allow time for GPU process to launch. r=gfx-reviewers,geckoview-reviewers,aosmond,calu 2022-03-01 22:09:44 +00:00
layers Bug 1756700 - Delay compositor creation on Android to allow time for GPU process to launch. r=gfx-reviewers,geckoview-reviewers,aosmond,calu 2022-03-01 22:09:44 +00:00
ots Bug 1748352 - Update OTS to 8.2.1. r=jfkthame 2022-01-03 23:11:47 +00:00
qcms Bug 1729539 - Hit MOZ_CRASH(assertion failed: y2 > 1. / 12. && y2 <= 1.) at gfx/qcms/src/iccread.rs:1392. r=jrmuizel 2021-09-17 17:41:26 +00:00
skia Bug 1747272 - Apply current color when rasterizing glyphs from color fonts in Skia using Core Text. r=lsalzman 2022-02-01 21:41:17 +00:00
src Bug 1755737 - Make layout.css.dpi a static pref. r=jfkthame,layout-reviewers 2022-02-16 21:13:58 +00:00
tests Bug 1757002 - Fix incorrect scaling of large surfaces r=gfx-reviewers,aosmond 2022-02-28 23:22:11 +00:00
thebes Bug 1756720 - When using legacy MS Symbol fonts, map character codes from the U+00xx range to the PUA range U+F0xx found in the cmap subtables. r=emilio 2022-03-01 15:22:56 +00:00
vr Bug 1751948 - Part 4: Correctly initialize OtherPid() for in-process actors, r=ipc-reviewers,mccr8 2022-02-28 21:01:48 +00:00
webrender_bindings Bug 1757111 - Report cropped YCbCr sizes in RenderExternalTextureHost. r=jrmuizel 2022-02-26 21:12:35 +00:00
wgpu_bindings Bug 1755503 - Support recording wgpu traces for multiple instances. r=kvark" 2022-02-16 19:04:20 +00:00
wr Bug 1757201 - Fix mix-blend mode on parent surfaces with snapping enabled r=gfx-reviewers,lsalzman 2022-03-01 21:01:40 +00:00
ycbcr Bug 1750858 - Respect mPicSize in WebRender. r=sotaro 2022-02-22 17:56:30 +00:00
metrics.yaml Bug 1746941 - Add tags to all Firefox-on-Glean metrics r=janerik 2022-01-14 18:11:08 +00:00
moz.build Bug 1722653 - Remove --enable-system-cairo. r=firefox-build-system-reviewers,jrmuizel,andi 2021-07-29 23:38:30 +00:00