Commit 915733a1 authored by David Bokan's avatar David Bokan Committed by Commit Bot

Remove member for have_scroll_event_handlers

The scheduler prioritizes commits when we're in a scroll and there's
a scroll handler. Today this is done by checking for scroll event
handlers in scroll begin and storing that state. It seems like we could
simply apply the scheduling strategy dynamically after scroll begin,
which allows us to remove some connections between LayerTreeHostImpl and
the ThreadedInputHandler.

Bug: 915926
Change-Id: Ic7b0c7b388f77c2f708e5f73c235a9a0e5511d1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363724
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799597}
parent 976e7da2
...@@ -2017,7 +2017,6 @@ void ThreadedInputHandler::ClearCurrentlyScrollingNode() { ...@@ -2017,7 +2017,6 @@ void ThreadedInputHandler::ClearCurrentlyScrollingNode() {
latched_scroll_type_.reset(); latched_scroll_type_.reset();
last_scroll_update_state_.reset(); last_scroll_update_state_.reset();
last_scroll_begin_state_.reset(); last_scroll_begin_state_.reset();
host_impl_.DidEndScroll();
} }
bool ThreadedInputHandler::ScrollAnimationUpdateTarget( bool ThreadedInputHandler::ScrollAnimationUpdateTarget(
......
...@@ -316,14 +316,9 @@ void LayerTreeHostImpl::DidUpdatePinchZoom() { ...@@ -316,14 +316,9 @@ void LayerTreeHostImpl::DidUpdatePinchZoom() {
} }
void LayerTreeHostImpl::DidStartScroll() { void LayerTreeHostImpl::DidStartScroll() {
scroll_affects_scroll_handler_ = active_tree()->have_scroll_event_handlers();
client_->RenewTreePriority(); client_->RenewTreePriority();
} }
void LayerTreeHostImpl::DidEndScroll() {
scroll_affects_scroll_handler_ = false;
}
void LayerTreeHostImpl::DidSetRootScrollOffsetForSynchronousInputHandler() { void LayerTreeHostImpl::DidSetRootScrollOffsetForSynchronousInputHandler() {
// TODO(bokan): Do these really need to be manually called? (Rather than // TODO(bokan): Do these really need to be manually called? (Rather than
// damage/redraw being set from scroll offset changes). // damage/redraw being set from scroll offset changes).
...@@ -2992,7 +2987,8 @@ bool LayerTreeHostImpl::IsActivelyPrecisionScrolling() const { ...@@ -2992,7 +2987,8 @@ bool LayerTreeHostImpl::IsActivelyPrecisionScrolling() const {
bool LayerTreeHostImpl::ScrollAffectsScrollHandler() const { bool LayerTreeHostImpl::ScrollAffectsScrollHandler() const {
return settings_.enable_synchronized_scrolling && return settings_.enable_synchronized_scrolling &&
scroll_affects_scroll_handler_; input_delegate_->IsCurrentlyScrolling() &&
active_tree()->have_scroll_event_handlers();
} }
void LayerTreeHostImpl::CreatePendingTree() { void LayerTreeHostImpl::CreatePendingTree() {
......
...@@ -402,7 +402,6 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler, ...@@ -402,7 +402,6 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler,
void DidEndPinchZoom(); void DidEndPinchZoom();
void DidUpdatePinchZoom(); void DidUpdatePinchZoom();
void DidStartScroll(); void DidStartScroll();
void DidEndScroll();
void DidSetRootScrollOffsetForSynchronousInputHandler(); void DidSetRootScrollOffsetForSynchronousInputHandler();
FrameSequenceTrackerCollection& frame_trackers() { return frame_trackers_; } FrameSequenceTrackerCollection& frame_trackers() { return frame_trackers_; }
ImplThreadPhase GetCompositorThreadPhase() const; ImplThreadPhase GetCompositorThreadPhase() const;
...@@ -1178,13 +1177,6 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler, ...@@ -1178,13 +1177,6 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler,
bool doing_sync_draw_ = false; bool doing_sync_draw_ = false;
#endif #endif
// This is used to tell the scheduler there are active scroll handlers on the
// page so we should prioritize latency during a scroll to try to keep
// scroll-linked effects up to data.
// TODO(bokan): This is quite old and scheduling has become much more
// sophisticated since so it's not clear how much value it's still providing.
bool scroll_affects_scroll_handler_ = false;
// Provides support for PaintWorklets which depend on input properties that // Provides support for PaintWorklets which depend on input properties that
// are being animated by the compositor (aka 'animated' PaintWorklets). // are being animated by the compositor (aka 'animated' PaintWorklets).
// Responsible for storing animated custom property values and for // Responsible for storing animated custom property values and for
......
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