Commit Graph

1909 Commits

Author SHA1 Message Date
Lee Salzman
552e417755 Bug 1539026 - Skia m74 Moz2D fixes. r=rhunt 2019-03-26 11:06:56 -04:00
Noemi Erli
cb48453c36 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-30 11:35:28 +02:00
Jeff Gilbert
758e836333 No bug - clang-format -p gfx 2019-03-29 23:41:48 -07:00
Alex Gaynor
44989b091f Bug 1540190 - replace the AnimationData IPDL union with native Maybe syntax; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D25425

--HG--
extra : moz-landing-system : lando
2019-03-29 19:54:14 +00:00
Emily Toop
d75296da81 Bug 1532582 - Display autofill popup in correct location.
This autofill popover was being displayed in the incorrect place because the display rect we were providing to the `AutofillManager` was the rect for the `GeckoView` and not the rect for the HTML element that the autofill popover was relating to.

1. Add view dimensions to info passed to autofill in `GeckoViewAutoFill`.
2. Use those view dimensions to calculate the correct location on the screen using `pageToScreenMatrix` in `GeckoSession`.

The resulting locations were incorrect, as the values used by `pageToScreenMatrix` were out of date. The `GeckoSession` was only notified about updated metrics during first composite, which meant that when the metrics changed during zoom and scroll on soft keyboard presentation, `GeckoSession` was unaware of it.

3. Update `GeckoSession` with new screen metrics when they change and not only during first composite.

Despite this change ensuring that `GeckoSession` always had the correct values for the viewport size and location, the request to provide the autofill location was made before the zoom and scroll was complete, meaning that even then out of date values were used during the calculation. The intial solution was to fire an event once zoom was complete, but despite this event being fired after the new screen size had been calculcated in `AsyncCompositionManager`, `GeckoSession` did not receive the values until after the event had been processed (the calls were out by 0.024ms).

5. Call new method `onScreenMetricsUpdated` inside `SessionTextInput` after screen metrics have been updated. Call `AutofillManager#notifyViewEntered` from this function.

This was not my preferred solution to this, but timing issues meant I could not find/think of an alternative way of delaying the calculation of the autofill popover location until after `GeckoSession` had been updated.

This patch currently fixes things on GV apps. Occasionally, on Fennec, the autofill view is out of alignment slightly. This needs further work.

Differential Revision: https://phabricator.services.mozilla.com/D25406

--HG--
extra : moz-landing-system : lando
2019-03-29 15:25:42 +00:00
Dorel Luca
a91d673cd5 Backed out changeset b6f5942c42bb (bug 1532582) for Eslint failure. CLOSED TREE 2019-03-29 16:37:21 +02:00
Emily Toop
65bf84e5c6 Bug 1532582 - Display autofill popup in correct location. r=geckoview-reviewers,snorp,kats
This autofill popover was being displayed in the incorrect place because the display rect we were providing to the `AutofillManager` was the rect for the `GeckoView` and not the rect for the HTML element that the autofill popover was relating to.

1. Add view dimensions to info passed to autofill in `GeckoViewAutoFill`.
2. Use those view dimensions to calculate the correct location on the screen using `pageToScreenMatrix` in `GeckoSession`.

The resulting locations were incorrect, as the values used by `pageToScreenMatrix` were out of date. The `GeckoSession` was only notified about updated metrics during first composite, which meant that when the metrics changed during zoom and scroll on soft keyboard presentation, `GeckoSession` was unaware of it.

3. Update `GeckoSession` with new screen metrics when they change and not only during first composite.

Despite this change ensuring that `GeckoSession` always had the correct values for the viewport size and location, the request to provide the autofill location was made before the zoom and scroll was complete, meaning that even then out of date values were used during the calculation. The intial solution was to fire an event once zoom was complete, but despite this event being fired after the new screen size had been calculcated in `AsyncCompositionManager`, `GeckoSession` did not receive the values until after the event had been processed (the calls were out by 0.024ms).

5. Call new method `onScreenMetricsUpdated` inside `SessionTextInput` after screen metrics have been updated. Call `AutofillManager#notifyViewEntered` from this function.

This was not my preferred solution to this, but timing issues meant I could not find/think of an alternative way of delaying the calculation of the autofill popover location until after `GeckoSession` had been updated.

This patch currently fixes things on GV apps. Occasionally, on Fennec, the autofill view is out of alignment slightly. This needs further work.

Differential Revision: https://phabricator.services.mozilla.com/D24397

--HG--
extra : moz-landing-system : lando
2019-03-29 12:49:26 +00:00
Oana Pop Rus
47e94b5d6e Merge inbound to mozilla-central. a=merge 2019-03-28 12:11:35 +02:00
Botond Ballo
84b1549d91 Bug 1526489 - Move usage of AutoApplyAsyncTestAttributes inside AsyncPanZoomController methods. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24612

--HG--
extra : moz-landing-system : lando
2019-03-26 00:56:43 +00:00
Botond Ballo
159150efde Bug 1525181 - Lift the async transform representing visual viewport scrolling to the async zoom container. r=kats
This avoids having to place this transform separately onto scrollable and fixed layers.

Differential Revision: https://phabricator.services.mozilla.com/D24594

--HG--
extra : moz-landing-system : lando
2019-03-27 16:44:25 +00:00
Bas Schouten
f4b4c791fd Bug 1536174 - Part 1: Add API for recording composition results with content. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D23913

--HG--
extra : rebase_source : 9f2d0fc253364d47ee987e91ad0ab50d85b91d86
2019-03-12 16:06:48 +01:00
Alex Gaynor
c711ab78bc Bug 1538796 - Part 5 - convert IPDL MaybeTexture union to use native Maybe syntax; r=mattwoodrow
Depends on D24750

Differential Revision: https://phabricator.services.mozilla.com/D24751

--HG--
extra : moz-landing-system : lando
2019-03-25 18:56:30 +00:00
Boris Chiou
92fcc151e4 Bug 1425837 - Part 4: Implement compositor animations on translate/rotate/scale. r=hiro,birtles
On the sender side of transactions, we have to convert the individual transforms
to the proper types in layers::Animations, and this includes SetAnimatable and
the definition in LayersMessages.

On the compositor side (i.e. received side of transactions). Basically, we
convert the list of layers::Animation into a list of `PropertyAnimationGroup`,
which is an intermediate value. And then use this list to do interpolation for
each property in `SampleAnimationForEachNode`, which will return a list of
`RefPtr<RawServoAnimationValue>`.

Depends on D23062

Differential Revision: https://phabricator.services.mozilla.com/D22565

--HG--
extra : moz-landing-system : lando
2019-03-18 18:04:50 +00:00
Boris Chiou
f744b2e1ea Bug 1425837 - Part 3: Don't store AnimationArray (a.k.a. AnimationInfo::mAnimations) on the compositor thread. r=birtles
The original implementation about "setting animations" is a little bit hard
to read. In `SetAnimations()`, we create a new intermediate data,
`AnimData`, and we mutate the original animations. And then iterate this
mutated animations & intermediate data for sampling. In this bug, we are
planning to group the AnimData as a useful data structure for supporting
multiple properties transform-like animations, so it seems the structure
of original animations may be hard to use after that. Therefore,
we decide to do some reworks on this:

First, we do renames,
1. InfalliableTArray to nsTArray. (They are the same.)
2. AnimData to PropertyAnimation.
3. SetAnimations() to ExtractAnimations(), which returns
   nsTArray<PropertyAnimationGroup>. Each entry in the array is for one
   property. In this patch, there is only one entry. We will extend this
   to multiple entries in the next patch.

And then rework `ExtractAnimations()`, which stores all the necessary data
in `PropertyAnimationGroup`. For WR, we store this in
`CompositorAnimationStorage`. For non-WR, we store it in `AnimationInfo`.
So we can just use this organized data structure for supporting multiple
properties animations. (See the next patch.)

Depends on D22563

Differential Revision: https://phabricator.services.mozilla.com/D23062

--HG--
extra : moz-landing-system : lando
2019-03-18 18:04:48 +00:00
Boris Chiou
2c4c5fb5f3 Bug 1425837 - Part 2: Factor out the conversion from ServoAnimationValue into Matrix4x4. r=hiro
Both layers and web-render use this function, so we factor it out.

Depends on D22562

Differential Revision: https://phabricator.services.mozilla.com/D22563

--HG--
extra : moz-landing-system : lando
2019-03-18 18:04:46 +00:00
Alex Gaynor
38a2064d1e Bug 1441651 - Part 2 - pass Shmem and ByteBuf by rvalref to Send* IPC methods; r=nika,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D19954

--HG--
extra : moz-landing-system : lando
2019-03-04 16:35:30 +00:00
Ryan Hunt
85ff4bdc33 Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21108

--HG--
extra : rebase_source : 48a4586f507891f3a2f0f970e9b9a0b15f0f3d61
2019-02-25 16:07:19 -06:00
Cosmin Sabou
00f3836a87 Merge mozilla-inbound to mozilla-central. a=merge 2019-02-28 12:57:50 +02:00
Matt Woodrow
6b3937aa72 Bug 1529795 - Record profiler markers when we drop video frames. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D20755

--HG--
extra : moz-landing-system : lando
2019-02-27 17:35:05 +00:00
Chris Peterson
13d583f829 Bug 1528881 - Part 9: gfx/layers: Move CreateTextureHostBasic/D3D11/OGL() function declarations to header files. r=mattwoodrow
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

In this case, moving these functions' declarations to header files means the same declaration will be seen by the .cpp files defining each function and TextureHost.cpp calling the functions.

Differential Revision: https://phabricator.services.mozilla.com/D20268

--HG--
extra : source : ffeda0b30541127073de4892ba3e1a6e8bd0f15f
extra : intermediate-source : 22238a64f3da13ed0f8de826092def10a427a55a
extra : histedit_source : b6f1c1e39ddf16f7e5716eb07915114b94204174
2019-02-17 23:05:15 -08:00
Chris Peterson
bac6d697ae Bug 1528881 - Part 6: gfx/layers: Make some global functions static. r=mattwoodrow
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

gfx/layers/composite/ContainerLayerComposite.cpp:132:6 [-Wmissing-prototypes] no previous prototype for function 'TransformLayerGeometry'
gfx/layers/composite/LayerManagerComposite.cpp:1409:6 [-Wmissing-prototypes] no previous prototype for function 'ComputeVisibleRegionForChildren'
gfx/layers/composite/LayerManagerComposite.cpp:234:6 [-Wmissing-prototypes] no previous prototype for function 'ShouldProcessLayer'
gfx/layers/composite/TiledContentHost.cpp:156:6 [-Wmissing-prototypes] no previous prototype for function 'UseTileTexture'
gfx/layers/ipc/CompositorBridgeParent.cpp:1827:6 [-Wmissing-prototypes] no previous prototype for function 'EraseLayerState'
gfx/layers/ipc/CompositorBridgeParent.cpp:2140:6 [-Wmissing-prototypes] no previous prototype for function 'UpdateIndirectTree'
gfx/layers/opengl/OGLShaderProgram.cpp:28:6 [-Wmissing-prototypes] no previous prototype for function 'AddUniforms'

Differential Revision: https://phabricator.services.mozilla.com/D20265

--HG--
extra : source : f5653a8b1bc5a02cf899fe87cb3ebc9796b0b0b1
extra : histedit_source : 4f44f15098c42b4b1fa141de7b8593c128b58596
2019-02-17 14:25:01 -08:00
Markus Stange
0b151b8c2b Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

Differential Revision: https://phabricator.services.mozilla.com/D11334

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:43 +00:00
Botond Ballo
df99bc4ec1 Bug 1526486 - Hook up reftest-async-{scroll,zoom} for containerless scrolling. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D19218

--HG--
extra : moz-landing-system : lando
2019-02-16 00:51:27 +00:00
Barret Rennie
3800dbb8ec Bug 1444449 - Do not return raw pointers to window targets from compositors r=bas
Differential Revision: https://phabricator.services.mozilla.com/D18598

--HG--
extra : moz-landing-system : lando
2019-02-12 18:53:10 +00:00
Botond Ballo
0ac724fa85 Bug 1459312 - Scroll layers that are fixed w.r.t. the RCD-RSF by the relative visual transform. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D17726

--HG--
extra : moz-landing-system : lando
2019-02-02 23:53:54 +00:00
Botond Ballo
6eceedb77d Bug 1459312 - Factor out a helper function from AlignFixedAndStickyLayers. r=kats
This helper will be reused for translating layers fixed to the RCD-RSF
with containerless scrolling.

Differential Revision: https://phabricator.services.mozilla.com/D17723

--HG--
extra : moz-landing-system : lando
2019-02-02 23:53:31 +00:00
Botond Ballo
28e8903b9e Bug 1459312 - Have AlignFixedAndStickyLayers take the ClipPartsCache by reference rather than pointer. r=kats
This reflects the fact that it's no longer optional (the code path that
wouldn't pass one was removed with JPZC).

Differential Revision: https://phabricator.services.mozilla.com/D17722

--HG--
extra : moz-landing-system : lando
2019-02-02 23:53:27 +00:00
Botond Ballo
7a0f6a05ca Bug 1459312 - Remove an outdated comment in TransformShadowTree(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D17720

--HG--
extra : moz-landing-system : lando
2019-02-02 23:53:23 +00:00
Botond Ballo
6afc24b5fc Bug 1459312 - AsyncCompositionManager changes to apply the async zoom to the async zoom container layer if appropriate. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D13348

--HG--
extra : moz-landing-system : lando
2019-02-02 23:53:15 +00:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Greg Tatum
7042c8f1c3 Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

Differential Revision: https://phabricator.services.mozilla.com/D16864

--HG--
extra : moz-landing-system : lando
2019-01-18 15:40:15 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Emily Toop
35b2b208c9 Bug 1509271 - Ensure that UpdateRootFrameMetrics is called even if the GeckoView embedding app is not using the AndroidDynamicToolbarAnimator. r=kats
When selected text in `geckoview_example`, the text selection toolbar was always positioned in the top left corner of the screen, regardless of where in the page the text was selected.

The cause of the bug was that UpdateRootFrameMetrics was being called only if the app utilised the `AndroidDynamicToolbar`. This caused the `mViewportZoom` value inside `GeckoSession` to always be 0. When using the `clientToFrameMatrix` function to place the text selection toolbar on screen, the generated matrix was incorrect as the zoom value was 0, causing the resulting frame to be offset by the zoom value.

By ensuring that `UpdateRootFrameMetrics` is called inside `AsyncCompositionManager`even when there is no `AndroidDynamicToolbarAnimator` this zoom value is correctly set and the resulting frame for the text selection toolbar is correctly placed.

Differential Revision: https://phabricator.services.mozilla.com/D15941

--HG--
extra : moz-landing-system : lando
2019-01-08 18:04:16 +00:00
Bas Schouten
a932b54860 Bug 1501442 - Part 3: Add profiler markers for payload presentarion. r=mstange
--HG--
extra : rebase_source : 7b3eeb59ab8823c5ebb674b933d95d1501f86210
2019-01-07 17:40:58 +01:00
Bas Schouten
93c70bd2f6 Bug 1501442 - Part 1: Add CompositionPayload type and allow submitting it as part of a transaction. r=mstange
--HG--
extra : rebase_source : 20a6ac6929bc99b8ddbf5500e7edbaa514c7ebe2
2018-12-13 15:59:22 +01:00
Michael Froman
c0a8a08f40 Bug 1500454 - remove PVideoDecoder, etc from dom namespace. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15156

--HG--
extra : moz-landing-system : lando
2018-12-21 22:34:57 +00:00
Alex Gaynor
55e3f21b2b Bug 1515437 - mark several IPC methods as final; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15011

--HG--
extra : moz-landing-system : lando
2018-12-19 21:46:49 +00:00
Botond Ballo
219f191a40 Bug 1430787 - Handle position:sticky inside a transform in AsyncCompositionManager. r=kats
Also enable tests that were previously disabled due to this.

Differential Revision: https://phabricator.services.mozilla.com/D15025

--HG--
extra : moz-landing-system : lando
2018-12-20 05:13:45 +00:00
Botond Ballo
4e2bbb39df Bug 1512267 - If you set a pres shell resolution, you must scale to it. r=kats,JanH
Differential Revision: https://phabricator.services.mozilla.com/D13928

--HG--
extra : moz-landing-system : lando
2018-12-10 19:32:59 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13193

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Hiroyuki Ikezoe
22056382c0 Bug 1504065 - Run background-color animations on the compositor. r=birtles
Changes for nsIDOMWindowUtils.getOMTAValue is in the next commit with come test
cases.

Differential Revision: https://phabricator.services.mozilla.com/D13001

--HG--
extra : moz-landing-system : lando
2018-11-28 00:58:46 +00:00
Andreea Pavel
f97b59258b Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE
Backed out changeset 129188370231 (bug 1504065)
Backed out changeset 359e81b35cfb (bug 1504065)
2018-11-27 15:33:29 +02:00
Hiroyuki Ikezoe
212fa4884a Bug 1504065 - Run background-color animations on the compositor. r=birtles
Changes for nsIDOMWindowUtils.getOMTAValue is in the next commit with come test
cases.

Differential Revision: https://phabricator.services.mozilla.com/D13001

--HG--
extra : moz-landing-system : lando
2018-11-27 09:26:51 +00:00
Gerald Squelart
1bd6a1fd4e Bug 1435091 - p4. Use profiler_thread_is_being_profiled() instead of profiler_is_active() around profiler_add_marker()s - r=mstange
(Unless there were other profiler actions, as I'm not sure yet whether it would
be safe to skip them when the profiler is paused; another bug should
investigate that.)

Differential Revision: https://phabricator.services.mozilla.com/D11308

--HG--
extra : moz-landing-system : lando
2018-11-19 06:29:15 +00:00
Jeff Muizelaar
3654ccade6 Bug 1507686 - Record LayerManager URL for each paint so that we can correlate it with slow paints. r=mattwoodrow
MozReview-Commit-ID: 2RUWkboAOJz

--HG--
extra : rebase_source : 397fd432b4e9cba37a1ebca9dcc5a949f290c9d0
2018-11-19 20:55:28 +13:00
Ryan Hunt
2226bcc8a3 Bug 1504220 - Move ScrollableLayerGuid, ViewID, ZoomConstraints from FrameMetrics.h r=botond
This commit attempts to lower the pain of modifying FrameMetrics.h.

It looks like most includes really only want ViewID or
ScrollableLayerGuid, so this commit factors them out into a separate
header. In the process FrameMetrics::ViewID is changed to
ScrollableLayerGuid::ViewID, which personally seems like a better
place for it now that we have RepaintRequest. Unfortunately that
requires a lot of places to be updated.

After this commit there are still a couple of major places that
FrameMetrics is included.
 * nsDisplayList.h
 * nsIScrollableFrame.h
 * Layers.h

Those are going to be more tricky or impossible to fix so they're
not in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D10722

--HG--
rename : gfx/layers/FrameMetrics.h => gfx/layers/ScrollableLayerGuid.h
rename : gfx/layers/FrameMetrics.h => gfx/layers/ZoomConstraints.h
extra : rebase_source : 29ac79f91460a181bf7437af5c371207e22858e2
extra : source : c2e70e531075493fc6e374dcec862827f0bc6e77
2018-11-01 15:15:46 -05:00
Kartikaya Gupta
3d29d74088 Bug 1498699 - Only create the AndroidDynamicToolbarAnimator for Fennec. r=jnicol
The bulk of this is adjusting the code that tries to use the toolbar to
have appropriate null checks instead of asserting it will exist. The
creation of the animator instance is now guarded by a IsFennec
condition.

Depends on D8658

Differential Revision: https://phabricator.services.mozilla.com/D8659

--HG--
extra : moz-landing-system : lando
2018-10-15 14:56:35 +00:00
Kartikaya Gupta
ece2bc6665 Bug 1498699 - Move the FIRST_PAINT notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol
Depends on D8657

Differential Revision: https://phabricator.services.mozilla.com/D8658

--HG--
extra : moz-landing-system : lando
2018-10-15 13:20:27 +00:00
Kartikaya Gupta
7e23a5fb50 Bug 1498699 - Move the LAYERS_UPDATED notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol
This extracts code that is conceptually unrelated to the dynamic toolbar
from the dynamic toolbar codebase. It is a stepping stone to being able
to not instantiate the AndroidDynamicToolbarAnimator at all for
non-Fennec android products.

Differential Revision: https://phabricator.services.mozilla.com/D8657

--HG--
extra : moz-landing-system : lando
2018-10-15 13:19:16 +00:00
Jean-Yves Avenard
a4846efef7 Bug 1493198 - P4. Add support for 10/12 bits YUV image to WebRender (bindings) r=mattwoodrow
Depends on D6663

Differential Revision: https://phabricator.services.mozilla.com/D6688

--HG--
extra : moz-landing-system : lando
2018-09-26 14:58:25 +00:00
Doug Thayer
3058162f1a Bug 1483533 - Undo deferment of glDeleteTextures r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D6463

--HG--
extra : moz-landing-system : lando
2018-09-25 13:38:42 +00:00
Jean-Yves Avenard
b10364a15f Bug 1493198 - P2. Use enum for describing color depth. r=mattwoodrow
Depends on D6662

Differential Revision: https://phabricator.services.mozilla.com/D6663

--HG--
extra : moz-landing-system : lando
2018-09-25 20:44:55 +00:00
Ciure Andrei
bd4f30e2a0 Backed out 4 changesets (bug 1418816) for reftest perma failure bugs/289480.html a=backout
Backed out changeset d722f5a4a8af (bug 1418816)
Backed out changeset 75d9a625be06 (bug 1418816)
Backed out changeset 807f0f510c25 (bug 1418816)
Backed out changeset 3c4cec04f28d (bug 1418816)
2018-09-19 22:33:24 +03:00
Jamie Nicol
b1d6426ad5 Bug 1418816 - Part 2: Handle repeated image layers in ImageLayerComposite. r=mattwoodrow
Depends on D6024

Differential Revision: https://phabricator.services.mozilla.com/D6025

--HG--
extra : moz-landing-system : lando
2018-09-19 12:14:10 +00:00
Doug Thayer
be5fea716c Bug 1483533 - Delay texture delete for DirectMapTextureSource r=jrmuizel
I wish I understood a little better what precisely is going on
here. What seems to be the problem is calling glDeleteTextures
too early, but I can't pin down exactly when "too early" is.
In any case I can no longer reproduce the issue with this patch
applied, and I cannot observe any performance degradation, and
it's not a remarkably risky patch, so I'm opting to cut the
investigation short. Any insights would be appreciated though.

Differential Revision: https://phabricator.services.mozilla.com/D6064

--HG--
extra : moz-landing-system : lando
2018-09-18 19:08:13 +00:00
Ciure Andrei
3e6299cfc7 Backed out changeset 59759503b889 (bug 1483533) for test failures RefPtr CLOSED TREE 2018-09-18 08:54:29 +03:00
Doug Thayer
8d7a1df18a Bug 1483533 - Delay texture delete for DirectMapTextureSource r=jrmuizel
I wish I understood a little better what precisely is going on
here. What seems to be the problem is calling glDeleteTextures
too early, but I can't pin down exactly when "too early" is.
In any case I can no longer reproduce the issue with this patch
applied, and I cannot observe any performance degradation, and
it's not a remarkably risky patch, so I'm opting to cut the
investigation short. Any insights would be appreciated though.

Differential Revision: https://phabricator.services.mozilla.com/D6064

--HG--
extra : moz-landing-system : lando
2018-09-18 04:33:05 +00:00
Alex Gaynor
eeeb350e22 Bug 1490415 - prevent creating a GPUVideoTextureHost with a null wrapped texture; r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D5563

--HG--
extra : moz-landing-system : lando
2018-09-12 00:17:10 +00:00
Botond Ballo
226a67047c Bug 1489630 - Mark AutoApplyAsyncTestAttributes as MOZ_RAII. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D5306

--HG--
extra : moz-landing-system : lando
2018-09-07 20:12:35 +00:00
Bas Schouten
d9c0061198 Bug 1486875: Make it possible to skip composition or painting using environment variables. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D4526

--HG--
extra : moz-landing-system : lando
2018-09-04 00:18:11 +00:00
Miko Mynttinen
1548622d86 Bug 1472733 - Improve IntRect overflow handling when calculating layer invalidation area and visible region r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D4627

--HG--
extra : moz-landing-system : lando
2018-08-30 00:59:28 +00:00
Gabriele Svelto
6bddc0a55e Bug 1486772 - Refactor the screen-orientation types and headers r=smaug
This patch removes the 'ScreenOrientationInternal' type from
dom/base/ScreenOrientation.h and moves it into the
HalScreenConfiguration.h header, renaming it simply to 'ScreenOrientation'
in the process. This has several knock-off effects:

- It allows files that needed ScreenOrientationInternal to include a much
  smaller header than before

- It greatly reduces the number of headers pulled in when including Hal.h

- It clarifies the role of the type. The 'Internal' part in the name had
  nothing to do with it being part of the implementation. The type was public
  and called that way only to avoid clashing with the 'ScreenOrientation'
  class. Since we moved it into a different namespace it can be renamed
  safely.

- It allows a file that was manually re-declaring 'ScreenConfigurationInternal'
  type to use the original one

- Finally this fixes a few files which were missing headers they actually
  required but that would still build because unified compilation put them into
  units that already had those headers thanks to ScreenConfiguration.h

Differential Revision: https://phabricator.services.mozilla.com/D4458

--HG--
extra : moz-landing-system : lando
2018-08-29 20:54:56 +00:00
Jean-Yves Avenard
70040ff272 Bug 1245400 - P3. Report number of frames dropped by compositor back to VideoSink. r=nical
We report the number of frames dropped by the compositor because they were too late through:
ImageComposite -> ImageHost -> CompositableTransactionParent -> ImageBridgeParent -> IPDL -> ImageBridgeChild -> ImageContainerListener -> ImageContainer -> VideoSink

Differential Revision: https://phabricator.services.mozilla.com/D2177
2018-08-22 17:26:36 +02:00
Jean-Yves Avenard
a0a2549c82 Bug 1245400 - P2. Keep track of frames that should have been painted but didn't. r=nical, r=mattwoodrow
We can't rely on the FrameID continuity to determine if a frame has been dropped due to timing or not.
The reason being that the VideoSink will not send to the compositor frames it knows as being late already (causing a discontinuity in the frames IDs), and count them as being dropped.
If we were to look at discontinuity on the compositor we would account for those frames twice.

FramesID will also increase non-linearly if a frame isn't painted because it's not visible (either out of the visible tree or in a hidden tab).

What we can measure however, is when a frame should have been painted but didn't because it was too late by looking at the value returned by ImageComposite::ChooseImageIndex() or when a new set of images is being received by the ImageComposite.
Any images found in the earlier array but never returned must have been dropped due to timing.

Looking at the index continuity greatly simplify the logic as we no longer need to worry if a video is hidden or not, or be part of a layer that is itself hidden as neither SetImages will be called then, nor ChooseImage

For now, we only account for those frames dropped, and do not report them yet.

Differential Revision: https://phabricator.services.mozilla.com/D2176
2018-08-22 17:26:36 +02:00
Jean-Yves Avenard
f7be15f4f4 Bug 1245400 - P1. Make ImageComposite::mImages a private member. r=nical
We will use the characteristic of which TimedImage is returned to keep track on how many frames were dropped because they were too old. As such, we must make sure the retrieval of the current image is serialised.

This allows to reduce duplicated code between WebRenderImageHost and ImageHost classes.

Additionally, make RenderInfo::img member const as really, we never want to modify that one.

A future change will enforce that RenderInfo.img never survives longer than the ChooseImage()'s caller to clarify the lifetime of the TimedImage.

Differential Revision: https://phabricator.services.mozilla.com/D2175
2018-08-22 17:26:36 +02:00
Nicolas Silva
808163871b Bug 1483459 - Avoid copying regions before converting them to rects throughout the gfx directory. r=sotaro
This patch was generated using a simple sed script:
sed -i 's/ToUnknownRegion().GetBounds()/GetBounds().ToUnknownRect()/g' gfx/**/*.cpp gfx/**/*.h

Differential Revision: https://phabricator.services.mozilla.com/D3875

--HG--
extra : rebase_source : 4e9e7c9f2fb4ca60122712dd06632147cdec7195
2018-08-21 14:58:47 +02:00
Kashav Madan
36384db656 Bug 1465616 - Use layout viewport transformations to async-adjust fixed position elements. r=botond
This results in fixed position elements being attached to the layout viewport
when being async-scrolled by APZ (when the layout viewport is larger than the
visual viewport).

MozReview-Commit-ID: 2YYIDnTWgVn

--HG--
extra : rebase_source : 58b77b2e9c8ed35bdc2d24dd8ca9494e8d23a391
2018-07-20 17:45:48 -04:00
Kashav Madan
2a9fbaf66d Bug 1465616 - Temporarily apply async test attributes when compositing. r=botond,kats
Includes a new RAII class: AutoApplyAsyncTestAttributes, which, for the
duration of its lifetime, applies mTestAsyncScrollOffset and mTestAsyncZoom to
the APZC's FrameMetrics. We need this to ensure that the
AsyncPanZoomController::GetCurrentAsync* methods consider test scroll and zoom
attributes when doing their respective computations.

MozReview-Commit-ID: 9owJcdIegNH

--HG--
extra : rebase_source : 35273faf10b8db13e3b5485278262f93d4adc579
2018-07-20 17:37:36 -04:00
Andi-Bogdan Postelnicu
b2d4c86823 Bug 1453795 - GFX - Initialize member fields in classes/ structures. r=nical
--HG--
extra : rebase_source : 56f2cc017632bf27115490ae05254019108c6179
extra : amend_source : 98ea6c3c02a9f7650d2cf65deaf5085cf9a2efa4
2018-06-16 17:42:33 +03:00
Hiroyuki Ikezoe
0020eaf1a1 Bug 1479234 - Fix the header for gfx::Glyph. r=kats
MozReview-Commit-ID: I0ukIwuxv7z

--HG--
extra : rebase_source : 74c7ad6a43520c3ba5ce96cbd2b13dedd6aaaa22
2018-07-31 06:13:15 +09:00
Coroiu Cristina
7634333ced Backed out 4 changesets (bug 1479234) for build bustage at build/src/gfx/vr/ipc/VRLayerChild.cpp on a CLOSED TREE
Backed out changeset 6ecc1666f571 (bug 1479234)
Backed out changeset c3bab1bc97cf (bug 1479234)
Backed out changeset c8c2625a33ba (bug 1479234)
Backed out changeset 2ffc8e9d5686 (bug 1479234)
2018-07-31 00:32:04 +03:00
Hiroyuki Ikezoe
272dc9b637 Bug 1479234 - Fix the header for gfx::Glyph. r=kats
MozReview-Commit-ID: I0ukIwuxv7z

--HG--
extra : rebase_source : 74c7ad6a43520c3ba5ce96cbd2b13dedd6aaaa22
2018-07-31 06:13:15 +09:00
sotaro
2bcc8b96f5 Bug 1477608 - Reuse same ExternalImageId for different video frames if possible r=jrmuizel 2018-07-25 23:30:08 +09:00
Doug Thayer
cd54f8c184 Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 4f05832f51dae6db98773dcad03cb008a80eca6c
2018-05-05 15:46:26 -07:00
Doug Thayer
e166b5a5e9 Bug 1265824 - handle the texture uploading and readLock related things for direct mapping texture source r=mattwoodrow
MozReview-Commit-ID: BC065h1Ac6k

--HG--
extra : rebase_source : 45be796ebd62cc116ae6fce51c4fe83010c6563c
2018-05-02 18:31:31 -07:00
Doug Thayer
f1353d2962 Bug 1265824 - Add a new texture source type "DirectMapTextureSource" r=mattwoodrow
The DirectMapTextureSource could let the compositor to read the buffer directly.
That could get rid of some memory copy operations during texture uploading.

MozReview-Commit-ID: CHhoR96P7VG

--HG--
extra : rebase_source : 65c167644096a1b72fe5dfbb55837842f41377bb
2018-05-02 18:20:10 -07:00
Cosmin Sabou
fea686b1f6 Backed out 10 changesets (bug 1265824) for causing reftests failures on global-composite-operation.html. CLOSED TREE
Backed out changeset 391c8e7897df (bug 1265824)
Backed out changeset 27c7daabd1a3 (bug 1265824)
Backed out changeset 7c90215a2eca (bug 1265824)
Backed out changeset c141fb67cf9a (bug 1265824)
Backed out changeset 239ab9f9ef52 (bug 1265824)
Backed out changeset 39ae151b3d8c (bug 1265824)
Backed out changeset 71b23fbe1fec (bug 1265824)
Backed out changeset 295dd1a6a09f (bug 1265824)
Backed out changeset 6aecd088e02c (bug 1265824)
Backed out changeset bf9d73b214fc (bug 1265824)
2018-07-23 19:36:37 +03:00
Doug Thayer
ac1648320e Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 67f6fee8b89933561a48e6f7f531b6969893a574
2018-05-05 15:46:26 -07:00
Doug Thayer
3f1e7393cc Bug 1265824 - handle the texture uploading and readLock related things for direct mapping texture source r=mattwoodrow
MozReview-Commit-ID: BC065h1Ac6k

--HG--
extra : rebase_source : f8586639a5c5c82a77e3b1d2fc1ed0eb196873f9
2018-05-02 18:31:31 -07:00
Doug Thayer
40c168f2fd Bug 1265824 - Add a new texture source type "DirectMapTextureSource" r=mattwoodrow
The DirectMapTextureSource could let the compositor to read the buffer directly.
That could get rid of some memory copy operations during texture uploading.

MozReview-Commit-ID: CHhoR96P7VG

--HG--
extra : rebase_source : 65c167644096a1b72fe5dfbb55837842f41377bb
2018-05-02 18:20:10 -07:00
Emilio Cobos Álvarez
ed8949d457 Bug 1477678 - Remove useless Compositor::SetDispAcquireFence. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D2295

--HG--
extra : moz-landing-system : lando
2018-07-23 13:06:24 +00:00
Ryan VanderMeulen
7c56172d60 Backed out 5 changesets (bug 1465616) for causing Fennec scrolling regressions.
Backed out changeset 403ba3d9539a (bug 1465616)
Backed out changeset ea79ddd406f4 (bug 1465616)
Backed out changeset 559c8997eb53 (bug 1465616)
Backed out changeset 3f5ca59998bf (bug 1465616)
Backed out changeset 9e48a27950be (bug 1465616)

--HG--
extra : amend_source : 8cc378d26e9fea0ed6277b69f227191e849001d8
2018-07-20 14:40:51 -04:00
Margareta Eliza Balazs
b1e7992b82 Backed out 8 changesets (bug 1265824) for bustage in /builds/worker/workspace/build/src/gfx/layers/opengl/CompositorOGL.cpp on a CLOSED TREE
Backed out changeset 1099d6f15f9f (bug 1265824)
Backed out changeset b5ba15b1a70f (bug 1265824)
Backed out changeset 51795de4adaf (bug 1265824)
Backed out changeset be68741ff4ce (bug 1265824)
Backed out changeset 4731dc56702d (bug 1265824)
Backed out changeset 984133e9614b (bug 1265824)
Backed out changeset efce316a4425 (bug 1265824)
Backed out changeset 367abce30668 (bug 1265824)
2018-07-19 09:33:28 +03:00
Doug Thayer
eeeab69c1c Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 3624ad04aa01dac1cd38efb47764dc3a8fbd5fbd
2018-05-05 15:46:26 -07:00
Doug Thayer
dc533418d3 Bug 1265824 - handle the texture uploading and readLock related things for direct mapping texture source r=mattwoodrow
MozReview-Commit-ID: BC065h1Ac6k

--HG--
extra : rebase_source : 7b462797934f8d34fa3a006855c975606c2f0dbc
2018-05-02 18:31:31 -07:00
Doug Thayer
a1e4ac3550 Bug 1265824 - Add a new texture source type "DirectMapTextureSource" r=mattwoodrow
The DirectMapTextureSource could let the compositor to read the buffer directly.
That could get rid of some memory copy operations during texture uploading.

MozReview-Commit-ID: CHhoR96P7VG

--HG--
extra : rebase_source : fbca3bd3b8af29939626e697909cc67e9a5b34cc
2018-05-02 18:20:10 -07:00
Kashav Madan
bf18fe089c Bug 1465616 - Remove call to AlignFixedAndStickyLayers for RCD-RSF. r=botond
MozReview-Commit-ID: B8HH6mbjTnv

--HG--
extra : rebase_source : 15eff992861e9a51b40a580df57067bfc5b88760
2018-07-04 15:52:03 -04:00
Lee Salzman
23c3cc8f6b Bug 1467847 - avoid taking inverse in Polygon::TransformToScreenSpace when possible. r=miko 2018-07-09 15:52:42 -04:00
Ryan Hunt
0412e688a8 Bug 1473301 - Remove BorderLayer. r=mattwoodrow
MozReview-Commit-ID: KGXW2lYBZ3c

--HG--
extra : rebase_source : a782ec3fb1c87d1d034219cbd7fd1b8d9d751559
extra : amend_source : ec7c8f7b4080c53a851117cfb1c7611c3606c562
2018-07-03 16:15:58 -05:00
Kashav Madan
5feadd6857 Bug 1466611 - Render layout viewport on APZ minimap. r=botond
MozReview-Commit-ID: HrTRZpU3rAi

--HG--
extra : rebase_source : 701badfe0eb1f3f71d55dcdc9fa7e639b321a2d6
2018-06-04 18:02:04 -04:00
Bogdan Tara
3737701cfa Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-05 12:33:18 +03:00
Ryan Hunt
c01796098b Bug 1346126 - Use RemoveAllChildren in ~ContainerLayerComposite. r=mattwoodrow
--HG--
extra : amend_source : 7960a34e49459979715f8a727c338370cf4760f3
2018-06-01 11:18:07 -05:00
Hiroyuki Ikezoe
a39a4ba11e Bug 1464568 - Set the shadow base transform value for the case where opacity animations' calculation was skipped. r=kats
And make DOMWindowUtils.getOMTCTransform work for opacity animations' layer.

MozReview-Commit-ID: 7P99WjYqPr0

--HG--
extra : rebase_source : cf87e8da40cf9febdb4188f4ef8ebe3b64eabe53
2018-06-05 12:50:39 +09:00
Hiroyuki Ikezoe
602a075310 Bug 1464568 - Set the shadow base transform for animation explicitly even if the transform value hasn't changed. r=kats
That's because the shadow base transform value might have been changed by APZC.

The test case in this patch fail without this fix on non-WebRender and the test
case is skipped on WebRender since the bug should never happen on WebRender
because WebRender manages animation transform value and APZ transform value
separately.

MozReview-Commit-ID: Itgh0QL1su6

--HG--
extra : rebase_source : c6f498947ce0be81bfd89f8190f4676f00aa6355
2018-06-05 12:50:36 +09:00
Hiroyuki Ikezoe
6df13785df Bug 1464568 - Add an argument to ApplyAsyncProperties() to apply the transform by APZC or not. r=kats
In the next patch, we will introduce a new IPC function to get transform value
modified by both animations and APZC.

MozReview-Commit-ID: Uf5UHg5Jm

--HG--
extra : rebase_source : 68a52c110b049266ce982bc9284de8642dc3405d
2018-06-05 09:18:21 +09:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Martin Stransky
b887819c71 Bug 1464037 - Replace GL_PROVIDER_GLX by MOZ_X11 to build X11 dependent code, r=lsalzman
In order to have useful Wayland builds we need ability to switch
between GL backends run-time - to use EGL backend for Wayland and GLX backend for X11.

GL_PROVIDER_GLX is used exclusively for GLX GL backend, so let's replace GL_PROVIDER_GLX
build-time check by more general MOZ_X11 check which determines X11 dependent code
and it's valid for both X11 and Wayland builds.

MozReview-Commit-ID: HYobrHveoaP

--HG--
extra : rebase_source : 2d359355ee747f5898d27d8a28d66114f4135f5b
2018-05-24 14:06:31 +02:00
Andrew Osmond
1f74824f6b Bug 1451297. r=nical 2018-05-22 11:25:49 -04:00
Ryan Hunt
7f81c73bae Bug 1461786 - Rename references to tile positions to tile coords. r=nical
This is the other half of the commit renaming the TileUnit to TileCoordUnit. It
also includes some small style cleanups.

--HG--
extra : rebase_source : ebf7a275bed518d1419a2e3c23b67f36601a1089
2018-04-20 09:42:35 -05:00