OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |