Remove MainThreadScrollingReason::kNoScrollingLayer
Previously ScrollTree::GetMainThreadRepaintReasons() returned kNoScrollingLayer for a ScrollNode with !is_composited && !main_thread_scrolling_reasons, which happened only if blink omitted painting the transform node for a non-composited scroller [1]. 0.02% (Android [1]) and 0.4% (Windows [2]) of scrolls were with this reason. The reason caused the scrolls to be blocked by the main thread, but that was unnecessary because the scrollers were not visible. Now add ScrollTree::ShouldRealizeScrollsOnMain() to replace some !CanRealizeScrollsOnCompositor() callsites (both functions return false if the transform node is not painted), to avoid main-thread scroll update for invisible scrollers. This also prepares for RasterInducingScroll which will introduce CanRealizeScrollsOnPendingTree() (and CanRealizeScrollsOnCompositor() will become CanRealizeScrollOnActiveTree()), which will apply for scroll nodes with !is_composited && !main_thread_scrolling_reasons. This CL makes it possible to repurpose the condition for scroll nodes applicable for RasterInducingScroll. [1] https://chromium-review.googlesource.com/c/chromium/src/+/5368550/3/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.cc#618 [2] https://uma.googleplex.com/p/chrome/timeline_v2?sid=d5728bceab6ac2663d0474d53a08711e [3] https://uma.googleplex.com/p/chrome/timeline_v2?sid=8eae2fe4139db6dc62d78be9bc1448de Bug: 40256365, 40517276 Change-Id: I0b0e3b6488b980accd9a89caabcd809ea0f12169 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368550 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/main@{#1273497}
Loading
Please register or sign in to comment