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

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: 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
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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 impl().layer_tree_host_impl->SetRequiresHighResToDraw(); 1170 impl().layer_tree_host_impl->SetRequiresHighResToDraw();
1171 priority = NEW_CONTENT_TAKES_PRIORITY; 1171 priority = NEW_CONTENT_TAKES_PRIORITY;
1172 } 1172 }
1173 1173
1174 impl().layer_tree_host_impl->SetTreePriority(priority); 1174 impl().layer_tree_host_impl->SetTreePriority(priority);
1175 1175
1176 // Only put the scheduler in impl latency prioritization mode if we don't 1176 // Only put the scheduler in impl latency prioritization mode if we don't
1177 // have a scroll listener. This gives the scroll listener a better chance of 1177 // have a scroll listener. This gives the scroll listener a better chance of
1178 // handling scroll updates within the same frame. The tree itself is still 1178 // handling scroll updates within the same frame. The tree itself is still
1179 // kept in prefer smoothness mode to allow checkerboarding. 1179 // kept in prefer smoothness mode to allow checkerboarding.
1180 impl().scheduler->SetImplLatencyTakesPriority( 1180 impl().scheduler->SetSmoothnessMode(
1181 priority == SMOOTHNESS_TAKES_PRIORITY && 1181 priority == SMOOTHNESS_TAKES_PRIORITY,
1182 !impl().layer_tree_host_impl->scroll_affects_scroll_handler()); 1182 impl().layer_tree_host_impl->scroll_affects_scroll_handler());
1183 1183
1184 // Notify the the client of this compositor via the output surface. 1184 // Notify the the client of this compositor via the output surface.
1185 // TODO(epenner): Route this to compositor-thread instead of output-surface 1185 // TODO(epenner): Route this to compositor-thread instead of output-surface
1186 // after GTFO refactor of compositor-thread (http://crbug/170828). 1186 // after GTFO refactor of compositor-thread (http://crbug/170828).
1187 if (impl().layer_tree_host_impl->output_surface()) { 1187 if (impl().layer_tree_host_impl->output_surface()) {
1188 impl() 1188 impl()
1189 .layer_tree_host_impl->output_surface() 1189 .layer_tree_host_impl->output_surface()
1190 ->UpdateSmoothnessTakesPriority(priority == SMOOTHNESS_TAKES_PRIORITY); 1190 ->UpdateSmoothnessTakesPriority(priority == SMOOTHNESS_TAKES_PRIORITY);
1191 } 1191 }
1192 } 1192 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 1270
1271 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { 1271 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() {
1272 return main_thread_weak_ptr_; 1272 return main_thread_weak_ptr_;
1273 } 1273 }
1274 1274
1275 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { 1275 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() {
1276 return impl_thread_weak_ptr_; 1276 return impl_thread_weak_ptr_;
1277 } 1277 }
1278 1278
1279 } // namespace cc 1279 } // namespace cc
OLDNEW
« cc/scheduler/scheduler_state_machine.cc ('K') | « cc/scheduler/scheduler_state_machine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698