Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(854)

Unified Diff: cc/trees/thread_proxy.cc

Issue 522903002: cc: Be less aggressive about scheduling for scroll handlers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed scheduler part. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 688937eda3a8f15fc3e0daf9c8452d84926f0bbe..ff99224642d50702cc64cb38e83785bfc02dae66 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -1334,8 +1334,7 @@ void ThreadProxy::RenewTreePriority() {
bool smoothness_takes_priority =
impl().layer_tree_host_impl->pinch_gesture_active() ||
impl().layer_tree_host_impl->page_scale_animation_active() ||
- (impl().layer_tree_host_impl->IsCurrentlyScrolling() &&
- !impl().layer_tree_host_impl->scroll_affects_scroll_handler());
+ impl().layer_tree_host_impl->IsCurrentlyScrolling();
// Schedule expiration if smoothness currently takes priority.
if (smoothness_takes_priority)
@@ -1362,8 +1361,14 @@ void ThreadProxy::RenewTreePriority() {
}
impl().layer_tree_host_impl->SetTreePriority(priority);
- impl().scheduler->SetSmoothnessTakesPriority(priority ==
- SMOOTHNESS_TAKES_PRIORITY);
+
+ // Only put the scheduler in impl latency prioritization mode if we don't
+ // have a scroll listener. This gives the scroll listener a better chance of
+ // handling scroll updates within the same frame. The tree itself is still
+ // kept in prefer smoothness mode to allow checkerboarding.
+ impl().scheduler->SetImplLatencyTakesPriority(
+ priority == SMOOTHNESS_TAKES_PRIORITY &&
+ !impl().layer_tree_host_impl->scroll_affects_scroll_handler());
// Notify the the client of this compositor via the output surface.
// TODO(epenner): Route this to compositor-thread instead of output-surface
« no previous file with comments | « cc/scheduler/scheduler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698