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/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 473 } |
474 | 474 |
475 void SingleThreadProxy::DidSwapBuffersOnImplThread() { | 475 void SingleThreadProxy::DidSwapBuffersOnImplThread() { |
476 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); | 476 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); |
477 if (scheduler_on_impl_thread_) | 477 if (scheduler_on_impl_thread_) |
478 scheduler_on_impl_thread_->DidSwapBuffers(); | 478 scheduler_on_impl_thread_->DidSwapBuffers(); |
479 client_->DidPostSwapBuffers(); | 479 client_->DidPostSwapBuffers(); |
480 } | 480 } |
481 | 481 |
482 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 482 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
483 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 483 TRACE_EVENT0("cc,benchmark", |
| 484 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
484 if (scheduler_on_impl_thread_) | 485 if (scheduler_on_impl_thread_) |
485 scheduler_on_impl_thread_->DidSwapBuffersComplete(); | 486 scheduler_on_impl_thread_->DidSwapBuffersComplete(); |
486 layer_tree_host_->DidCompleteSwapBuffers(); | 487 layer_tree_host_->DidCompleteSwapBuffers(); |
487 } | 488 } |
488 | 489 |
489 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 490 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
490 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); | 491 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); |
491 DCHECK(Proxy::IsMainThread()); | 492 DCHECK(Proxy::IsMainThread()); |
492 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); | 493 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); |
493 | 494 |
494 if (layer_tree_host_->output_surface_lost()) { | 495 if (layer_tree_host_->output_surface_lost()) { |
495 RequestNewOutputSurface(); | 496 RequestNewOutputSurface(); |
496 // RequestNewOutputSurface could have synchronously created an output | 497 // RequestNewOutputSurface could have synchronously created an output |
497 // surface, so check again before returning. | 498 // surface, so check again before returning. |
498 if (layer_tree_host_->output_surface_lost()) | 499 if (layer_tree_host_->output_surface_lost()) |
499 return; | 500 return; |
500 } | 501 } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 | 807 |
807 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 808 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
808 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 809 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
809 } | 810 } |
810 | 811 |
811 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 812 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
812 layer_tree_host_->SendBeginFramesToChildren(args); | 813 layer_tree_host_->SendBeginFramesToChildren(args); |
813 } | 814 } |
814 | 815 |
815 } // namespace cc | 816 } // namespace cc |
OLD | NEW |