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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1173 impl().input_throttled_until_commit) { | 1173 impl().input_throttled_until_commit) { |
1174 // Once we enter NEW_CONTENTS_TAKES_PRIORITY mode, visible tiles on active | 1174 // Once we enter NEW_CONTENTS_TAKES_PRIORITY mode, visible tiles on active |
1175 // tree might be freed. We need to set RequiresHighResToDraw to ensure that | 1175 // tree might be freed. We need to set RequiresHighResToDraw to ensure that |
1176 // high res tiles will be required to activate pending tree. | 1176 // high res tiles will be required to activate pending tree. |
1177 impl().layer_tree_host_impl->SetRequiresHighResToDraw(); | 1177 impl().layer_tree_host_impl->SetRequiresHighResToDraw(); |
1178 priority = NEW_CONTENT_TAKES_PRIORITY; | 1178 priority = NEW_CONTENT_TAKES_PRIORITY; |
1179 } | 1179 } |
1180 | 1180 |
1181 impl().layer_tree_host_impl->SetTreePriority(priority); | 1181 impl().layer_tree_host_impl->SetTreePriority(priority); |
1182 | 1182 |
1183 // Only put the scheduler in impl latency prioritization mode if we don't | 1183 // Put the scheduler in impl latency prioritization mode if there's no new |
Sami
2015/08/26 13:38:01
nit: the comment isn't entirely accurate (we might
alex clarke (OOO till 29th)
2015/08/27 12:02:51
As discussed offline I'm going to do this in a sep
| |
1184 // have a scroll listener. This gives the scroll listener a better chance of | 1184 // content. This signal is also used by the renderer scheduler to work out if |
1185 // handling scroll updates within the same frame. The tree itself is still | 1185 // compositor tasks are on the critical path or not. |
1186 // kept in prefer smoothness mode to allow checkerboarding. | 1186 impl().scheduler->SetImplLatencyTakesPriority(priority != |
1187 impl().scheduler->SetImplLatencyTakesPriority( | 1187 NEW_CONTENT_TAKES_PRIORITY); |
1188 priority == SMOOTHNESS_TAKES_PRIORITY && | |
1189 !impl().layer_tree_host_impl->scroll_affects_scroll_handler()); | |
1190 | 1188 |
1191 // Notify the the client of this compositor via the output surface. | 1189 // Notify the the client of this compositor via the output surface. |
1192 // TODO(epenner): Route this to compositor-thread instead of output-surface | 1190 // TODO(epenner): Route this to compositor-thread instead of output-surface |
1193 // after GTFO refactor of compositor-thread (http://crbug/170828). | 1191 // after GTFO refactor of compositor-thread (http://crbug/170828). |
1194 if (impl().layer_tree_host_impl->output_surface()) { | 1192 if (impl().layer_tree_host_impl->output_surface()) { |
1195 impl() | 1193 impl() |
1196 .layer_tree_host_impl->output_surface() | 1194 .layer_tree_host_impl->output_surface() |
1197 ->UpdateSmoothnessTakesPriority(priority == SMOOTHNESS_TAKES_PRIORITY); | 1195 ->UpdateSmoothnessTakesPriority(priority == SMOOTHNESS_TAKES_PRIORITY); |
1198 } | 1196 } |
1199 } | 1197 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1254 | 1252 |
1255 void ThreadProxy::PostFrameTimingEvents( | 1253 void ThreadProxy::PostFrameTimingEvents( |
1256 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 1254 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
1257 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | 1255 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
1258 DCHECK(IsMainThread()); | 1256 DCHECK(IsMainThread()); |
1259 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), | 1257 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), |
1260 main_frame_events.Pass()); | 1258 main_frame_events.Pass()); |
1261 } | 1259 } |
1262 | 1260 |
1263 } // namespace cc | 1261 } // namespace cc |
OLD | NEW |