| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 void ThreadProxy::SetMaxSwapsPendingOnImplThread(int max) { | 338 void ThreadProxy::SetMaxSwapsPendingOnImplThread(int max) { |
| 339 impl().scheduler->SetMaxSwapsPending(max); | 339 impl().scheduler->SetMaxSwapsPending(max); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void ThreadProxy::DidSwapBuffersOnImplThread() { | 342 void ThreadProxy::DidSwapBuffersOnImplThread() { |
| 343 impl().scheduler->DidSwapBuffers(); | 343 impl().scheduler->DidSwapBuffers(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 void ThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 346 void ThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
| 347 TRACE_EVENT0("cc", "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 347 TRACE_EVENT0("cc,benchmark", |
| 348 "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| 348 DCHECK(IsImplThread()); | 349 DCHECK(IsImplThread()); |
| 349 impl().scheduler->DidSwapBuffersComplete(); | 350 impl().scheduler->DidSwapBuffersComplete(); |
| 350 Proxy::MainThreadTaskRunner()->PostTask( | 351 Proxy::MainThreadTaskRunner()->PostTask( |
| 351 FROM_HERE, | 352 FROM_HERE, |
| 352 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 353 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 353 } | 354 } |
| 354 | 355 |
| 355 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 356 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 356 impl().layer_tree_host_impl->WillBeginImplFrame(args); | 357 impl().layer_tree_host_impl->WillBeginImplFrame(args); |
| 357 } | 358 } |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 | 1348 |
| 1348 impl().timing_history.DidActivateSyncTree(); | 1349 impl().timing_history.DidActivateSyncTree(); |
| 1349 } | 1350 } |
| 1350 | 1351 |
| 1351 void ThreadProxy::DidPrepareTiles() { | 1352 void ThreadProxy::DidPrepareTiles() { |
| 1352 DCHECK(IsImplThread()); | 1353 DCHECK(IsImplThread()); |
| 1353 impl().scheduler->DidPrepareTiles(); | 1354 impl().scheduler->DidPrepareTiles(); |
| 1354 } | 1355 } |
| 1355 | 1356 |
| 1356 } // namespace cc | 1357 } // namespace cc |
| OLD | NEW |