gecko-dev/gfx/webrender_bindings/src
Jamie Nicol 3e85fea00a Bug 1694707 - Select correct scroll root within fixed position items with dynamic toolbar. r=gw
Currently when selecting the scroll root for picture caching, if a
non-Zoom transform is encountered we give up and select the root
spatial node. This is because the transform may be non-axis aligned.

When the Fenix dynamic toolbar is enabled, fixed position items must
create a spatial node with an animated transform, so that they can be
positioned asynchronously by APZ when the toolbar moves.

The combination of these two things means for that scroll frames
within fixed position items we always select the root spatial node,
meaning that the entire contents invalidates continuously while
scrolling.

To fix this, add a flag to the Transform ReferenceFrameKind which
marks the transform as always being a 2D scale or translation. When
selecting the scroll root, we can continue searching through such
reference frames, as we already do for Zoom frames. Set this flag true
for references frames created due to the dynamic toolbar.
Additionally, assert that the transform is indeed a 2d scale or
translation after it is resolved.

The condition of the transform being only a 2d scale and translation
is shared with ReferenceFrameKind::Zoom, so that has been removed and
its uses updated to use this new flag instead. An additional
should_snap flag has also been added, so that we continue to snap zoom
transforms, and additionally snap the dynamic-toolbar related
transforms too.

Lastly, this adds some unit tests for find_scroll_root.

Differential Revision: https://phabricator.services.mozilla.com/D106809
2021-03-02 21:53:41 +00:00
..
bindings.rs Bug 1694707 - Select correct scroll root within fixed position items with dynamic toolbar. r=gw 2021-03-02 21:53:41 +00:00
lib.rs Bug 1655298 - Pass in MallocSizeOfOps to reporter. r=gw 2020-07-27 02:55:47 +00:00
moz2d_renderer.rs Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio 2021-01-16 15:36:39 +00:00
program_cache.rs Bug 1676513 - Fix clippy warnings r=emilio,webdriver-reviewers,whimboo,rhunt 2020-11-17 12:02:22 +00:00
swgl_bindings.rs Bug 1687536 - Move SWGL compositor into WebRender proper. r=lsalzman 2021-02-07 20:04:14 +00:00