| 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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { | 1120 base::TimeDelta ThreadProxy::CommitToActivateDurationEstimate() { |
| 1121 return impl().timing_history.CommitToActivateDurationEstimate(); | 1121 return impl().timing_history.CommitToActivateDurationEstimate(); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 void ThreadProxy::DidBeginImplFrameDeadline() { | 1124 void ThreadProxy::DidBeginImplFrameDeadline() { |
| 1125 impl().layer_tree_host_impl->ResetCurrentBeginFrameArgsForNextFrame(); | 1125 impl().layer_tree_host_impl->ResetCurrentBeginFrameArgsForNextFrame(); |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 void ThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 1129 NOTREACHED() << "Only used by SingleThreadProxy"; |
| 1130 } |
| 1131 |
| 1128 void ThreadProxy::ReadyToFinalizeTextureUpdates() { | 1132 void ThreadProxy::ReadyToFinalizeTextureUpdates() { |
| 1129 DCHECK(IsImplThread()); | 1133 DCHECK(IsImplThread()); |
| 1130 impl().scheduler->NotifyReadyToCommit(); | 1134 impl().scheduler->NotifyReadyToCommit(); |
| 1131 } | 1135 } |
| 1132 | 1136 |
| 1133 void ThreadProxy::DidCommitAndDrawFrame() { | 1137 void ThreadProxy::DidCommitAndDrawFrame() { |
| 1134 DCHECK(IsMainThread()); | 1138 DCHECK(IsMainThread()); |
| 1135 layer_tree_host()->DidCommitAndDrawFrame(); | 1139 layer_tree_host()->DidCommitAndDrawFrame(); |
| 1136 } | 1140 } |
| 1137 | 1141 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 FROM_HERE, | 1277 FROM_HERE, |
| 1274 base::Bind(&ThreadProxy::MainFrameWillHappenOnImplThreadForTesting, | 1278 base::Bind(&ThreadProxy::MainFrameWillHappenOnImplThreadForTesting, |
| 1275 impl_thread_weak_ptr_, | 1279 impl_thread_weak_ptr_, |
| 1276 &completion, | 1280 &completion, |
| 1277 &main_frame_will_happen)); | 1281 &main_frame_will_happen)); |
| 1278 completion.Wait(); | 1282 completion.Wait(); |
| 1279 } | 1283 } |
| 1280 return main_frame_will_happen; | 1284 return main_frame_will_happen; |
| 1281 } | 1285 } |
| 1282 | 1286 |
| 1287 void ThreadProxy::SetChildrenNeedBeginFrames(bool children_need_begin_frames) { |
| 1288 NOTREACHED() << "Only used by SingleThreadProxy"; |
| 1289 } |
| 1290 |
| 1283 void ThreadProxy::MainFrameWillHappenOnImplThreadForTesting( | 1291 void ThreadProxy::MainFrameWillHappenOnImplThreadForTesting( |
| 1284 CompletionEvent* completion, | 1292 CompletionEvent* completion, |
| 1285 bool* main_frame_will_happen) { | 1293 bool* main_frame_will_happen) { |
| 1286 DCHECK(IsImplThread()); | 1294 DCHECK(IsImplThread()); |
| 1287 if (impl().layer_tree_host_impl->output_surface()) { | 1295 if (impl().layer_tree_host_impl->output_surface()) { |
| 1288 *main_frame_will_happen = impl().scheduler->MainFrameForTestingWillHappen(); | 1296 *main_frame_will_happen = impl().scheduler->MainFrameForTestingWillHappen(); |
| 1289 } else { | 1297 } else { |
| 1290 *main_frame_will_happen = false; | 1298 *main_frame_will_happen = false; |
| 1291 } | 1299 } |
| 1292 completion->Signal(); | 1300 completion->Signal(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 | 1371 |
| 1364 impl().timing_history.DidActivateSyncTree(); | 1372 impl().timing_history.DidActivateSyncTree(); |
| 1365 } | 1373 } |
| 1366 | 1374 |
| 1367 void ThreadProxy::DidManageTiles() { | 1375 void ThreadProxy::DidManageTiles() { |
| 1368 DCHECK(IsImplThread()); | 1376 DCHECK(IsImplThread()); |
| 1369 impl().scheduler->DidManageTiles(); | 1377 impl().scheduler->DidManageTiles(); |
| 1370 } | 1378 } |
| 1371 | 1379 |
| 1372 } // namespace cc | 1380 } // namespace cc |
| OLD | NEW |