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

1008 Коммитов

Автор SHA1 Сообщение Дата
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
Florian Quèze b3f6a2759b Bug 1745444 - Replace the arbitrary values in RecvTestTriggerMetrics with the PROCESS_TYPE_ constants, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D133509
2021-12-15 22:18:33 +00:00
Florian Quèze 9e59876bd7 Bug 1745444 - Merge TestTriggerGPUMetrics and TestTriggerRDDMetrics into a method taking a process type as parameter, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D133508
2021-12-15 22:18:32 +00:00
Narcis Beleuzu b80b92e2e1 Backed out 4 changesets (bug 1745444) for GTest failures on IHistory.Test . CLOSED TREE
Backed out changeset b3a2dc754e16 (bug 1745444)
Backed out changeset 7b9d52dff930 (bug 1745444)
Backed out changeset 15d9a79cc305 (bug 1745444)
Backed out changeset 497572ee54af (bug 1745444)
2021-12-15 20:50:24 +02:00
Florian Quèze d18524b702 Bug 1745444 - Replace the arbitrary values in RecvTestTriggerMetrics with the PROCESS_TYPE_ constants, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D133509
2021-12-15 16:27:57 +00:00
Florian Quèze e665115136 Bug 1745444 - Merge TestTriggerGPUMetrics and TestTriggerRDDMetrics into a method taking a process type as parameter, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D133508
2021-12-15 16:27:57 +00:00
Timothy Nikkel 4f1ce8a4a8 Bug 1744468. Create a high quality scaling flag for cross process paint and propagate it to dependencies. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133566
2021-12-14 09:43:52 +00:00
Andrew Osmond 663576a9e6 Bug 1736177 - Part 9. Add plumbing to snapshot worker canvas contexts from the main thread. r=jgilbert,ipc-reviewers,nika
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.

This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.

This will be used for Firefox screenshots, New Tab tiles, and printing.

Differential Revision: https://phabricator.services.mozilla.com/D130785
2021-12-10 02:57:55 +00:00
Andrew Osmond c439ab6cd3 Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-10 02:57:50 +00:00
Csoregi Natalia 1c7cae16d7 Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond 8077b44a0c Bug 1736177 - Part 9. Add plumbing to snapshot worker canvas contexts from the main thread. r=jgilbert,ipc-reviewers,nika
Right now, if we wanted to get a snapshot of an OffscreenCanvas context
on a worker thread from the main thread, we would need to block the main
thread on the worker thread, and from the worker thread, issue a sync
IPC call get the front buffer snapshot.

This patch adds an alternative which allows the main thread to go
directly to the canvas owning thread in the compositor process to get
the snapshot, thereby bypassing the worker thread in content process
entirely. All it needs as the unique ID of the CanvasManagerChild
instance, and the protocol ID of the WebGLChild instance.

This will be used for Firefox screenshots, New Tab tiles, and printing.

Differential Revision: https://phabricator.services.mozilla.com/D130785
2021-12-09 19:25:28 +00:00
Andrew Osmond 9788a2fa0a Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-09 19:25:23 +00:00
Jamie Nicol 3e2edea9fd Bug 1743454 - Add junit test to ensure GPU process crash triggers GeckoView crash reporter. r=agi,aosmond
Add a function to GPUProcessManager to force the GPU process to crash,
and expose it through gfxInfo. Expose this to geckoview tests via the
test-support webextension.

Add a junit test GpuCrashTest, which triggers a GPU process crash and
ensures the crash reporter was notified.

Additionally, ensure the TestCrashHandler service is stopped in
between tests, as otherwise only the first crash test to run will be
notified of the crash.

Differential Revision: https://phabricator.services.mozilla.com/D132812
2021-12-08 19:08:17 +00:00
Jamie Nicol 3fcda9ab4f Bug 1743454 - Ensure GPU process crash reports are generated regardless of which IPC actor dies first. r=aosmond
GPU process crash reports are handled by calling GenerateCrashReport()
in GPUChild::ActorDestroy() if the reason is AbnormalShutdown. This
ensures we only create crash report if the process actually crashed,
and not when it was deliberately stopped.

However, sometimes actors other than GPUChild are the first to be
destroyed immediately after a crash, for example CompositorBridgeChild
or UiCompositorControllerChild. If such an actor receives an
ActorDestroy message with AbnormalShutdown as the reason, they will
call GPUProcessManager::NotifyRemoteActorDestroyed(), which leads to
GPUProcessHost::Shutdown(), which will close the PGPU channel. This
creates a race condition after a GPU process crash, where sometimes
the channel gets closed gracefully and ActorDestroy will receive a
NormalShutdown reason rather than AbnormalShutdown.

This patch adds a flag to GPUProcessHost::Shutdown() indicating
whether it is being called in response to an unexpected shutdown being
detected by another actor. If set, it sets a flag on the
GPUChild. When GPUChild::ActorDestroy() eventually gets called, it
knows to act in response to a crash if either the reason is
AbnormalShutdown or this flag has been set.

Differential Revision: https://phabricator.services.mozilla.com/D132811
2021-12-08 19:08:17 +00:00
Jamie Nicol e8bce5ff6b Bug 1743454 - Notify GeckoView crash handler of GPU process crashes. r=agi,aosmond
Rename ContentCrashHandler.jsm to ChildCrashHandler.jsm as it is now
responsible for all types of child process crashes. Have it observe
"compositor:process-aborted" in addition to
"ipc:content-shutdown". Additionally, rename the
"GeckoView:ContentCrashReport" event it sends to
"GeckoView:ChildCrashReport".

In GPUChild::ActorDestroy, provide an out variable for
GenerateCrashReport to return the dump ID, and stuff this in to a
property bag, along with "abnormal: true", sent to
"compositor:process-aborted" observers.

In ChildCrashHandler, set the "processType" argument sent with the
GeckoView:ChildCrashReport event to BACKGROUND_CHILD for GPU process
crashes, and FOREGROUND_CHILD otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D132810
2021-12-08 19:08:16 +00:00
Chris H-C 9018ab0bb7 Bug 1729026 - Test that GPU-process FOG metrics work r=Dexter,nical
Differential Revision: https://phabricator.services.mozilla.com/D132406
2021-12-01 14:35:08 +00:00
Chris H-C 217e25cfa5 Bug 1729026 - Add support for GPU-process Glean metrics via FOG r=Dexter,nical
Differential Revision: https://phabricator.services.mozilla.com/D124840
2021-12-01 14:35:08 +00:00
Jamie Nicol b05f9a5138 Bug 1741156 - Initialize FreeType library in GPU process on Android. r=aosmond
In order to render text using Skia (as webrender does for blob images)
we must ensure that the Freetype library has been initialized. In the
parent process this is done by gfxPlatform, but the GPU process does
not have a gfxPlatform so we should do so in GPUParent instead. We
already did this on Gtk, but this patch makes us do so on Android too.

Differential Revision: https://phabricator.services.mozilla.com/D131233
2021-11-29 20:52:32 +00:00
Jamie Nicol 0155e30e96 Bug 1741156 - Reinitialize compositor and request repaint after GPU process restart. r=aosmond,geckoview-reviewers,agi
This patch ensures that, following a GPU process crash, we
re-initialize the compositor and resume painting on Android.

nsWindow::GetWindowRenderer() is made to always reinitialize the
window renderer if there is none, like on other platforms. We
therefore no longer need to track whether webrender is being disabled,
as this is no longer a special case.

Previously we started the compositor as initially paused in
nsBaseWidget::CreateCompositorSession only if the widget did not yet
have a surface. Now we must unconditionally (re)start it as initially
paused, as even though the widget in the parent process may have a
surface, we will not have been able to send it to the GPU process
yet. We will send the surface to the compositor once control flow
returns to nsWindow::CreateLayerManager, where we will also now resume
the compositor if required.

Finally, we must ensure that we manually trigger a paint, both in the
parent and content processes. On other platforms this occurs
automatically following a GPU process loss through various refresh
driver events. On Android, however, nothing causes the refresh driver
to paint by itself, and we cannot receive input without first
initializing our APZ controllers, which does not happen until the
compositor receives a display list. We therefore must manually
schedule a paint. We do so from nsWindow::NotifyCompositorSessionLost
for the parent process, and BrowserChild::ReinitRendering for content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D131232
2021-11-29 20:52:31 +00:00
Jamie Nicol a9dd0d2943 Bug 1741156 - Initial GPU process implementation on Android. r=aosmond,agi
Declare a GPU process and corresponding Service in the
AndroidManifest. This is of a new class GeckoServiceGpuProcess which
inherits from GeckoServiceChildProcess, and provides a binder
interface ICompositorSurfaceManager which allows the parent process to
set the compositor Surface for a given widget ID, and the compositor
in the GPU process to look up the Surface for a widget ID. The
ICompositorSurfaceManager interface is exposed to the parent process
through a new method getCompositorSurfaceManager() in the
IChildProcess interface.

Add a new connection type for GPU processes to GeckoProcessManager,
along with a function to look up the GPU process connection and fetch
the ICompositorSurfaceManager binder. When the GPU process is launched
we store the returned binder in the GPUProcessHost, and when each
widget's compositor is created we store a reference to the binder in
the UiCompositorControllerChild.

Each nsWindow is given a unique ID, and whenever the Surface changes
due to an Android resume event, it sends the new surface for that ID
to the GPU process (if enabled) by calling
ICompositorSurfaceManager.onSurfaceChanged().

Stop inheriting AndroidCompositorWidget from InProcessCompositorWidget
and instead inherit from CompositorWidget directly. This class holds a
reference to the Surface that will be rendered in to. The
CompositorBridgeParent notifies the CompositorWidget whenever it has
been resumed, allowing it to fetch the new Surface. For the
cross-process CompositorWidgetParent implementation it fetches that
Surface from the CompositorSurfaceManagerService, whereas the
InProcessAndroidCompositorWidget can read it directly from the real
widget.

AndroidCompositorWidget::GetClientSize() can now calculate its size
from the Surface, rather than racily reading the value from the
nsWindow. This means RenderCompositorEGL and RenderCompositorOGLSWGL
can now use GetClientSize() again rather than querying their own size
from the Surface.

With this patch, setting layers.gpu-process.enabled to true will cause
us to launch a GPU process and render from it. We do not yet
gracefully recover from a GPU process crash, nor can we render
anything using SurfaceTextures (eg video or webgl). Those will come in
future patches.

Differential Revision: https://phabricator.services.mozilla.com/D131231
2021-11-29 20:52:31 +00:00
Nika Layzell c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
Jamie Nicol 8c1de22fbf Bug 1340301 - Ensure APZ functions are called from correct threads on Android with GPU process. r=botond
On Android the APZ controller thread is the android UI thread, rather
than the Gecko main thread as on other platforms. There some places
where the main thread requires to call IAPZCTreeManager functions that
must run on the controller thread. Currently we use the function
DispatchToControllerThread() prior to calling various IAPZCTreeManager
APIs to achieve this.

This works just fine for now, as there is no GPU process on
Android. However, once we do add a GPU process we will encounter
issues:

Firstly, there will now be a cross-process APZInputBridge rather than
using an in-process APZCTreeManager. The PAPZInputBridge protocol is
managed by PGPU, and therefore must run on the main thread in the
parent process. The input we require to send over the bridge, however,
originates from the UI thread.

To solve this we can convert PAPZInputBridge to a top-level protocol,
and bind it to the UI thread on Android. We can then send input
directly from the UI thread without issues.

Secondly, the PAPZCTreeManager protocol must also run from the main
thread in the parent process, as it is managed by
PCompositorBridge. Unlike PAPZInputBridge we cannot convert
PAPZCTreeManager in to a top level protocol, as it relies on the
ordering guarantees with PCompositorBridge.

We must therefore ensure that we only dispatch IAPZCTreeManager calls
to the controller thread when using an in-process
APZCTreeManager. Out-of-process calls, on the other hand, must be
dispatched to the main thread where we can send IPDL commands from. To
do this, we move the dispatch logic away from the callsites of
IAPZCTreeManager APIs, and in to the APZCTreeManager and
APZCTreeManagerChild implementations themselves.

Differential Revision: https://phabricator.services.mozilla.com/D131120
2021-11-20 09:49:14 +00:00
sotaro 0601c71c81 Bug 1742017 - include CompositorWidget.h before #ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING r=gfx-reviewers,jrmuizel
We need to include "mozilla/widget/CompositorWidget.h" before "#ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING",

Differential Revision: https://phabricator.services.mozilla.com/D131575
2021-11-19 02:44:22 +00:00
sotaro dc41fd6a96 Bug 1740673 - Ensure d3d device re-creation before sessions re-creation in GPUProcessManager::OnInProcessDeviceReset() r=nical,gfx-reviewers
Current code is not explicit about device recreation before session re-creation. It is actually done by nsWindow::OnPaint() before OnInProcessDeviceReset() call. But it is not explicit.

gfxWindowsPlatform::HandleDeviceReset() does d3d device re-creation if it is necessary.

Differential Revision: https://phabricator.services.mozilla.com/D130957
2021-11-16 08:25:09 +00:00
Andrew Osmond 925d668db0 Bug 1739996 - Select compositor or renderer thread for WebGL OOP depending on threadsafe GL status. r=jgilbert
If GL is threadsafe, we can run on the compositor thread. This appears
to have performance benefits, possibly because the renderer thread is
too busy. If GL is not threadsafe, we must run the WebGL OOP instances
on the renderer thread.

At the time of writing, only the nouveau drivers on Linux are considered
to be not threadsafe, so most users will see WebGL running on the
compositor thread. This patch also adds prefers to override the
blocklist to either assume GL is threadsafe
(webgl.threadsafe-gl.force-enabled) and not threadsafe
(webgl.threadsafe-gl.force-disabled).

Differential Revision: https://phabricator.services.mozilla.com/D130634
2021-11-09 17:33:46 +00:00
sotaro bf1f700f2b Bug 1739621 - Remove remaining UseAdvancedLayers() r=jrmuizel,gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D130467
2021-11-07 12:44:53 +00:00
Andrew Osmond cdc239b74f Bug 1734649 - Part 2. Create PCanvasManager to manage WebGL instances. r=jrmuizel
This patch adds the necessary IPDL plumbing to allow us to create WebGL
instances off the main thread in the content process, and to execute
them on the Renderer thread in the compositor process.

Differential Revision: https://phabricator.services.mozilla.com/D127839
2021-11-04 16:29:44 +00:00
Alexandre Lissy 4e04ec89a3 Bug 1723505 - Convert IPC processes to GeckoArgs r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123186
2021-10-26 19:42:03 +00:00
Marian-Vasile Laza f8576fec48 Backed out changeset fe716ee1a126 (bug 1723505) for causing build bustages. CLOSED TREE 2021-10-26 20:45:47 +03:00
Alexandre Lissy 14420a3ffc Bug 1723505 - Convert IPC processes to GeckoArgs r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123186
2021-10-26 17:14:13 +00:00
stransky ae61be975d Bug 1733680 [Linux] Check mGPUChild at GPUProcessManager::SimulateDeviceReset(), r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D127317
2021-10-15 17:51:26 +00:00
Dzmitry Malyshau 45b533e45e Bug 1725854 - Check for the WebGPU pref before initializing the GPU process IPC side r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D125130
2021-09-14 17:48:03 +00:00
Matt Woodrow d41e38aec0 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Matt Woodrow b8eef01e83 Bug 1708403 - Make resetting of scroll position for drawSnapshot opt-in. r=mstange,kmag
Differential Revision: https://phabricator.services.mozilla.com/D117613
2021-08-25 20:49:18 +00:00
criss bccf559d4b Backed out changeset 8868fe82dafd (bug 1708403) for causing failures on test_drawSnapshot_fixed.html. CLOSED TREE 2021-08-25 04:08:24 +03:00
Matt Woodrow bb02f9029f Bug 1708403 - Make resetting of scroll position for drawSnapshot opt-in. r=mstange,kmag
Differential Revision: https://phabricator.services.mozilla.com/D117613
2021-08-25 00:21:01 +00:00
Jeff Muizelaar 84d6f5a30c Bug 1726594 - Add some documentation about the purpose of VsyncIOThread. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D123136
2021-08-19 16:35:32 +00:00
Matt Woodrow 2cd0480476 Bug 1726063 - Remove support for non-WR compositor initialization. r=jrmuizel,aosmond
Depends on D122796

Differential Revision: https://phabricator.services.mozilla.com/D122798
2021-08-17 23:19:44 +00:00
Bob Owen b18cd4ec5a Bug 1698946 p3: Change existing code to use DWriteSettings. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D120598
2021-08-05 09:13:11 +00:00
Bob Owen b81850a8d7 Bug 1698946 p1: Add and maintain ClearType parameters gfxVars. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D120596
2021-08-05 09:13:09 +00:00
Marian-Vasile Laza e954091acf Backed out 2 changesets (bug 1720965) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 2ed56ddce45a (bug 1720965)
Backed out changeset 3531708ab54e (bug 1720965)
2021-08-04 03:14:29 +03:00
Jeff Gilbert fba93f87af Bug 1720965 - Give up on move semantics for Shmem for now. r=nika
Don't pretend that it's not a copy, as this causes readers to get the
wrong impression of how it behaves.

Differential Revision: https://phabricator.services.mozilla.com/D120124
2021-08-03 20:06:55 +00:00
Mike Hommey 03223f9ea4 Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi
Differential Revision: https://phabricator.services.mozilla.com/D121066
2021-07-29 23:38:31 +00:00
Hiroyuki Ikezoe 46e955a096 Bug 1722673 - Add a null check for the current WindowGlobalParent in QueuePaint(). r=emilio
This may be another source of failing OOP iframe document print. I will try to
see whether it can be reproducible locally later.

Differential Revision: https://phabricator.services.mozilla.com/D121075
2021-07-28 21:00:32 +00:00
Hiroyuki Ikezoe a5ecf77776 Bug 1695806 - Defer sending a snapshot reqeust for remote process iframe until cloning the iframe document finished. r=mattwoodrow,nika
Differential Revision: https://phabricator.services.mozilla.com/D119950
2021-07-27 00:47:44 +00:00
Florian Quèze df151e59a2 Bug 1719218 - Remove the need for MOZ_GECKO_PROFILER ifdefs in code using ChildProfilerController, r=gerald,necko-reviewers,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119132
2021-07-08 16:20:10 +00:00
Florian Quèze 673e38408d Bug 1719218 - Build ProfilerParent even when MOZ_GECKO_PROFILER is not defined, r=gerald,necko-reviewers,nika,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119131
2021-07-08 16:20:08 +00:00
Jeff Gilbert afdbf9538b Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-25 19:16:22 +00:00