| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 DCHECK(IsMainThread()); | 260 DCHECK(IsMainThread()); |
| 261 if (main().commit_request_sent_to_impl_thread) | 261 if (main().commit_request_sent_to_impl_thread) |
| 262 return; | 262 return; |
| 263 main().commit_request_sent_to_impl_thread = true; | 263 main().commit_request_sent_to_impl_thread = true; |
| 264 Proxy::ImplThreadTaskRunner()->PostTask( | 264 Proxy::ImplThreadTaskRunner()->PostTask( |
| 265 FROM_HERE, | 265 FROM_HERE, |
| 266 base::Bind(&ThreadProxy::SetNeedsCommitOnImplThread, | 266 base::Bind(&ThreadProxy::SetNeedsCommitOnImplThread, |
| 267 impl_thread_weak_ptr_)); | 267 impl_thread_weak_ptr_)); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void ThreadProxy::DidCompletePageScaleAnimation() { |
| 271 DCHECK(IsMainThread()); |
| 272 layer_tree_host()->DidCompletePageScaleAnimation(); |
| 273 } |
| 274 |
| 270 const RendererCapabilities& ThreadProxy::GetRendererCapabilities() const { | 275 const RendererCapabilities& ThreadProxy::GetRendererCapabilities() const { |
| 271 DCHECK(IsMainThread()); | 276 DCHECK(IsMainThread()); |
| 272 DCHECK(!layer_tree_host()->output_surface_lost()); | 277 DCHECK(!layer_tree_host()->output_surface_lost()); |
| 273 return main().renderer_capabilities_main_thread_copy; | 278 return main().renderer_capabilities_main_thread_copy; |
| 274 } | 279 } |
| 275 | 280 |
| 276 void ThreadProxy::SetNeedsAnimate() { | 281 void ThreadProxy::SetNeedsAnimate() { |
| 277 DCHECK(IsMainThread()); | 282 DCHECK(IsMainThread()); |
| 278 if (main().animate_requested) | 283 if (main().animate_requested) |
| 279 return; | 284 return; |
| (...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 } | 1351 } |
| 1347 | 1352 |
| 1348 impl().timing_history.DidActivateSyncTree(); | 1353 impl().timing_history.DidActivateSyncTree(); |
| 1349 } | 1354 } |
| 1350 | 1355 |
| 1351 void ThreadProxy::DidPrepareTiles() { | 1356 void ThreadProxy::DidPrepareTiles() { |
| 1352 DCHECK(IsImplThread()); | 1357 DCHECK(IsImplThread()); |
| 1353 impl().scheduler->DidPrepareTiles(); | 1358 impl().scheduler->DidPrepareTiles(); |
| 1354 } | 1359 } |
| 1355 | 1360 |
| 1361 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
| 1362 DCHECK(IsImplThread()); |
| 1363 Proxy::MainThreadTaskRunner()->PostTask( |
| 1364 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
| 1365 main_thread_weak_ptr_)); |
| 1366 } |
| 1367 |
| 1356 } // namespace cc | 1368 } // namespace cc |
| OLD | NEW |