Commit Graph

14400 Commits

Author SHA1 Message Date
Kartikaya Gupta
8004743db4 Bug 1643884 - Don't run APZCCallbackHelper::NotifyPinchGesture synchronously to avoid re-entrancy in InputQueue::ProcessQueue. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D79459
2020-06-12 16:45:28 +00:00
Andrew Osmond
8f69882854 Bug 1628657 - Make canvas use computed reference frame transforms. r=kvark
When a transform depends on the layout size of an element, one can see
visual distortions caused by the difference between the unsnapped size
used in the transform, and the snapped size calculated during scene
building. Ideally we could compute the transform after we snap, rather
than before. This patch adds support for a computed reference frame
which takes parameters to calculate the ideal transform dynamically.

In a future patch, we should make videos take advantage of this same
mechanism to avoid similar problems. This requires support for mirroring
and rotations.

Differential Revision: https://phabricator.services.mozilla.com/D77956
2020-06-11 20:46:05 +00:00
Andrew Osmond
65ad608400 Bug 1641594 - Remove the wrapper around recycled surfaces. r=tnikkel
We can perform the same function as RecyclingSourceSurface by checking
the ref count of the underlying surface directly. We need to ensure
WebRender is explicitly aware that it is a recycled surface, but that is
easily achieved by changing the type of the surface. This avoids
unnecessary heap allocations, particularly in the case where many
elements on the same page refer to the same animation (and thus
duplicating RecyclingSourceSurface objects).

Differential Revision: https://phabricator.services.mozilla.com/D77513
2020-06-11 17:49:13 +00:00
Jean-Yves Avenard
71373f3f10 Bug 1644009 - P7. Revert "Bug 1592488 - P4. Ensure an AbstractThread exists for the Compositor Thread." r=mattwoodrow
DirectTask dispatching will now be directly handled by nsThread.

Differential Revision: https://phabricator.services.mozilla.com/D79091
2020-06-12 05:10:10 +00:00
Kartikaya Gupta
ba088f5b71 Bug 1644271 - Add a ManagerType field to the MVM, to allow conditional behaviour. r=tnikkel
The MVM is needed for both handling of meta-viewport tags and APZ zooming.
However, the set of functionality needed in the two modes are not the same.
This patch adds a mechanism to create an MVM with a flag that lets it know
which mode it is operating in. Eventually we may want to split this into two
or more classes but for now this seems like a reasonable way forward.

The flag is currently set on the MVM on creation based on whether or not the
meta-viewport support is needed. There's no code that meaningfully *uses* the
flag yet, so this patch should have no functional change. The bulk of the
patch is ensuring that we appropriately destroy and re-create the MVM if the
flag required changes.

Differential Revision: https://phabricator.services.mozilla.com/D79224
2020-06-12 01:15:42 +00:00
Botond Ballo
f91b39185b Bug 1643604 - Move the check for a resized layout viewport in NotifylayersUpdated to the non-first-paint case. r=kats
In the first-paint case, we are accepting the incoming scroll metadata
wholesale, so most of the consequences of this code block will happen
anyways -- except for the extra repaint, which is not actually needed
and in fact undesirable in the first-paint case.

Differential Revision: https://phabricator.services.mozilla.com/D79195
2020-06-11 21:05:09 +00:00
Dorel Luca
255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
Jeff Gilbert
2ac2690670 Bug 1632249 - NON_PREMULT TextureClient iff NON_PREMULT CanvasClient. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D78800
2020-06-11 06:37:40 +00:00
Jeff Gilbert
06fa957778 Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-11 06:37:36 +00:00
Jeff Gilbert
cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Mihai Alexandru Michis
59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00
Jeff Gilbert
d415e13cc1 Bug 1632249 - NON_PREMULT TextureClient iff NON_PREMULT CanvasClient. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D78800
2020-06-10 22:21:09 +00:00
Jeff Gilbert
28d2828abe Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-10 22:21:04 +00:00
Jeff Gilbert
9b09e54345 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-10 22:21:02 +00:00
Kartikaya Gupta
6e27d8c5cc Bug 1644829 - Avoid using SimpleTest.is etc. in helper subtests run by runSubtestsSeriallyInFreshWindows. r=botond
Using `SimpleTest.is` directly instead of the "global" `is` installed by
runSubtestsSeriallyInFreshWindows means that the helper test filename doesn't
get emitted in the assertions, which is a nice thing to have. (Ditto for `ok`
and friends).

Problematic tests identified using:
for helper in helper_*.html; do
    if [[ $(grep "$helper" test_group*) ]]; then
        echo $helper;
        grep -e 'SimpleTest.\(is\|ok\)' "$helper";
    fi;
done

While it would be nice to catch this sort of thing directly in the code, it's
a bit tricky to do because SimpleTest.(ok|is) do get used legitimately by helper
methods that are used by group subtests and top-level tests.

Depends on D79171

Differential Revision: https://phabricator.services.mozilla.com/D79172
2020-06-10 19:35:48 +00:00
Kartikaya Gupta
ff2651cdc1 Bug 1644829 - Add an isnot reflection to the subtest window as well. r=botond
Depends on D79170

Differential Revision: https://phabricator.services.mozilla.com/D79171
2020-06-10 19:35:45 +00:00
Kartikaya Gupta
2aba4a7dc4 Bug 1644829 - For consistency ensure all tests that use runSubtestsSeriallyInFreshWindows have a _group in the name. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D79170
2020-06-10 19:34:47 +00:00
Kartikaya Gupta
5e5dea416b Bug 1643459 - Remove APZ:TransformEnd observer after subtest is done. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D79173
2020-06-10 19:27:51 +00:00
Daosheng Mu
d9e2924e6f Bug 1643514 - Clean up VRManager usage. r=kip,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78436
2020-06-10 01:26:52 +00:00
Simon Giesecke
82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila
e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke
d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Hiroyuki Ikezoe
d7e086f85f Bug 1644591 - Store AnimationStorageData as std::unique_ptr in std::unordered_map. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D79000
2020-06-09 23:37:01 +00:00
sotaro
dfcc816bd3 Bug 1644115 - Remove unused WebRenderTextureHost::mExternalImageId r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78666
2020-06-09 16:16:26 +00:00
Bob Owen
75f69ba6de Bug 1644208: Change RecordSourceSurfaceDestruction to take a void* not SourceSurface* to avoid AddRef during destructor. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78770
2020-06-09 14:21:31 +00:00
Dorel Luca
7289b66d6f Backed out 4 changesets (bug 1632249) for Build bustages and mda failures. CLOSED TREE
Backed out changeset cdaa8a4e9e36 (bug 1632249)
Backed out changeset 9ff26bcc580c (bug 1632249)
Backed out changeset 16d84439756f (bug 1632249)
Backed out changeset bbfe23c61add (bug 1632249)
2020-06-09 03:19:48 +03:00
Jeff Gilbert
e29ee2bc92 Bug 1632249 - NON_PREMULT TextureClient iff NON_PREMULT CanvasClient. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D78800
2020-06-08 20:58:03 +00:00
Jeff Gilbert
8d174dfafc Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-08 20:36:14 +00:00
Jeff Gilbert
de6377896c Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-08 20:34:15 +00:00
James Willcox
feb9d115fd Bug 1536833 - Fix overscroll effect on Android r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D78130
2020-06-08 17:13:28 +00:00
Botond Ballo
e49f09d719 Bug 1642884 - Protect all access to Axis::mVelocity with a mutex. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D78556
2020-06-08 16:14:29 +00:00
Simon Giesecke
13502cf27c Bug 1642991 - Use RemoveElementsBy where easily possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78055
2020-06-08 09:01:48 +00:00
Timothy Nikkel
779fc72cff Bug 1632268. Add browser chrome test for select dropdown position with pinch (apz) zooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D78025
2020-06-08 05:45:34 +00:00
Kartikaya Gupta
99e81069c0 Bug 1627708 - Record pinch source in a telemetry histogram. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77829
2020-06-06 00:32:26 +00:00
Kartikaya Gupta
67a28c6551 Bug 1627708 - Add a PinchGestureSource enum that indicates the source of a PinchGestureInput event. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77828
2020-06-06 00:32:19 +00:00
Kenny Levinsen
979767c4db Bug 1641033 - Fire vsync observers directly from Wayland frame callback. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D77047
2020-06-05 18:35:22 +00:00
Kartikaya Gupta
c06eb6ae82 Bug 1643042 - Switch mLastSmoothScrollOrigin to using None as well. r=tnikkel
This uses "None" instead of "NotSpecified" as the value for
mLastSmoothScrollOrigin when there is no smooth scroll in progress.

Depends on D78439

Differential Revision: https://phabricator.services.mozilla.com/D78469
2020-06-05 09:41:07 +00:00
Kartikaya Gupta
7ac36807b1 Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
This patch is a fairly mechanical conversion. The old `nullptr` gets converted
to ScrollOrigin::NotSpecified, and all the other possible values get corresponding
values in the new ScrollOrigin enum. A few switch statements are introduced to
clean up big if statements, but other than that, additional cleanups will happen
in later patches.

Differential Revision: https://phabricator.services.mozilla.com/D78438
2020-06-05 09:37:51 +00:00
sotaro
650f64603f Bug 1642839 - Implement WebRenderLayerManager::SendInvalidRegion() r=jrmuizel
When DWM is disabled, each window does not have own back buffer. They would paint directly to a buffer that was to be displayed by the video card. WM_PAINT via SendInvalidRegion() requests necessary re-paint. With it, RenderCompositorANGLE does not need to disable partial present.

Differential Revision: https://phabricator.services.mozilla.com/D77989
2020-06-05 05:03:40 +00:00
Noemi Erli
184f382e28 Backed out changeset 6b49139f2b9d (bug 1641033) for causing assertions in gfxPlatform.cpp CLOSED TREE 2020-06-05 04:31:45 +03:00
Kenny Levinsen
3950a7a3bf Bug 1641033 - Fire vsync observers directly from Wayland frame callback. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D77047
2020-06-04 23:39:30 +00:00
Bryce Seager van Dyk
f7ea6aff05 Bug 1643143 - Touch up doc comment and diagram for PlanarYCbCrImage. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D78144
2020-06-03 21:43:25 +00:00
Lee Salzman
45e9e4cbbf Bug 1641951 - let WR font sanitization ride the trains. r=jrmuizel
WR font sanitization appears relatively stable now, and we passed the 79
cutoff, so let WR font sanitization ride the trains.

Differential Revision: https://phabricator.services.mozilla.com/D78147
2020-06-03 22:37:58 +00:00
Dorel Luca
9377b3e955 Backed out changeset 02f8daecd98e (bug 1642884) for Mochitest failures in builds/worker/checkouts/gecko/gfx/layers/apz/src/Axis.cpp. CLOSED TREE 2020-06-03 23:11:28 +03:00
Botond Ballo
5eb0a67a4d Bug 1611660 - Accept layout viewport updates from the main thread right away. r=tnikkel
Previously, we would wait until the following frame (for uncertain reasons
that date back to B2G), but this meant the layout and visual viewports would
be out of sync for a frame, causing APZ to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D61286
2020-06-03 19:03:17 +00:00
Botond Ballo
4a07cb3fec Bug 1642884 - Ensure calls to Axis::CancelGesture() are protected by the APZC lock. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D78086
2020-06-03 16:56:45 +00:00
Botond Ballo
58f4d468c7 Bug 1642788 - Ensure APZ gtests set mTimeStamp correctly on events where needed. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77981
2020-06-03 16:39:01 +00:00
Botond Ballo
1d59a8121e Bug 1642788 - Call StartTouch() when pinch locking is activated. r=kats
Activating pinch locking means we are locked into a two-finger pan
(no scaling), which can trigger a fling animation at the end. We
track velocity via UpdateWithTouchAtDevicePoint() while pinch locked.
We need to call StartTouch() when we start tracking velocity.

Differential Revision: https://phabricator.services.mozilla.com/D77980
2020-06-03 16:38:53 +00:00
Botond Ballo
a864440a96 Bug 1642788 - Use mTimeStamp rather than mTime for APZ velocity computations. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77979
2020-06-03 16:38:38 +00:00
Botond Ballo
1d58b2d108 Bug 1642817 - Avoid accessing sIndirectLayerTreesLock during shutdown. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77957
2020-06-03 13:25:41 +00:00