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

16395 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez c9d4405306 Bug 1743310 - Remove paint flashing. r=gfx-reviewers,lsalzman
It's only meaningfully read in two places:

 * WebRender fallback code.
 * Some widget DEBUG-only code, which on Linux is ifdef'd and on Windows does
   some rather sketchy things like sleeping for 30ms

So I think it should be ok to remove, since WR fallback has its own flashing
pref as well, IIUC.

Differential Revision: https://phabricator.services.mozilla.com/D132313
2021-11-30 11:46:08 +00:00
sotaro 9b09f5455b Bug 1743325 - Remove data update handling of TextureHost r=gfx-reviewers,bradwerth
The update handling is done by WebRender now.

Differential Revision: https://phabricator.services.mozilla.com/D132324
2021-11-30 01:49:28 +00:00
mleclair b50fdd0fa5 Bug 1723233 - Check if messages were seen before notifying layer transforms r=hiro
***

***
Bug 1723233 - Changed nsTArray to CopyableTArray

***
Bug 1723233: moved mLastMessage check inside the lock since we call SendSubtreeTransformsToChromeMainThread from different threads

***
lint fix

Differential Revision: https://phabricator.services.mozilla.com/D131971
2021-11-29 23:48:01 +00:00
Jamie Nicol 48dce152a0 Bug 1741156 - Ensure deliberate CompositorSession shutdown doesn't take down GPU process. r=aosmond
When certain IPDL actors owned by the CompositorSession are destroyed,
such as CompositorBridgeChild or UiCompositorControllerChild, we call
GPUProcessManager::NotifyRemoteActorDestroyed() to notify the GPU
process manager that the connection to the GPU process has been lost,
causing it to restart or disable the GPU process.

To avoid doing this when the compositor session has been deliberately
destroyed (which occurs whenever a tab is closed on android, as each
tab has its own widget) we give each actor a "process token". This
token gets cleared when the actor is deliberately destroyed, and we
only notify the GPU process manager in ActorDestroy if the process
token is still set.

During an old refactoring of UiCompositorControllerChild, the
deliberate clearing of the process token was removed. This hasn't been
an issue up until now, as UiCompositorControllerChild is only created
on Android and there has been no GPU process on Android. However, with
the GPU process being implemented in this patch series, we now run in
to this issue: whenever a tab is closed we accidentally bring down the
GPU process.

This patch makes it so that we clear the process token once again in
UiCompositorControllerChild::Destroy, preventing us from accidentally
tearing down the GPU process.

Differential Revision: https://phabricator.services.mozilla.com/D131234
2021-11-29 20:52:32 +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
sotaro 16c99bafe0 Bug 1743319 - Update WrapWithWebRenderTextureHost() r=gfx-reviewers,aosmond
LayersBackend should be always LayersBackend::LAYERS_WR now.

Differential Revision: https://phabricator.services.mozilla.com/D132315
2021-11-29 15:04:16 +00:00
sotaro a7e5110c2a Bug 1743332 - Remove MaybeNotifyUnlocked() r=gfx-reviewers,aosmond
MaybeNotifyUnlocked() is not used.

Differential Revision: https://phabricator.services.mozilla.com/D132325
2021-11-29 15:03:43 +00:00
Doug Thayer 6e1905eb5e Bug 1743304 - Semi-reduntantly propagate raster space inheritance in gecko r=gw
So, it turns out I didn't fully test the patch from bug 1740262 after I made my
final changes to it. A change that I had in the patch which I thought was
unnecessary, because it didn't fix the problem by itself, turns out to in fact
be necessary. It turns out we still need to inherit the parent stacking
context's `mRasterizeLocally` value inside gecko, or else we could have scale
changes which get dropped on the WebRender side. I do think long term WebRender
should handle all of this itself, because I believe there are still potential
issues lurking here when we start to think of this across the process boundary,
but I don't think I'm the right person right now to untangle everything to
cleanly move everything necessary into WebRender, so I think the solution for
right now is to have Gecko somewhat but not entirely reduntantly handle raster
space inheritance itself, in addition to WebRender handling raster space
inheritance in order to partially cover the process boundary case. This is not
a pretty solution, but as far as I can tell it fixes the issues that bug
1730710 introduced without regressing the performance back to pre-1730710
levels.

Differential Revision: https://phabricator.services.mozilla.com/D132308
2021-11-28 21:47:04 +00:00
sotaro d184dc0218 Bug 1742739 - Remove HasIntermediateBuffer r=gfx-reviewers,jnicol
HasIntermediateBuffer is always false. It could be removed.

Differential Revision: https://phabricator.services.mozilla.com/D131996
2021-11-28 11:40:16 +00:00
Andrew Osmond 72d1c14b24 Bug 1711061 - Part 13. Remove the now unused ImageContainer and related code for images. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126606
2021-11-27 11:47:40 +00:00
Andrew Osmond af4570762c Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-11-27 11:47:40 +00:00
Andrew Osmond f0d93233dc Bug 1711061 - Part 7. Remove support for ImageContainer-based SVG image blob recordings. r=tnikkel
This will be replaced by a WebRenderImageProvider-based implementation
in a later part in this series.

Differential Revision: https://phabricator.services.mozilla.com/D126600
2021-11-27 11:47:38 +00:00
Botond Ballo bdf79a76ec Bug 1742919 - Protect the access to mState in AsyncPanZoomController::IsAutoscroll() with the APZC lock. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D132283
2021-11-26 23:29:12 +00:00
Botond Ballo 9e7f27ffdd Bug 1743006 - Tweak fuzz value for subframe-scrollbar-zoomed-out-async-scroll.html. r=tnikkel
Needed to account for differences between native and non-native
scrollbar themes.

Differential Revision: https://phabricator.services.mozilla.com/D132282
2021-11-26 23:27:19 +00:00
sotaro 6c738a6ce0 Bug 1742767 - Revive UnbindTextureSource() r=gfx-reviewers,mstange
UnbindTextureSource() was removed by mistake. UnbindTextureSource() is necessary to call ReadUnlock().

Differential Revision: https://phabricator.services.mozilla.com/D132029
2021-11-24 22:06:48 +00:00
Iulian Moraru fbf631ae6a Backed out changeset 8ba9fccd412c (bug 1723233) for causing ThreadSanitizer failures on nsTArray.h. CLOSED TREE 2021-11-25 00:10:13 +02:00
mleclair 19eb68c48d Bug 1723233 - Check if messages were seen before notifying layer transforms r=hiro
***

***
Bug 1723233 - Changed nsTArray to CopyableTArray

Differential Revision: https://phabricator.services.mozilla.com/D131971
2021-11-24 20:42:26 +00:00
Brad Werth 66e6f8cdeb Bug 1741982: Restructure NativeLayerCA to handle video only updates without a transaction. r=mstange
This reduces our demands on the Core Animation compositor.

Differential Revision: https://phabricator.services.mozilla.com/D131665
2021-11-24 18:07:41 +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
Nika Layzell 26555d958a Bug 1734739 - Part 1: Stop requiring otherpid for ShareTo, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128218
2021-11-24 17:56:00 +00:00
Florian Quèze 140bc1b4da Bug 1742722 - Move CompositorScreenshot markers to the main thread, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D131985
2021-11-24 10:47:59 +00:00
Botond Ballo 0c9fe4b325 Bug 1742254 - Decrease the size of the scrollable rect of the subframe in subframe-scrollbar-zoomed-out-async-scroll.html. r=tnikkel
On Android, there is no lower bound on the length of the scroll thumb,
and the dimensions of the subframe in this test were such that the
thumb was barely a speck on the screen, making the test not very useful.

Differential Revision: https://phabricator.services.mozilla.com/D131990
2021-11-24 05:24:56 +00:00
Nika Layzell e8759da1c8 Bug 1734735 - Part 6: Remove dead TextureSync code, r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D128215
2021-11-23 16:15:22 +00:00
Botond Ballo edcc681993 Bug 1634763 - In non-Fission mode, downgrade the assertion about the result of the WebRender display list being consistent with the APZ scroll data to non-fatal. r=tnikkel
This assertion is known to affect some scenarios involving inactive
scroll frames (see comment 10-11 in this bug). In Fission mode, this
is resolved by making all scroll frames active. In non-Fission mode,
we don't plan to pursue a specific fix so downgrade the assertion
to avoid annoyance for users running debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D131886
2021-11-23 08:02:58 +00:00
Botond Ballo ee4775f3ed Bug 1705412 - Fix intermittent failure of helper_click_interrupt_animation.html. r=tnikkel
As in helper_visual_scrollbars_pagescroll.html, this test performs a
native click on a scrollbar track and needs to wait for the resulting
scroll animation to be kicked off. This fix ensures it waits long
enough.

Differential Revision: https://phabricator.services.mozilla.com/D131885
2021-11-23 07:53:36 +00:00
Botond Ballo 7b344635da Bug 1705343 - Fix intermittent failure of helper_visual_scrollbars_pagescroll. r=tnikkel
The test synthesizes a native mouse click on the scrollbar track and then
wants to wait for the scroll animation that triggers to complete, but its
method for waiting was racy and sometimes didn't wait long enough.

Differential Revision: https://phabricator.services.mozilla.com/D131880
2021-11-23 03:27:21 +00:00
Hiroyuki Ikezoe 26f550200e Bug 1742495 - Drop ScrollOrigin argument from ScrollToCSSPixelsApproximate. r=botond
And rename the function to ScrollToCSSPixelsForApz.

Differential Revision: https://phabricator.services.mozilla.com/D131854
2021-11-23 02:05:33 +00:00
sotaro 44ff20fb9f Bug 1742052 - Remove unused code around TextureHost r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D131701
2021-11-22 09:49:59 +00:00
Botond Ballo 55a826a9ef Bug 1740411 - Remove EventRegions. r=hiro
Depends on D131689

Differential Revision: https://phabricator.services.mozilla.com/D131690
2021-11-22 05:34:14 +00:00
Botond Ballo 7b896782da Bug 1740411 - Remove WebRenderLayerScrollData::mEventRegions. r=hiro
Depends on D131688

Differential Revision: https://phabricator.services.mozilla.com/D131689
2021-11-22 05:34:14 +00:00
Botond Ballo 5a45747aa4 Bug 1740411 - Remove code to set event regions in gtests. r=hiro
This code has been a no-op (in the sense that no one was looking
at the event regions) for Internal/Mock tests since bug 1731700,
and for other tests since bug 1682180.

Depends on D131687

Differential Revision: https://phabricator.services.mozilla.com/D131688
2021-11-22 05:34:13 +00:00
Botond Ballo e3c6450172 Bug 1740411 - Port APZEventRegionsTesterMock.Obscuration to mochitest. r=hiro
As in the previous patches, this wasn't testing anything useful.

Depends on D131686

Differential Revision: https://phabricator.services.mozilla.com/D131687
2021-11-22 05:34:13 +00:00
Botond Ballo 750425ccfe Bug 1740411 - Port APZEventRegionsTester.Bug1119497 to mochitest. r=hiro
As in the previous patch, this test wasn't testing anything useful
in its current form.

Depends on D131685

Differential Revision: https://phabricator.services.mozilla.com/D131686
2021-11-22 05:34:13 +00:00
Botond Ballo 3c96a707df Bug 1740411 - Port APZHitTestingTester.HitTestingRespectsScrollClip_Bug1257288 to mochitest. r=hiro
The test also has not been testing anything useful since bug 1682180
(it should have been a "LayersOnly"), but it's also not a good fit
for MockHitTester since it wants to test the hit test itself.

In mochitest form, it can exercise the scenario from bug 1257288
with the production WebRender hit testing codepath.

Depends on D131684

Differential Revision: https://phabricator.services.mozilla.com/D131685
2021-11-22 05:34:12 +00:00
Botond Ballo 0ddced9cd0 Bug 1740411 - Port APZ gtests which use EventRegions to MockHitTester. r=hiro
The fact that they are using EventRegions suggests that they only
passed by accident with the default hit-tester (which is WRHitTester
taking an early exit to target the root, since WebRender isn't
actually running), rather than testing the scenario they are intended
to test.

This is actually a latent bug that was introduced in bug 1682180,
when these tests were incorrectly excluded from the "LayersOnly"
subclasses because they happened to pass with the WebRender
early-exit codepath.

Depends on D131683

Differential Revision: https://phabricator.services.mozilla.com/D131684
2021-11-22 05:34:12 +00:00
Botond Ballo ae9bfee9bf Bug 1740411 - Fix two tests in TestTreeManager.cpp that were providing invalid input data. r=hiro
SingleTouchData has two constructors, one which populates mScreenPoint,
and one which populates mLocalScreenPoint.

The latter is only appropriate for cases where the event is delivered
directly to an APZC, which expects "local" (ParentLayer) coordinates.

For cases where the event is delivered to the tree manager (as in
these tests), mScreenPoint must be populated because this is what
the hit tester looks at.

Differential Revision: https://phabricator.services.mozilla.com/D131683
2021-11-22 05:34:11 +00:00
sotaro 01cd151a04 Bug 1741775 - Remove LayersBackend::LAYERS_OPENGL r=gfx-reviewers,nical
LayersBackend::LAYERS_OPENGL is not used any more.

Code under widget/uikit is dead code.

Differential Revision: https://phabricator.services.mozilla.com/D131461
2021-11-20 22:52:14 +00:00
Jamie Nicol 8554c793b0 Bug 1740739 - Implement AddInputBlockCallback for APZCTreeManagerChild. r=botond
In bug 1633322 the AddInputBlockCallback API was added to
APZCTreeManager. This is only used by android, and since there is no
GPU process on Android it was not implemented for
APZCTreeManagerChild. This patch adds a remote APZCTreeManager
implementation in preparation for adding a GPU process for Android.

APZCTreeManagerChild::AddInputBlockCallback() works by maintaining a
local map of the added callbacks. It sends a message to the parent via
SendAddInputBlockCallback(), and in RecvAddInputBlockCallback() the
parent calls AddInputBlockCallback() on its local APZCTreeManager
instance. This callback is simply responsible for sending a message
back to the child with SendCallInputBlockCallback(). Upon receiving
this message the child will, finally, look up the original callback
from its local map and call it.

Some care must be taken with the intermediate callback described
above, as because APZCTreeManagerParent is not a refcounted type we
cannot safely capture a reference to it. Instead, we capture the
APZCTreeManagerParent's LayersId, and then look up the instance from
the CompositorBridgeParent using the ID.

Differential Revision: https://phabricator.services.mozilla.com/D131122
2021-11-20 09:49:15 +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
Botond Ballo 6e5c21e74c Bug 1702859 - Tweak fuzz values for new tests. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D130539
2021-11-19 20:51:28 +00:00
Botond Ballo fb4dbb5cfa Bug 1702859 - Fix async transform computation for subframe scrollbars. r=tnikkel
The computation included the resolution of enclosing scroll frames
in the scrollbar transform. This was correct with Layers (where
the resolution was "pushed down" to descendant layers such that
their layer space represented rendered pixels) but incorrect with
WebRender (where items with transform properties like a subframe
scrollbar are still subject to enclosing transform properties like
the zoom).

This makes the reftests added in the previous patch pass.

Differential Revision: https://phabricator.services.mozilla.com/D130538
2021-11-19 20:51:27 +00:00
Botond Ballo 12a4e5411d Bug 1702859 - Add subframe versions of the zoomed scrollbar async scroll tests. r=tnikkel
For these tests, the reference file also has the resolution (otherwise
the subframe scrollbar thicknesses wouldn't match), the only difference
is async scroll vs. sync scroll.

These tests fail without the fix for this bug.

Differential Revision: https://phabricator.services.mozilla.com/D130537
2021-11-19 20:51:27 +00:00
Botond Ballo b4a316d29a Bug 1702859 - Add async scrolling versions of the zoomed root scrollbar tests. r=tnikkel
These already pass, just adding them for test coverage.

Differential Revision: https://phabricator.services.mozilla.com/D130536
2021-11-19 20:51:27 +00:00
Botond Ballo d1644489de Bug 1702859 - Make APZ scrollbar reftest names more descriptive and more consistent. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D130535
2021-11-19 20:51:26 +00:00
Botond Ballo 12895b3637 Bug 1702859 - Add a comment explaining why async-scrollbar-zoom-{1,2}.html are not enabled on desktop yet. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D130534
2021-11-19 20:51:26 +00:00
Lee Salzman c032e821e7 Bug 1739454 - Don't allow write-mapping of SourceSurfaceSharedData after Finalize. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D131584
2021-11-19 18:46:47 +00:00
Alexandru Michis e95d8cf175 Backed out 3 changesets (bug 1739454) for causing crashtest failures in 1739454-1.html
CLOSED TREE

Backed out changeset 3accfa522abb (bug 1739454)
Backed out changeset 18fdb7a13e63 (bug 1739454)
Backed out changeset 1de7d723923a (bug 1739454)
2021-11-19 19:33:53 +02:00
Lee Salzman 8b21e8a50b Bug 1739454 - Don't allow write-mapping of SourceSurfaceSharedData after Finalize. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D131584
2021-11-19 16:22:09 +00:00
sotaro 1b44e05e92 Bug 1741784 - Remove unused code around CompositableHost r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D131466
2021-11-19 07:41:29 +00:00
Andrew Osmond 25e9161651 Bug 1742010 - File descriptor leak when serializing into SurfaceDescriptorAndroidHardwareBuffer. r=sotaro,gfx-reviewers
We accidently duplicate the file descriptor when serializing because we
hit a constructor for ipc::FileDescriptor which duplicates the handle
instead of just taking it. This means we are supposed to close it
explicitly but we've already forgotten about it. We should just do a
move instead to avoid this.

Differential Revision: https://phabricator.services.mozilla.com/D131569
2021-11-19 02:07:53 +00:00