зеркало из https://github.com/mozilla/gecko-dev.git
3e85fea00a
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 |
||
---|---|---|
.. | ||
bindings.rs | ||
lib.rs | ||
moz2d_renderer.rs | ||
program_cache.rs | ||
swgl_bindings.rs |