| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 DCHECK(IsMainThread()); | 244 DCHECK(IsMainThread()); |
| 245 if (main().commit_request_sent_to_impl_thread) | 245 if (main().commit_request_sent_to_impl_thread) |
| 246 return; | 246 return; |
| 247 main().commit_request_sent_to_impl_thread = true; | 247 main().commit_request_sent_to_impl_thread = true; |
| 248 Proxy::ImplThreadTaskRunner()->PostTask( | 248 Proxy::ImplThreadTaskRunner()->PostTask( |
| 249 FROM_HERE, | 249 FROM_HERE, |
| 250 base::Bind(&ThreadProxy::SetNeedsCommitOnImplThread, | 250 base::Bind(&ThreadProxy::SetNeedsCommitOnImplThread, |
| 251 impl_thread_weak_ptr_)); | 251 impl_thread_weak_ptr_)); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void ThreadProxy::DidCompletePageScaleAnimation() { |
| 255 DCHECK(IsMainThread()); |
| 256 layer_tree_host()->DidCompletePageScaleAnimation(); |
| 257 } |
| 258 |
| 254 const RendererCapabilities& ThreadProxy::GetRendererCapabilities() const { | 259 const RendererCapabilities& ThreadProxy::GetRendererCapabilities() const { |
| 255 DCHECK(IsMainThread()); | 260 DCHECK(IsMainThread()); |
| 256 DCHECK(!layer_tree_host()->output_surface_lost()); | 261 DCHECK(!layer_tree_host()->output_surface_lost()); |
| 257 return main().renderer_capabilities_main_thread_copy; | 262 return main().renderer_capabilities_main_thread_copy; |
| 258 } | 263 } |
| 259 | 264 |
| 260 void ThreadProxy::SetNeedsAnimate() { | 265 void ThreadProxy::SetNeedsAnimate() { |
| 261 DCHECK(IsMainThread()); | 266 DCHECK(IsMainThread()); |
| 262 if (main().animate_requested) | 267 if (main().animate_requested) |
| 263 return; | 268 return; |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 } | 1338 } |
| 1334 | 1339 |
| 1335 impl().timing_history.DidActivateSyncTree(); | 1340 impl().timing_history.DidActivateSyncTree(); |
| 1336 } | 1341 } |
| 1337 | 1342 |
| 1338 void ThreadProxy::DidPrepareTiles() { | 1343 void ThreadProxy::DidPrepareTiles() { |
| 1339 DCHECK(IsImplThread()); | 1344 DCHECK(IsImplThread()); |
| 1340 impl().scheduler->DidPrepareTiles(); | 1345 impl().scheduler->DidPrepareTiles(); |
| 1341 } | 1346 } |
| 1342 | 1347 |
| 1348 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
| 1349 DCHECK(IsImplThread()); |
| 1350 Proxy::MainThreadTaskRunner()->PostTask( |
| 1351 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
| 1352 main_thread_weak_ptr_)); |
| 1353 } |
| 1354 |
| 1343 } // namespace cc | 1355 } // namespace cc |
| OLD | NEW |