| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 void ThreadProxy::SetMaxSwapsPendingOnImplThread(int max) { | 343 void ThreadProxy::SetMaxSwapsPendingOnImplThread(int max) { |
| 344 impl().scheduler->SetMaxSwapsPending(max); | 344 impl().scheduler->SetMaxSwapsPending(max); |
| 345 } | 345 } |
| 346 | 346 |
| 347 void ThreadProxy::DidSwapBuffersOnImplThread() { | 347 void ThreadProxy::DidSwapBuffersOnImplThread() { |
| 348 impl().scheduler->DidSwapBuffers(); | 348 impl().scheduler->DidSwapBuffers(); |
| 349 } | 349 } |
| 350 | 350 |
| 351 void ThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 351 void ThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
| 352 TRACE_EVENT0("cc", "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 352 TRACE_EVENT0("cc,benchmark", |
| 353 "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| 353 DCHECK(IsImplThread()); | 354 DCHECK(IsImplThread()); |
| 354 impl().scheduler->DidSwapBuffersComplete(); | 355 impl().scheduler->DidSwapBuffersComplete(); |
| 355 Proxy::MainThreadTaskRunner()->PostTask( | 356 Proxy::MainThreadTaskRunner()->PostTask( |
| 356 FROM_HERE, | 357 FROM_HERE, |
| 357 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 358 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 358 } | 359 } |
| 359 | 360 |
| 360 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 361 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 361 impl().layer_tree_host_impl->WillBeginImplFrame(args); | 362 impl().layer_tree_host_impl->WillBeginImplFrame(args); |
| 362 } | 363 } |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 } | 1360 } |
| 1360 | 1361 |
| 1361 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1362 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
| 1362 DCHECK(IsImplThread()); | 1363 DCHECK(IsImplThread()); |
| 1363 Proxy::MainThreadTaskRunner()->PostTask( | 1364 Proxy::MainThreadTaskRunner()->PostTask( |
| 1364 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1365 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
| 1365 main_thread_weak_ptr_)); | 1366 main_thread_weak_ptr_)); |
| 1366 } | 1367 } |
| 1367 | 1368 |
| 1368 } // namespace cc | 1369 } // namespace cc |
| OLD | NEW |