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