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

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: Created 6 years, 4 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 | « no previous file | 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 4a95140226db8fd2c72da44e632ebdd880bf1f5e..f05083b9b7f0ca38ef529d19efd3612aedadeaa7 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -1327,8 +1327,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)
@@ -1355,8 +1354,14 @@ void ThreadProxy::RenewTreePriority() {
}
impl().layer_tree_host_impl->SetTreePriority(priority);
- impl().scheduler->SetSmoothnessTakesPriority(priority ==
- SMOOTHNESS_TAKES_PRIORITY);
+
+ // Only put the scheduler in prefer_smoothness_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->SetSmoothnessTakesPriority(
brianderson 2014/09/03 20:01:57 Should we rename the concept in the scheduler sinc
+ 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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698