Commit 6059c240 authored by Nick Burris's avatar Nick Burris Committed by Commit Bot

[ScrollUnification] Only collect scroll translations behind feature flag

In https://crrev.com/c/2089973, the ScrollUnification feature flag was
added along with various changes to ensure the compositor has the
complete scroll tree. Most of that CL was behind the feature flag,
except for traversing the LocalFrameView set to gather all scroll
translation nodes, which is likely the cause of the regressions in
bug 1081923. This patch puts this step behind the feature flag as well.

Bug: 1081923 1047178
Change-Id: I6ee3e3f60c29c1739c3221871e0baf8a96d114ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199597
Commit-Queue: Nick Burris <nburris@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#768518}
parent 0265aed6
...@@ -3005,11 +3005,13 @@ void LocalFrameView::PushPaintArtifactToCompositor() { ...@@ -3005,11 +3005,13 @@ void LocalFrameView::PushPaintArtifactToCompositor() {
} }
WTF::Vector<const TransformPaintPropertyNode*> scroll_translation_nodes; WTF::Vector<const TransformPaintPropertyNode*> scroll_translation_nodes;
ForAllNonThrottledLocalFrameViews( if (RuntimeEnabledFeatures::ScrollUnificationEnabled()) {
[&scroll_translation_nodes](LocalFrameView& frame_view) { ForAllNonThrottledLocalFrameViews(
scroll_translation_nodes.AppendVector( [&scroll_translation_nodes](LocalFrameView& frame_view) {
frame_view.GetScrollTranslationNodes()); scroll_translation_nodes.AppendVector(
}); frame_view.GetScrollTranslationNodes());
});
}
paint_artifact_compositor_->Update( paint_artifact_compositor_->Update(
paint_controller_->GetPaintArtifactShared(), viewport_properties, paint_controller_->GetPaintArtifactShared(), viewport_properties,
......
...@@ -1226,6 +1226,8 @@ void PaintArtifactCompositor::Update( ...@@ -1226,6 +1226,8 @@ void PaintArtifactCompositor::Update(
const ViewportProperties& viewport_properties, const ViewportProperties& viewport_properties,
const Settings& settings, const Settings& settings,
const Vector<const TransformPaintPropertyNode*>& scroll_translation_nodes) { const Vector<const TransformPaintPropertyNode*>& scroll_translation_nodes) {
DCHECK(scroll_translation_nodes.IsEmpty() ||
RuntimeEnabledFeatures::ScrollUnificationEnabled());
DCHECK(NeedsUpdate()); DCHECK(NeedsUpdate());
DCHECK(root_layer_); DCHECK(root_layer_);
// The tree will be null after detaching and this update can be ignored. // The tree will be null after detaching and this update can be ignored.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment