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

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 1425973003: cc: Don't attempt main thread synchronization if it is slow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on 1415763008; existing tests pass; new tests needed Created 5 years, 1 month 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 unified diff | Download patch
« cc/scheduler/scheduler.cc ('K') | « cc/test/scheduler_test_common.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 impl().layer_tree_host_impl->SetRequiresHighResToDraw(); 1089 impl().layer_tree_host_impl->SetRequiresHighResToDraw();
1090 priority = NEW_CONTENT_TAKES_PRIORITY; 1090 priority = NEW_CONTENT_TAKES_PRIORITY;
1091 } 1091 }
1092 1092
1093 impl().layer_tree_host_impl->SetTreePriority(priority); 1093 impl().layer_tree_host_impl->SetTreePriority(priority);
1094 1094
1095 // Only put the scheduler in impl latency prioritization mode if we don't 1095 // Only put the scheduler in impl latency prioritization mode if we don't
1096 // have a scroll listener. This gives the scroll listener a better chance of 1096 // have a scroll listener. This gives the scroll listener a better chance of
1097 // handling scroll updates within the same frame. The tree itself is still 1097 // handling scroll updates within the same frame. The tree itself is still
1098 // kept in prefer smoothness mode to allow checkerboarding. 1098 // kept in prefer smoothness mode to allow checkerboarding.
1099 impl().scheduler->SetImplLatencyTakesPriority( 1099 impl().scheduler->SetSmoothnessMode(
1100 priority == SMOOTHNESS_TAKES_PRIORITY && 1100 priority == SMOOTHNESS_TAKES_PRIORITY,
1101 !impl().layer_tree_host_impl->scroll_affects_scroll_handler()); 1101 impl().layer_tree_host_impl->scroll_affects_scroll_handler());
1102 1102
1103 // Notify the the client of this compositor via the output surface. 1103 // Notify the the client of this compositor via the output surface.
1104 // TODO(epenner): Route this to compositor-thread instead of output-surface 1104 // TODO(epenner): Route this to compositor-thread instead of output-surface
1105 // after GTFO refactor of compositor-thread (http://crbug/170828). 1105 // after GTFO refactor of compositor-thread (http://crbug/170828).
1106 if (impl().layer_tree_host_impl->output_surface()) { 1106 if (impl().layer_tree_host_impl->output_surface()) {
1107 impl() 1107 impl()
1108 .layer_tree_host_impl->output_surface() 1108 .layer_tree_host_impl->output_surface()
1109 ->UpdateSmoothnessTakesPriority(priority == SMOOTHNESS_TAKES_PRIORITY); 1109 ->UpdateSmoothnessTakesPriority(priority == SMOOTHNESS_TAKES_PRIORITY);
1110 } 1110 }
1111 } 1111 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1186
1187 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { 1187 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() {
1188 return main_thread_weak_ptr_; 1188 return main_thread_weak_ptr_;
1189 } 1189 }
1190 1190
1191 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { 1191 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() {
1192 return impl_thread_weak_ptr_; 1192 return impl_thread_weak_ptr_;
1193 } 1193 }
1194 1194
1195 } // namespace cc 1195 } // namespace cc
OLDNEW
« cc/scheduler/scheduler.cc ('K') | « cc/test/scheduler_test_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698