Commit Graph

14110 Commits

Author SHA1 Message Date
Dzmitry Malyshau
5004affc0e Bug 1602133 - WebGPU presentation r=jgilbert,webidl,smaug,aosmond
This change adds support for CanvasContext presenting WebGPU via CPU readback.
The presentation is handled mostly on GPU process side by managing a list of staging buffers
and copying the contents into a WR external image (backed by an external buffer).

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

--HG--
extra : moz-landing-system : lando
2020-04-06 20:10:03 +00:00
Bogdan Tara
7f7cc68c64 Backed out changeset 377a757c583d (bug 1602133) for webgpu related bustages CLOSED TREE 2020-04-06 21:59:57 +03:00
Dzmitry Malyshau
4c3a924336 Bug 1602133 - WebGPU presentation r=jgilbert,webidl,smaug,aosmond
This change adds support for CanvasContext presenting WebGPU via CPU readback.
The presentation is handled mostly on GPU process side by managing a list of staging buffers
and copying the contents into a WR external image (backed by an external buffer).

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

--HG--
extra : moz-landing-system : lando
2020-04-02 19:55:01 +00:00
Kartikaya Gupta
721e617cf9 Bug 1589046 - Terminate momentum panning once we reach a point where there is uncomsumed scroll. r=botond
This prevents OS-produced momentum panning events from having an effect after
the user sees the momentum panning "end" due to scrolling as far as possible.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 17:18:20 +00:00
Kartikaya Gupta
16f21d1f89 Bug 1589046 - Propagate the return value from AttemptScroll to DispatchScroll and CallDispatchScroll. r=botond
No functional changes here.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 17:18:12 +00:00
Kris Taeleman
564741ef90 Bug 1610731 - Adjust the sticky positioned elements transform for the dynamic toolbar. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D69559

--HG--
extra : moz-landing-system : lando
2020-04-04 18:53:01 +00:00
Kris Taeleman
ce7cd3b23c Bug 1610731 - Incorporate the top/bottom margins set by reftests. r=botond
This makes the existing test for this codepath start passing on geckoview-qr.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 18:52:59 +00:00
Kris Taeleman
50c695f4b3 Bug 1610731 - Add plumbing for sticky data. r=botond
This patch is pretty uninteresting, just building the pipe to move data
from the main-thread to APZ.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 06:16:55 +00:00
Kartikaya Gupta
4c319c0ce7 Bug 1610731 - Remove GetIsStickyPosition and clean up some TODOs. r=botond
The GetIsStickyPosition function isn't really needed since we can distinguish
whether or not a layer is sticky via NULL_SCROLL_ID as the container id. Also
ensure we have proper AtBottomLayer checks where needed for fixed and sticky
data.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 06:16:57 +00:00
Kartikaya Gupta
610597891f Bug 1610731 - Replace inefficient cargo-culted code with more efficient version. r=botond
Instead of storing pointers to the nodes in the TreeBuildingState, and then
extracting information from them later, we can just extract the information
right away, put that in the TreeBuildingState, and move the final structure
into place.

This isn't possible with some of the other similar-looking structures that this
was presumably cargo-culted from (such as the one that holds the thumb
information) since those need to be able to look up references to other APZCs
which can only be done after the tree walk is complete.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 06:16:40 +00:00
Sylvestre Ledru
0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Botond Ballo
671b80b84e Bug 1626659 - Fix non-unified build errors elsewhere in gfx/layers. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69720

--HG--
extra : moz-landing-system : lando
2020-04-04 23:39:14 +00:00
Botond Ballo
ce19be045c Bug 1626659 - Fix non-unified build errors in gfx/layers/mlgpu. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69719

--HG--
extra : moz-landing-system : lando
2020-04-04 23:39:01 +00:00
Ciure Andrei
3f9e822318 Backed out 8 changesets (bug 1610731) for causing fullscreen related wpt failures CLOSED TREE
Backed out changeset 8d11e5caff2a (bug 1610731)
Backed out changeset 089ef5398b32 (bug 1610731)
Backed out changeset bcbf21dcd7b4 (bug 1610731)
Backed out changeset 0e5823826e91 (bug 1610731)
Backed out changeset d8fbbc7fc65d (bug 1610731)
Backed out changeset c2b1bd759595 (bug 1610731)
Backed out changeset 4162437c7931 (bug 1610731)
Backed out changeset e7d6f26c1019 (bug 1610731)
2020-04-04 09:12:26 +03:00
sotaro
5d801f7ca2 Bug 1627117 - Trigger WR rendering twice during disabling native compositor r=jrmuizel
It seems that first rendering to SwapChain was not handled by IDCompositionVisual2. Then, as shot term fix, force to do WR rendering twice during disabling WR native compositor. It could mitigate black flashing problem.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 03:09:11 +00:00
Kris Taeleman
3acf2adc57 Bug 1610731 - Adjust the sticky positioned elements transform for the dynamic toolbar. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D69559

--HG--
extra : moz-landing-system : lando
2020-04-04 01:02:30 +00:00
Kris Taeleman
1219331fcf Bug 1610731 - Incorporate the top/bottom margins set by reftests. r=botond
This makes the existing test for this codepath start passing on geckoview-qr.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 01:02:23 +00:00
Kris Taeleman
b930c987dc Bug 1610731 - Add plumbing for sticky data. r=botond
This patch is pretty uninteresting, just building the pipe to move data
from the main-thread to APZ.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 01:02:03 +00:00
Kartikaya Gupta
dcd22a4c33 Bug 1610731 - Remove GetIsStickyPosition and clean up some TODOs. r=botond
The GetIsStickyPosition function isn't really needed since we can distinguish
whether or not a layer is sticky via NULL_SCROLL_ID as the container id. Also
ensure we have proper AtBottomLayer checks where needed for fixed and sticky
data.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 01:01:58 +00:00
Kartikaya Gupta
2d6f912576 Bug 1610731 - Replace inefficient cargo-culted code with more efficient version. r=botond
Instead of storing pointers to the nodes in the TreeBuildingState, and then
extracting information from them later, we can just extract the information
right away, put that in the TreeBuildingState, and move the final structure
into place.

This isn't possible with some of the other similar-looking structures that this
was presumably cargo-culted from (such as the one that holds the thumb
information) since those need to be able to look up references to other APZCs
which can only be done after the tree walk is complete.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 01:01:50 +00:00
Brindusan Cristian
66ab7a9660 Backed out 8 changesets (bug 1610731) for reftest failures at dynamic-toolbar-fixed-bottom-1.html. CLOSED TREE
Backed out changeset a26b63d0248e (bug 1610731)
Backed out changeset c33e6fe22774 (bug 1610731)
Backed out changeset 840550c070e8 (bug 1610731)
Backed out changeset 7bffd6eb9ac7 (bug 1610731)
Backed out changeset a383a7100973 (bug 1610731)
Backed out changeset 8f2bae2ca274 (bug 1610731)
Backed out changeset 8d43fbe05f38 (bug 1610731)
Backed out changeset 035432f43d16 (bug 1610731)

--HG--
rename : layout/reftests/async-scrolling/dynamic-toolbar-sticky-top-1.html => layout/reftests/async-scrolling/dynamic-toolbar-fixed-bottom-1.html
2020-04-04 00:47:08 +03:00
Kris Taeleman
679dec16a4 Bug 1610731 - Adjust the sticky positioned elements transform for the dynamic toolbar. r=botond
Depends on D69558

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

--HG--
extra : moz-landing-system : lando
2020-04-03 17:35:59 +00:00
Kris Taeleman
5ac6d32ba7 Bug 1610731 - Incorporate the top/bottom margins set by reftests. r=botond
This makes the existing test for this codepath start passing on geckoview-qr.

Depends on D69557

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

--HG--
extra : moz-landing-system : lando
2020-04-03 17:34:16 +00:00
Kris Taeleman
c30f07d3bb Bug 1610731 - Add plumbing for sticky data. r=botond
This patch is pretty uninteresting, just building the pipe to move data
from the main-thread to APZ.

Depends on D69554

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

--HG--
extra : moz-landing-system : lando
2020-04-03 16:54:56 +00:00
Kartikaya Gupta
02b7cb7d2a Bug 1610731 - Remove GetIsStickyPosition and clean up some TODOs. r=botond
The GetIsStickyPosition function isn't really needed since we can distinguish
whether or not a layer is sticky via NULL_SCROLL_ID as the container id. Also
ensure we have proper AtBottomLayer checks where needed for fixed and sticky
data.

Depends on D69553

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

--HG--
extra : moz-landing-system : lando
2020-04-03 17:42:55 +00:00
Kartikaya Gupta
a86f457a44 Bug 1610731 - Replace inefficient cargo-culted code with more efficient version. r=botond
Instead of storing pointers to the nodes in the TreeBuildingState, and then
extracting information from them later, we can just extract the information
right away, put that in the TreeBuildingState, and move the final structure
into place.

This isn't possible with some of the other similar-looking structures that this
was presumably cargo-culted from (such as the one that holds the thumb
information) since those need to be able to look up references to other APZCs
which can only be done after the tree walk is complete.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 16:47:16 +00:00
Timothy Nikkel
e9a1f92b4a Bug 1626259. When computing the scale for a stacking context with webrender look at this stacking context to see if it is preserve 3d and not it's parent to match FrameLayerBuilder::ChooseScale. r=jrmuizel
Back when webrender did not call FrameLayerBuilder::ChooseScale (it was called ChooseScaleAndSetTransform back then until it was factored out in bug 1415987) bug 1449640 landed which made the webrender scale choosing more closely align with FrameLayerBuilder::ChooseScale by not computing a scale of there was preserve3d or perspective involved. That patch had a bug, it looked at the parent stacking context helper to see if it had preserve 3d, but FrameLayerBuilder::ChooseScale looks at the current "stacking context".

This didn't cause a problem in the testcase from this bug until bug 1569215 landed. In the testcase in this bug we have a stacking context with a 2d transform whose parent stacking context is preserve3d. So we pass down the scale from the parent stacking context and completely ignore the scale induced by the 2d transform. Passing 1.f to ChooseScale instead of the parent scale factor "undid" this mistake, so when that was fixed we regressed this testcase.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 01:24:54 +00:00
Nicolas Silva
fdb6027218 Bug 1624627 - Reimplement the slow frame indicator. r=jrmuizel
This removes the WebRender side of the previous slow frame indicator and replace it with a simple implementation that only looks at the CPU time on the render backend and renderer thread involved for building a frame.

A followup patch will add a separate indicator for when the displaylist/ipc/scene bits take too long.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 17:23:15 +00:00
Botond Ballo
c48a7ae922 Bug 1626659 - Fix non-unified build errors in gfx/layers/composite. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69304

--HG--
extra : moz-landing-system : lando
2020-04-02 02:16:17 +00:00
Botond Ballo
79eaedc4fc Bug 1626659 - Fix non-unified build errors in gfx/layers/ipc. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69300

--HG--
extra : moz-landing-system : lando
2020-04-02 02:16:18 +00:00
Botond Ballo
ef74ceb9d9 Bug 1626659 - Fix non-unified build errors in gfx/layers/apz. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69293

--HG--
extra : moz-landing-system : lando
2020-04-02 00:08:33 +00:00
Kartikaya Gupta
cd8118eabb Bug 1622360 - Remove the content render root. r=jrmuizel
Nothing creates the content render root anymore, so we can delete
references to it and wipe it off the face of the codebase. This makes
the non-default render root array a zero-length Array which is a template
specialization that lacks things like begin() end end(). So we need
to also rip out any code that tries to iterate these things, in order
to get compilation to succeed. The code would be a no-op anyway now
that there are no non-default render roots left.

Depends on D68864

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

--HG--
extra : moz-landing-system : lando
2020-04-01 13:39:12 +00:00
Kartikaya Gupta
af891b2458 Bug 1626008 - Ensure the HTTN data gets updated after recycling. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D68851

--HG--
extra : moz-landing-system : lando
2020-03-30 19:43:10 +00:00
André Bargull
62ab594247 Bug 1625138 - Part 39: Replace mozilla::IsSame with std::is_same in gfx/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68558

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +00:00
André Bargull
2712714d84 Bug 1625138 - Part 35: Replace mozilla::TrueType with std::true_type. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68554

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:20 +00:00
André Bargull
cae4e1fdbc Bug 1606962: Replace mozilla::EnableIf with std::enable_if. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68401

--HG--
extra : moz-landing-system : lando
2020-03-28 13:35:31 +00:00
Kartikaya Gupta
8a3b6cb1a4 Bug 1622360 - Remove the render root properties in FocusState. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D68493

--HG--
extra : moz-landing-system : lando
2020-03-27 17:44:53 +00:00
Kartikaya Gupta
7d2c8af30b Bug 1622360 - Remove SLGuidAndRenderRoot and convert remaining uses to ScrollableLayerGuid. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D68400

--HG--
extra : moz-landing-system : lando
2020-03-27 17:44:21 +00:00
Kartikaya Gupta
dda847f4e7 Bug 1622360 - Remove WRRootId and convert remaining uses to LayersId. r=botond
Depends on D68396

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

--HG--
extra : moz-landing-system : lando
2020-03-27 17:40:40 +00:00
Kartikaya Gupta
6fed4c94d9 Bug 1622360 - Remove UpdaterQueueSelector and update stuff that uses it. r=botond
This also downgrades a bunch of WRRootId parameters back down to LayersId
in APZUpdater since APZUpdater doesn't need the render root information any
more.

Changes to comments generally restore the text that was there prior to the
document-splitting patch landing.

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

--HG--
extra : moz-landing-system : lando
2020-03-27 17:57:18 +00:00
Kartikaya Gupta
1330a33340 Bug 1622360 - Remove mWrRootId from WebRenderScrollDataWrapper. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D68395

--HG--
extra : moz-landing-system : lando
2020-03-27 15:24:54 +00:00
Miko Mynttinen
9b727b1e0b Bug 1624125 - Track display list changes in DisplayItemCache r=jrmuizel
This is needed because display lists and DisplayItemCache have different lifetimes. For example, display lists can outlive WebRenderLayerManager when device reset occurs.

A slightly nicer way of fixing this would be to couple DisplayItemCache with nsDisplayList or nsDisplayListBuilder. This is would currently require a lot of refactoring to look nice, because the painting code still supports non-retained display lists and non-WR code paths.

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

--HG--
extra : moz-landing-system : lando
2020-03-27 16:49:37 +00:00
Simon Giesecke
d3deabac64 Bug 1613363 - Maybe<T> should preserve trivial copy-constructability and destructability of T. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68173

--HG--
extra : moz-landing-system : lando
2020-03-27 14:22:51 +00:00
Simon Giesecke
0cc5c6e63f Bug 1052940 - Make Maybe<T> only declare copy/move operations if T is copyable/movable. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68172

--HG--
extra : moz-landing-system : lando
2020-03-27 14:10:45 +00:00
Chris Peterson
b994ab8896 Bug 1624789 - Replace MOZ_MUST_USE with [[nodiscard]] in gfx. r=gfx-reviewers,nical
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

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

--HG--
extra : moz-landing-system : lando
2020-03-25 10:35:04 +00:00
Lee Salzman
e7163f076c Bug 1611467 - unify UnscaledFont::GetFontDescriptor and GetWRFontDescriptor implementations. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68284

--HG--
extra : moz-landing-system : lando
2020-03-26 16:11:00 +00:00
Kartikaya Gupta
d33180ab09 Bug 1622360 - Downgrade WRRootId to LayersId in some of APZCTreeManager. r=botond
Depends on D67868

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

--HG--
extra : moz-landing-system : lando
2020-03-23 22:05:48 +00:00
Kartikaya Gupta
f5680c938b Bug 1622360 - Remove RenderRoot propagation in APZCTreeManager. r=botond
Depends on D67867

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

--HG--
extra : moz-landing-system : lando
2020-03-24 00:18:20 +00:00
Kartikaya Gupta
f6825449bf Bug 1622360 - Remove rest of the RenderRootBoundary stuff. r=botond
Depends on D67866

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

--HG--
extra : moz-landing-system : lando
2020-03-23 22:05:15 +00:00
Kartikaya Gupta
dd636055af Bug 1622360 - Remove WebRenderScrollDataCollection::AppendWrapper and the boundary root setters in WebRenderScrollData. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D67866

--HG--
extra : moz-landing-system : lando
2020-03-23 22:05:13 +00:00
Simon Giesecke
58d0171406 Bug 1620632 - Ensure nsTArray_Impl only declares a copy-constructor/assignment operator if E is copy-constructible. r=froydnj
To correctly implement this, it must be known on instantiation whether E is
copy-constructible, which is not the case if only a forward declaration is
available. This can be resolved either by making sure a full definition of E is
available, which is preferable. But in cases where this is not (easily) possible,
the information can be explicitly provided by the MOZ_DECLARE_COPY_CONSTRUCTIBLE
and MOZ_DECLARE_NON_COPY_CONSTRUCTIBLE macros. In particular, declarations for
IPDL-declared types are added to nsTArray.h itself, like it was already done
for MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR.

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:13:51 +00:00
Simon Giesecke
7e9a7de895 Bug 1620632 - Rename confusingly named types/macros for relocation handling of nsTArray. r=froydnj
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:04:27 +00:00
Kartikaya Gupta
9166beb15f Bug 1622360 - Remove WebRenderRenderRootData and ScrollDataBoundaryWrapper. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D67617

--HG--
extra : moz-landing-system : lando
2020-03-20 14:05:23 +00:00
Kartikaya Gupta
6ff6356148 Bug 1622360 - Remove the nsDisplayRenderRoot display item type. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D67616

--HG--
extra : moz-landing-system : lando
2020-03-20 14:20:21 +00:00
Kartikaya Gupta
fcc6b07839 Bug 1622360 - Remove the split_render_roots pref and immediate codepaths that depend on it. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D67613

--HG--
extra : moz-landing-system : lando
2020-03-20 13:54:03 +00:00
Kartikaya Gupta
9b09b6c55e Bug 1623681 - Fix comments referring to incorrect file. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D67512

--HG--
extra : moz-landing-system : lando
2020-03-20 00:03:04 +00:00
Kartikaya Gupta
7bd1cd7fd2 Bug 1617179 - Add a MOZ_LOG for checkerboard events. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D67378

--HG--
extra : moz-landing-system : lando
2020-03-19 13:51:07 +00:00
Kartikaya Gupta
da92d0e1ad Bug 1617179 - Remove IsCurrentlyCheckerboarding. r=botond
IsCurrentlyCheckerboarding can be removed now, as it does the same underlying
computation as "GetCheckerboardMagnitude(...) > 0". The only difference is that
the caller now needs to compute the clipped composition bounds, which is
easy enough to do at the one call site.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 13:51:04 +00:00
Kartikaya Gupta
610cac7e05 Bug 1617179 - Precompute clipped composition bounds and fix GetCheckerboardMagnitude. r=botond
The goal of this patch is to enhance GetCheckerboardMagnitude so that it
correctly accounts for clipping by ancestor APZC instances, the same way
IsCurrentlyCheckerboarding does. However, IsCurrentlyCheckerboarding uses
the mParent parent pointer when computing the clipped composition bounds,
which requires the tree lock. GetCheckerboardMagnitude is not allowed to
acquire the tree lock as it runs on the sampler thread.

This patch therefore takes another approach: the APZCTreeManager code
precomputes the clipped composition bounds for each APZC (which it can do
relatively efficiently and holding just the map lock), and then provides
that rect to the individual APZCs when they invoke GetCheckerboardMagnitude.

The additional changes to GetCheckerboardMagnitude are copied from the
IsCurrentlyCheckerboarding codepath, and the next patch will remove the latter
function entirely since GetCheckerboardMagnitude will do everything that is
needed for IsCurrentlyCheckerboarding.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 13:55:36 +00:00
Kartikaya Gupta
327d908fc0 Bug 1617179 - Update mApzcMap to allow access to an APZC's parent on the sampler thread. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D67375

--HG--
extra : moz-landing-system : lando
2020-03-19 13:51:14 +00:00
Kartikaya Gupta
803fabf7da Bug 1617179 - Extract a helper method across WR and non-WR codepaths. r=botond
The operations of recording checkerboard events and advancing the animations
across all APZs are conceptually linked. This patch extracts a helper that
does these operations in a single function, that is then called from both
the WR and non-WR codepaths. This will allow us to expand this code a bit
without having to duplicate it in multiple places.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 13:50:48 +00:00
Emilio Cobos Álvarez
bd5fd90b36 Bug 1622894 - Really prevent to zoom out when ZoomToRect is called with DISABLE_ZOOM_OUT. r=botond
When you're zoomed inside a large text-area in GeckoView, we are zooming out
right now which is very disruptive and clearly not what the code intended.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 19:54:32 +00:00
Miko Mynttinen
ba0e838277 Bug 1614655 - Part 2: Allow 1:n mapping of Gecko - WR display items r=jrmuizel
This patch changes the underlying storage for WR display items in DisplayItemCache
from Vec<Option<CachedDisplayItem> to Vec<Vec<CachedDisplayItem>>.
This allows storing multiple WebRender display items for one Gecko display item.

The storage is populated by traversing BuiltDisplayList extra data portion
in display list format, which is roughly as follows:
RetainedItems(key k1)
Item1(..)
RetainedItems(key k2)
ItemN(..)
ItemN+1(..)

This would store Item1 under key k1, and ItemN and ItemN+1 under the key k2,
where k1 and k2 are arbitrary unique identifiers (currently of type uint16_t).

The entries in the storage are accessed by DisplayItemCache::get_iterator(key),
which is called by BuiltDisplayListIter, whenever it encounters a display item
DisplayItem::ReuseItems(key).

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

--HG--
extra : moz-landing-system : lando
2020-03-18 23:47:05 +00:00
Razvan Maries
e153e0a3e1 Backed out 3 changesets (bug 1614655) for WebRender bustages. CLOSED TREE
Backed out changeset e79e84e8819c (bug 1614655)
Backed out changeset cc263e909c61 (bug 1614655)
Backed out changeset 10897d6106a8 (bug 1614655)
2020-03-19 00:49:08 +02:00
Miko Mynttinen
ac6d4c087e Bug 1614655 - Part 2: Allow 1:n mapping of Gecko - WR display items r=jrmuizel
This patch changes the underlying storage for WR display items in DisplayItemCache
from Vec<Option<CachedDisplayItem> to Vec<Vec<CachedDisplayItem>>.
This allows storing multiple WebRender display items for one Gecko display item.

The storage is populated by traversing BuiltDisplayList extra data portion
in display list format, which is roughly as follows:
RetainedItems(key k1)
Item1(..)
RetainedItems(key k2)
ItemN(..)
ItemN+1(..)

This would store Item1 under key k1, and ItemN and ItemN+1 under the key k2,
where k1 and k2 are arbitrary unique identifiers (currently of type uint16_t).

The entries in the storage are accessed by DisplayItemCache::get_iterator(key),
which is called by BuiltDisplayListIter, whenever it encounters a display item
DisplayItem::ReuseItems(key).

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

--HG--
extra : moz-landing-system : lando
2020-03-18 17:09:51 +00:00
Kartikaya Gupta
8e681739f9 Bug 1622395 - Use AutoApplyAsyncTestAttributes instead of manually doing a half-job. r=botond
The code in GetVisibleRect() uses the test scroll offset, but not the test zoom.
Using AutoApplyAsyncTestAttributes automatically uses both.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 09:53:48 +00:00
Kartikaya Gupta
dca484f1e2 Bug 1622395 - Propagate some proof-of-lock. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D66957

--HG--
extra : moz-landing-system : lando
2020-03-18 19:24:32 +00:00
Jeff Muizelaar
f0d960cc2b Bug 1622327. Add support for adding profiling event markers to WebRender. r=kvark
Also add some texture cache reallocation events.

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

--HG--
extra : moz-landing-system : lando
2020-03-14 06:56:36 +00:00
Kartikaya Gupta
4795d60bd9 Bug 1613009 - Make SimpleLayerAttributes explicitly serialized. r=botond
Depends on D66819

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

--HG--
extra : moz-landing-system : lando
2020-03-13 19:59:04 +00:00
Kartikaya Gupta
71c660e36c Bug 1613009 - Make ScrollbarData explicitly serialized. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D66819

--HG--
extra : moz-landing-system : lando
2020-03-13 19:48:47 +00:00
Kartikaya Gupta
24df3b5265 Bug 1620719 - Explicitly serialize MatrixMessage fields. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D66758

--HG--
extra : moz-landing-system : lando
2020-03-13 16:15:27 +00:00
Chris Fronk
d5b004443b Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-17 12:42:12 +00:00
Nicolas Silva
560b01ff35 Bug 1618116 - Remove synchronous hit testing from WebRender's C++ wrapper. r=botond,kats
In addition:
 - Move the fast hit tester to the rust side of the bindings.
 - Avoid blocking by requesting a hit tester early and only blocking if the request isn't delivered by the time of the first hit test query.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 10:45:31 +00:00
sotaro
979e03c00a Bug 1622709 - Re-enable RecycleAllocator at ImageContainer for RDD process r=nical
GPUVideoTextureHost needs call wrapped TextureHost's PrepareTextureSource() and UpdatedInternal() for layer compositor.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 10:42:32 +00:00
Gerald Squelart
bc32add109 Bug 1622179 - Replace direct dependencies on BlocksRingBuffer with ProfileBufferEntryWriter's where possible - r=canaltinova
This removes most dependencies on BlocksRingBuffer, to ease the transition to
the upcoming Fission-friendly profile buffer, including:
- Length type,
- SumBytes(),
- Gecko extensions of serialization.

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

--HG--
rename : tools/profiler/public/BlocksRingBufferGeckoExtensions.h => tools/profiler/public/ProfileBufferEntrySerializationGeckoExtensions.h
extra : moz-landing-system : lando
2020-03-16 20:32:35 +00:00
Kartikaya Gupta
052e19a347 Bug 1622444 - Ensure the isLayerized check passes consistently on Android. r=botond
If we don't wait for the click event before checking for the layerization,
then the layerization may not actually have happened at the time of the check.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 19:31:55 +00:00
Mihai Alexandru Michis
352da8fd76 Backed out 2 changesets (bug 1622395) for causing multiple reftest failures.
Backed out changeset 1e89ecc6316f (bug 1622395)
Backed out changeset 49befaabfdbb (bug 1622395)
2020-03-16 20:21:53 +02:00
Kartikaya Gupta
60d9036293 Bug 1622395 - Propagate some proof-of-lock. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D66957

--HG--
extra : moz-landing-system : lando
2020-03-16 16:15:53 +00:00
Kartikaya Gupta
33fb0c9856 Bug 1622395 - Use AutoApplyAsyncTestAttributes instead of manually doing a half-job. r=botond
The code in GetVisibleRect() uses the test scroll offset, but not the test zoom.
Using AutoApplyAsyncTestAttributes automatically uses both.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 16:03:16 +00:00
Hiroyuki Ikezoe
2861bb049b Bug 1621474 - Use Variant::match in AnimatedValue iterations. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D66332

--HG--
extra : moz-landing-system : lando
2020-03-14 08:15:04 +00:00
Hiroyuki Ikezoe
607696b592 Bug 1621474 - Introduce WrAnimations struct to reduce the numbers of arguments of SampleAnimations. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D66331

--HG--
extra : moz-landing-system : lando
2020-03-14 08:14:46 +00:00
Hiroyuki Ikezoe
9e26e7ea21 Bug 1621474 - Add a generic WrAnimationPropertyValue. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D66329

--HG--
extra : moz-landing-system : lando
2020-03-14 08:14:20 +00:00
Ed Lee
acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
sotaro
9a27c755ab Bug 1621836 - Make SurfaceTextureHost::NumSubTextures() returns 0 when SurfaceTexture does not exist r=nical
When NumSubTextures() returns 0, SurfaceTextureHost is not rendered to WebRebder by a check of AsyncImagePipelineManager::UpdateImageKeys().

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

--HG--
extra : moz-landing-system : lando
2020-03-13 14:42:24 +00:00
Kartikaya Gupta
67bc5d7367 Bug 1617427 - Add a test for the scenario being fixed. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D66428

--HG--
extra : moz-landing-system : lando
2020-03-13 19:59:41 +00:00
Kartikaya Gupta
c4913fea1d Bug 1617427 - Resurrect IsCurrentlyCheckerboarding and make it more correct. r=botond
This improves the implementation of IsCurrentlyCheckerboarding (which is not
invoked from anywhere prior to this patch) so that it takes into account the
recursive clipping applied by ancestor layers' composition bounds. In other
words, the visible rect for a layer may be additionally clipped because
ancestor scrollframes have scrolled, and this patch accounts for that.

It also records the currently-checkerboarding state into the APZTestData
at the time that the compositor APZTestData instance is fetched.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 19:59:30 +00:00
Kartikaya Gupta
61b5c2e638 Bug 1617427 - Extract helper method to normalize visible rect computation. r=botond
Slight functional changes:
- the checkerboard event call site will now include mTestAsyncScrollOffset
when calculating the visible rect, which should impact overall behaviour if
there's a test that cares about checkerboard events (there currently isn't).
- the IsCurrentlyCheckerboarding call site will use the compositing effective
scroll offset instead of the raw metrics scroll offset. This function is
not called from anywhere so it doesn't matter, but it makes sense to align
it with the other uses and I'll be using it in future patches.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 19:58:56 +00:00
Kartikaya Gupta
7d07c4a8b1 Bug 1617427 - Miscellaenous documentation fixes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D66425

--HG--
extra : moz-landing-system : lando
2020-03-13 19:56:56 +00:00
Coroiu Cristina
819630de4b Backed out changeset 2f04abdb752c (bug 1622327) for build bustage on a CLOSED TREE 2020-03-13 20:02:43 +02:00
Jeff Muizelaar
68bc5d8e20 Bug 1622327. Add support for adding profiling event markers to WebRender. r=kvark
I plan on using this to add texture cache reallocation events.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 17:39:17 +00:00
Jeff Muizelaar
a3f3aaddc9 Bug 1588955. Handle overflow more gracefully in GenerateFallbackData. r=aosmond
It turns out intersecting a rect with an empty rect doesn't
guarantee that the result is empty if overflow happens.

We work around this by checking dtRect for empty as well.

See 1622126 for more details.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 00:35:18 +00:00
Sean Feng
5885e10fa0 Bug 1600793 - Make the scrolling input telemetry work for WebRender r=botond,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60046

--HG--
extra : moz-landing-system : lando
2020-03-12 17:39:59 +00:00
Miko Mynttinen
8168ef50b5 Bug 1620005 - Refactor WebRender display item caching r=jrmuizel
DisplayItemBuilder now has methods:
```
void StartGroup(nsPaintedDisplayItem* aItem);
void CancelGroup();
void FinishGroup();
bool ReuseItem(nsPaintedDisplayItem* aItem);
```
WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().

For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
```
aBuilder.StartGroup(this);
aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                  wr::ToColorF(ToDeviceColor(mColor)));
aBuilder.FinishGroup();
```

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

--HG--
extra : moz-landing-system : lando
2020-03-11 18:13:45 +00:00
sotaro
2e6730be8d Bug 1618429 - Add RecycleAllocator support to ImageContainer for RDD process r=nical
Differential Revision: https://phabricator.services.mozilla.com/D64508

--HG--
extra : moz-landing-system : lando
2020-03-11 10:52:48 +00:00
Gerald Squelart
9e0576b94c Bug 1620515 - Replace BlocksRingBuffer::EntryReader/Writer with ProfileBufferEntryReader/Writer - r=canaltinova
The new ProfileBufferEntryReader/Writer are now used everywhere, including in
the profilers and tests.
The old EntryReader/Writer have been removed.

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

--HG--
extra : moz-landing-system : lando
2020-03-11 21:59:19 +00:00
Andreea Pavel
b154619cbb Backed out changeset 91760460f914 (bug 1620005) for build bustages on a CLOSED TREE 2020-03-11 19:57:28 +02:00
Miko Mynttinen
ccd17c0d43 Bug 1620005 - Refactor WebRender display item caching r=jrmuizel
DisplayItemBuilder now has methods:
```
void StartGroup(nsPaintedDisplayItem* aItem);
void CancelGroup();
void FinishGroup();
bool ReuseItem(nsPaintedDisplayItem* aItem);
```
WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().

For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
```
aBuilder.StartGroup(this);
aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                  wr::ToColorF(ToDeviceColor(mColor)));
aBuilder.FinishGroup();
```

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

--HG--
extra : moz-landing-system : lando
2020-03-11 17:40:18 +00:00
shindli
b02b3a6e1a Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
--HG--
rename : mfbt/CompactPair.h => mfbt/Pair.h
2020-03-11 14:30:54 +02:00
Chris Fronk
a27e438c2d Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-11 12:18:13 +00:00
Hiroyuki Ikezoe
ff2144a3cd Bug 1620873 - Make MotionPathData Maybe<MotionPathData> in TransformData. r=boris
Having MotionPathData in layers::Animation is a bit inefficient for animations
other than transform like properties.

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

--HG--
extra : moz-landing-system : lando
2020-03-10 01:30:08 +00:00