Граф коммитов

1055 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 78afd0ab38 Bug 1760663 - Add blocklist support for WebGPU. r=gfx-reviewers,nical
This patch just adds the plumbing to allow for baked in blocklist rules
or the downloadable blocklist to prevent certain configurations from
getting WebGPU. It does not add any rules.

It also changes us from allowing WebGPU only in nightly, including
tests, to not release and not beta. This allows try to run the WebGPU
tests as expected, since even try builds forked from mozilla-central are
not considered nightly builds by CI (or so it seems).

Differential Revision: https://phabricator.services.mozilla.com/D141682
2022-03-22 15:22:39 +00:00
Florian Quèze 253d6198c8 Bug 1757202 - Make the inner window id of the browser window available in the compositor bridge, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D139730
2022-03-11 07:49:04 +00:00
Nicolas Silva 903c8589d6 Bug 1758156 - Check that the webgpu pref is enabled when creating PWebGPUParent. r=aosmond
A better solution would check against the same value as reported by gfxConfig, which takes the pref as well as whether webgpu was blocked (for example due to buggy drivers) into account, but this still is good sanity check and easy to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D140535
2022-03-10 10:32:34 +00:00
Lee Salzman 6f0be8c19f Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D139656
2022-03-10 09:24:15 +00:00
smolnar 97f77f8381 Backed out changeset 36c6350bc7d1 (bug 1757067) for causing build bustages in gfx/gl/GLBlitHelperD3D.cpp CLOSED TREE 2022-03-10 10:10:10 +02:00
Lee Salzman a664a6d305 Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D139656
2022-03-10 07:48:53 +00:00
Norisz Fay decb86e048 Backed out changeset fd02141cc64d (bug 1758156) for causing build bustages on CanvasManagerParent.obj CLOSED TREE 2022-03-09 16:16:12 +02:00
Nicolas Silva b429877313 Bug 1758156 - Check that the webgpu pref is enabled when creating PWebGPUParent. r=aosmond
A better solution would check against the same value as reported by gfxConfig, which takes the pref as well as whether webgpu was blocked (for example due to buggy drivers) into account, but this still is good sanity check and easy to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D140535
2022-03-09 13:05:34 +00:00
sotaro 7991ca6079 Bug 1757879 - Make SimulateDeviceReset() similar to actual device reset handling r=ipc-reviewers,gfx-reviewers,lsalzman,mccr8
SimulateDeviceReset() works differently from actual device reset handling. It seems better to make SimulateDeviceReset() more similar to actual device reset handling.

Differential Revision: https://phabricator.services.mozilla.com/D140161
2022-03-08 23:14:28 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
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
Cristian Tuns 956c714ac3 Backed out changeset 0946d4ce352f (bug 1756700) for causing geckoview crashes. CLOSED TREE 2022-03-01 18:11:55 -05:00
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
Nika Layzell 9e65eb911e Bug 1751948 - Part 1: Fix IPDL unified build issues, r=ipc-reviewers,mccr8
The changes in this patch stack will change how IPDL generated files are built,
such that these issues are now surfaced, especially during non-unified builds.

Differential Revision: https://phabricator.services.mozilla.com/D137165
2022-02-28 21:01:47 +00:00
stransky 9358067df4 Bug 1756775 Don't disable HW decoding directly on RDD level as we handle RDD crashes by MediaFormatReader r=alwu
Revert changes from Bug 1752493 as we handle RDD crashes on MediaFormatReader level.

Differential Revision: https://phabricator.services.mozilla.com/D139470
2022-02-24 08:54:04 +00:00
Narcis Beleuzu 6799f1b983 Backed out 10 changesets (bug 1752332) for bc failures on browser_preferences_usage.js
Backed out changeset 5c475692133f (bug 1752332)
Backed out changeset 7fb5f0cc44f6 (bug 1752332)
Backed out changeset e8b2a80aa796 (bug 1752332)
Backed out changeset 593e5e138927 (bug 1752332)
Backed out changeset a8832dc94d1b (bug 1752332)
Backed out changeset b10197a1ed67 (bug 1752332)
Backed out changeset 8de253223dbc (bug 1752332)
Backed out changeset be908bb7a985 (bug 1752332)
Backed out changeset 26796b527442 (bug 1752332)
Backed out changeset 1a875dc06058 (bug 1752332)
2022-02-23 20:43:01 +02:00
Tom Ritter dc362926e6 Bug 1752332: Remove the blocklisting check in ::OnPreferenceChange r=KrisWright
Now that we send everything (except sometimes the user value
is sanitized) we should no longer perform this check.

This is also good because it eliminates security code you
have to have (and thus accidently omitting it is a
vulnerability) and changes it to security code that happens
automatically, and is enforced by the compiler (via mandatory
ctor argument.)

Differential Revision: https://phabricator.services.mozilla.com/D138684
2022-02-23 15:31:10 +00:00
Tom Ritter 1c8c5ab5d0 Bug 1752332: Rename ShouldSyncPreference to ShouldSanitizePreference r=necko-reviewers,KrisWright,dragana
This simplifies the number of negations needed,
and makes things easy to understand.  I think
anyway; I know that without renaming it I made
several annoying-to-diagnose negation errors...

Differential Revision: https://phabricator.services.mozilla.com/D138682
2022-02-23 15:31:09 +00:00
Tom Ritter 69c064a961 Bug 1752332: Move ShouldSyncPreferences to Preferences module r=KrisWright
While we do so, also add a boolean argument to indicate
if we are in a _Content_ process or some other type of
subprocess, which I expect we will need later.

Differential Revision: https://phabricator.services.mozilla.com/D138681
2022-02-23 15:31:08 +00:00
Tom Ritter 46c1c370d7 Bug 1752332: Rename references to parent-only pref structures r=KrisWright
We're going to be using them in more contexts, so generalize
the name.

Differential Revision: https://phabricator.services.mozilla.com/D138680
2022-02-23 15:31:08 +00:00
Tom Ritter 62ea762c4d Bug 1752332: Add in a sanitize property for prefs, and only serialize the user value if we're not sanitized r=KrisWright
We want to eventually crash if a blocklisted preference
is accessed.  In order to do this, we do need to
populate the preference in the pref hashmap of the
subprocess; otherwise when we look up a blocklisted
pref we will just not find anything. We could try to
put the blocklist check at that point; but this won't
work for StaticPrefs; we'd also need to put the blocklist
check there.

Performing a list iteration and string comparison on
every Static Pref call is not acceptable when we can
just populate a bit and check it.

Differential Revision: https://phabricator.services.mozilla.com/D138679
2022-02-23 15:31:07 +00:00
Jamie Nicol 72a1b5cd91 Bug 1755381 - Avoid relaunching GPU process immediately on Android if app is in background. r=agi,aosmond
If the android system kills the GPU process to free memory while the
app is in the background, then we want to avoid immediately restarting
the GPU process.

To achieve this, we make GPUProcessManager keep track of whether it is
in the foreground or background. If HandleProcessLost() gets called
while in the background then we destroy the existing compositor
sessions as before, but return early instead of immediately
relaunching the process. If the process has not been launched when the
app later gets foregrounded then we do so then.

The final part of HandleProcessLost(), which reinitializes the content
bridges and emits the "compositor-reinitialized" signal, has been
moved to a new function ReinitializeRendering(). If the GPU process
has been disabled, this gets called as-before at the end of
HandleProcessLost(). When the GPU process is enabled, however, we now
call it from OnProcessLaunchComplete(), so that it gets called
regardless of whether the process is launched immediately or after a
delay.

While we're here, rename the functions RebuildRemoteSessions() and
RebuildInProcessSessions() to DestroyRemoteCompositorSessions() and
DestroyInProcessCompositorSessions(), to better reflect what they
actually do: the "rebuilding" part occurs later on. Also update the
mega-comment documenting the restart sequence, as it was somewhat
outdated.

In case a caller of EnsureGPUReady() gets called before the foreground
signal arrives (eg in nsBaseWidget::CreateCompositorSession() due to a
refresh tick paint), make EnsureGPUReady() launch the GPU process
itself if the GPU process is enabled but not yet launched. As a
consequence, to avoid launching the GPU process unnecessarily, change
a couple callers of EnsureGPUReady() to simply check whether the
process is enabled instead.

Additionally, guard against a null pointer deref if the compositor has
been destroyed when the widget receives a memory pressure event. This
is now more likely to occur as there may be a gap between the
compositor being destroyed and recreated.

Differential Revision: https://phabricator.services.mozilla.com/D139042
2022-02-22 15:59:13 +00:00
Andrew Osmond c18a944c15 Bug 1754978 - Part 2. Switch WebGPU to use async image pipelines for display. r=kvark
This patch removes more main thread dependencies from the content side
of WebGPU. Instead of issuing a resource update for an external image,
we now use an async image pipeline in conjunction with
CompositableInProcessManager from part 1. This allows us to update the
HTMLCanvasElement bound to the WebGPU device without having to go
through the main thread, or even the content process after the swap
chain update / readback has been requested.

Differential Revision: https://phabricator.services.mozilla.com/D138887
2022-02-18 15:59:13 +00:00
Andrew Osmond 45ae50555d Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro
For WebGPU, we produce the textures in the compositor process and the
content process doesn't need to be that involved except for hooking up
the texture to the display list. Currently this is done via an external
image ID.

Given that WebGPU needs to work with OffscreenCanvas, it would be best
if its display pipeline was consistent whether it was gotten from an
HTMLCanvasElement, OffscreenCanvas on the main thread, or on a worker
thread. As such, using an AsyncImagePipeline would be best.

However there is no real need to bounce the handles across process
boundaries. Hence this patch which adds CompositableInProcessManager.
This static class is responsible for collecting WebRenderImageHost
objects backed by TextureHost objects which do not leave the compositor
process. This will allow WebGPUParent to schedule compositions directly
in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D138588
2022-02-18 15:59:12 +00:00
Cosmin Sabou e0e7542556 Backed out 2 changesets (bug 1755381) for causing gtest failures on TestMediaDataDecoder.cpp. CLOSED TREE
Backed out changeset 255cda33f56e (bug 1755381)
Backed out changeset 2c55863fbccc (bug 1755381)
2022-02-18 16:40:08 +02:00
Jamie Nicol e0e12f120a Bug 1755381 - Avoid relaunching GPU process immediately on Android if app is in background. r=agi,aosmond
If the android system kills the GPU process to free memory while the
app is in the background, then we want to avoid immediately restarting
the GPU process.

To achieve this, we make GPUProcessManager keep track of whether it is
in the foreground or background. If HandleProcessLost() gets called
while in the background then we destroy the existing compositor
sessions as before, but instead of immediately relaunching the process
then reinitializing content bridges, just set a flag saying we need to
do so. If the flag is set when the app later gets foregrounded then we
continue where we left off.

While we're here, rename the functions RebuildRemoteSessions() and
RebuildInProcessSessions() to DestroyRemoteCompositorSessions() and
DestroyInProcessCompositorSessions(), to better reflect what they
actually do: the "rebuilding" part occurs later on. Also update the
mega-comment documenting the restart sequence, as it was somewhat
outdated.

In case a caller of EnsureGPUReady() gets called before the foreground
signal arrives (eg in nsBaseWidget::CreateCompositorSession() due to a
refresh tick paint), make EnsureGPUReady() launch the GPU process
itself if the GPU process is enabled but not yet launched.

Additionally, guard against a null pointer deref if the compositor has
been destroyed when the widget receives a memory pressure event. This
is now more likely to occur as there may be a gap between the
compositor being destroyed and recreated.

Differential Revision: https://phabricator.services.mozilla.com/D139042
2022-02-18 13:38:27 +00:00
Iulian Moraru 3dbfe82835 Backed out 2 changesets (bug 1754978) for causing valgrind bustages.
Backed out changeset 491a985fc34a (bug 1754978)
Backed out changeset 98983bf9eaed (bug 1754978)
2022-02-18 00:36:31 +02:00
Andrew Osmond a18bf8a50c Bug 1754978 - Part 2. Switch WebGPU to use async image pipelines for display. r=kvark
This patch removes more main thread dependencies from the content side
of WebGPU. Instead of issuing a resource update for an external image,
we now use an async image pipeline in conjunction with
CompositableInProcessManager from part 1. This allows us to update the
HTMLCanvasElement bound to the WebGPU device without having to go
through the main thread, or even the content process after the swap
chain update / readback has been requested.

Differential Revision: https://phabricator.services.mozilla.com/D138887
2022-02-16 22:23:20 +00:00
Andrew Osmond 23a67affe1 Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro
For WebGPU, we produce the textures in the compositor process and the
content process doesn't need to be that involved except for hooking up
the texture to the display list. Currently this is done via an external
image ID.

Given that WebGPU needs to work with OffscreenCanvas, it would be best
if its display pipeline was consistent whether it was gotten from an
HTMLCanvasElement, OffscreenCanvas on the main thread, or on a worker
thread. As such, using an AsyncImagePipeline would be best.

However there is no real need to bounce the handles across process
boundaries. Hence this patch which adds CompositableInProcessManager.
This static class is responsible for collecting WebRenderImageHost
objects backed by TextureHost objects which do not leave the compositor
process. This will allow WebGPUParent to schedule compositions directly
in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D138588
2022-02-16 22:23:19 +00:00
Jamie Nicol c6d9460241 Bug 1754766 - Ensure AndroidHardwareBuffer is initialized in GPU process. r=gfx-reviewers,aosmond
When the (off-by-default) pref webgl.enable-ahardwarebuffer is
enabled, we use AHardwareBuffers rather than SurfaceTextures for webgl
on Android. Some users have enabled this pref and their browser is now
crashing since the GPU process was enabled.

The crash occurs because we have not initialized the
AndroidHardwareBufferApi instance to load the NDK function
pointers. This is performed in gfxPlatform in the parent process, but
because the GPU process does not have a gfxPlatform we must do this in
GPUParent as well. We must also initialize the
AndroidHardwareBufferManager, as is done by gfxPlatform.

Differential Revision: https://phabricator.services.mozilla.com/D138463
2022-02-10 17:36:21 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
stransky 861cc27dcb Bug 1752493 Disable HW decoding in RDD process if we're asked so r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D138000
2022-02-09 07:29:31 +00:00
Nika Layzell 9919099425 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-02-08 23:53:45 +00:00
Jamie Nicol a01c2107a2 Bug 1754159 - Correctly wait for GPU process to be restarted in test. r=tnikkel
Bug 1742985 added the test helper_zoom_after_gpu_process_restart.html,
but it doesn't actually get run on any platform with the GPU process
enabled. (Due to bug 1495580 on windows, and because the GPU process
isn't yet enabled on android.)

The test kills the GPU process, then tries to wait for it to be
restarted before proceeding. However, the function
ensureGPUProcessReadyForTests doesn't always work as intended, as the
GPUProcessManager may not have yet noticed that the process has been
killed, and therefore may return immediately from EnsureGPUReady.

This patch removes the buggy ensureGPUProcessReadyForTests function,
and instead makes the test wait for the "compositor-reinitialized"
topic to be observed.

Differential Revision: https://phabricator.services.mozilla.com/D138125
2022-02-08 12:06:15 +00:00
Dan Minor 01831135cc Bug 1751936 - Update users of SharedPreferenceSerializer to pass ShouldSyncPreference; r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D137476
2022-02-07 16:44:18 +00:00
Jed Davis 8238831a2c Bug 1658474 - Remove the blocking mode of IPC's KillProcess function. r=mccr8,media-playback-reviewers,alwu,bryce
`base::KillProcess`, with the `wait` parameter set to true, does a
bounded blocking wait for the process to exit by polling and sleeping in
a loop, with ad-hoc parameters.  The only user of that case is the Gecko
Media Plugin code, which doesn't actually need it as discussed in bug
(comments 4-6); also, currently it's blocking the IPC I/O thread in the
parent process, which is not good for browser responsiveness.

Accordingly, this patch deletes that code and removes the parameter.

Differential Revision: https://phabricator.services.mozilla.com/D136662
2022-02-02 21:50:01 +00:00
Andrew Osmond 8f1c963ed3 Bug 1746538 - Make PWebGPU managed by PCanvasManager. r=kvark
Similar to PWebGL, we want PCanvasManager to manage the PWebGPU
protocol. This will allow us to reuse the machinery that works for both
the main thread, and arbitrary worker threads to create PWebGPU
protocols.

For now, the only owner is still the main thread, so it should work very
similarly as to how it does with PCompositorBridge.

This patch also introduces some quality of life changes, such as making
the protocol ref-counted, and avoiding respinning the wheel for
CanSend() for IPDL actors.

Differential Revision: https://phabricator.services.mozilla.com/D134097
2022-02-02 20:49:23 +00:00
Andrew Osmond 88238b2eed Bug 1751205 - Part 2. Ensure we y-flip surfaces with OffscreenCanvas if needed. r=gfx-reviewers,jgilbert
On the path that we need to read the pixels from the canvas for display
purposes, instead of using a platform buffer handle, we need to take
into account the need to y-flip for WebGL. This patch ensures that we do
so.

Differential Revision: https://phabricator.services.mozilla.com/D136504
2022-02-01 13:20:50 +00:00
Sandor Molnar 6035b5cf95 Backed out changeset ba6624225635 (bug 1738734) for causing build bustages in ipc/PUtilityProcessParent. 2022-02-01 00:57:12 +02:00
Nika Layzell c45d6350d4 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-01-31 22:26:05 +00:00
Norisz Fay beb556025c Backed out 2 changesets (bug 1751205) for causing multiple wpt failures on offscreencanvas.resize.html CLOSED TREE
Backed out changeset 70e5f13d08cc (bug 1751205)
Backed out changeset e97271d90795 (bug 1751205)
2022-01-28 09:14:15 +02:00
Andrew Osmond 162ffc6920 Bug 1751205 - Part 2. Ensure we y-flip surfaces with OffscreenCanvas if needed. r=gfx-reviewers,jgilbert
On the path that we need to read the pixels from the canvas for display
purposes, instead of using a platform buffer handle, we need to take
into account the need to y-flip for WebGL. This patch ensures that we do
so.

Differential Revision: https://phabricator.services.mozilla.com/D136504
2022-01-28 05:16:02 +00:00
Butkovits Atila c26eab5ff1 Backed out 2 changesets (bug 1751205) for causing failures at webgl-color-offscreen-test.html. CLOSED TREE
Backed out changeset 211ffc98eb32 (bug 1751205)
Backed out changeset 2a1e5a439a3b (bug 1751205)
2022-01-28 03:11:14 +02:00
Andrew Osmond b887b0e78c Bug 1751205 - Part 2. Ensure we y-flip surfaces with OffscreenCanvas if needed. r=gfx-reviewers,jgilbert
On the path that we need to read the pixels from the canvas for display
purposes, instead of using a platform buffer handle, we need to take
into account the need to y-flip for WebGL. This patch ensures that we do
so.

Differential Revision: https://phabricator.services.mozilla.com/D136504
2022-01-27 15:17:43 +00:00
sotaro 424a18bee9 Bug 1751425 - Add more pointer check around CompositorSession shutdown r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D136621
2022-01-23 23:42:42 +00:00
Jamie Nicol 01c1cad628 Bug 1742985 - Add more methods to nsIGfxInfo for GPU process testing. r=tnikkel
Add KillGPUProcessForTests, which kills the GPU process without
generating a crash dump (unlike the existing CrashGPUProcessForTests).

Additionally add EnsureGPUProcessReadyForTests, which returns a
promise that resolves to true when the GPU process is enabled and
ready, and false if it is disabled. If called while the GPU process is
being (re)started, it will not resolve until it has finished launching
(or was disabled due to error).

Finally, make GPUProcessHost::IsConnected check whether the process
handle is valid. This ensures it returns false immediately following a
call to KillProcess but prior to the GPUChild being destroyed. This
means tests can call EnsureGPUProcessReadyForTests immediately after
KillGPUProcessForTests or CrashGPUProcessForTests, and it will
reliably wait for the new process to launch, as intended.

Depends on D135207

Differential Revision: https://phabricator.services.mozilla.com/D135328
2022-01-07 13:27:49 +00:00
Jamie Nicol 97d7332500 Bug 1742985 - Ensure ZoomConstraints get refreshed after GPU process restart. r=tnikkel
Following a GPU process restart ZoomConstraints do not currently get
set for the newly recreated APZCTreeManagers, meaning it is no longer
possible to asynchronously zoom pages.

To solve this, we make ZoomConstraintsClient observe a new
"compositor-reinitialized" topic. We send this notification in
GPUProcessManager::HandleProcessLost() to notify
ZoomConstraintsClients for parent process documents, and in
ContentChild::RecvReinitRendering() for documents in their respective
content processes. This must be performed after the compositor has
been reinitialized so that the APZCTreeManagerChild is able to send
the constraints to the APZCTreeManagerParent in the compositor
process.

Differential Revision: https://phabricator.services.mozilla.com/D135207
2022-01-07 13:27:48 +00:00
Mike Hommey fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00