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 466 matching lines...) Loading... |
477 } | 477 } |
478 | 478 |
479 void SingleThreadProxy::DidSwapBuffersOnImplThread() { | 479 void SingleThreadProxy::DidSwapBuffersOnImplThread() { |
480 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); | 480 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); |
481 if (scheduler_on_impl_thread_) | 481 if (scheduler_on_impl_thread_) |
482 scheduler_on_impl_thread_->DidSwapBuffers(); | 482 scheduler_on_impl_thread_->DidSwapBuffers(); |
483 client_->DidPostSwapBuffers(); | 483 client_->DidPostSwapBuffers(); |
484 } | 484 } |
485 | 485 |
486 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 486 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
487 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 487 TRACE_EVENT0("cc,benchmark", |
| 488 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
488 if (scheduler_on_impl_thread_) | 489 if (scheduler_on_impl_thread_) |
489 scheduler_on_impl_thread_->DidSwapBuffersComplete(); | 490 scheduler_on_impl_thread_->DidSwapBuffersComplete(); |
490 layer_tree_host_->DidCompleteSwapBuffers(); | 491 layer_tree_host_->DidCompleteSwapBuffers(); |
491 } | 492 } |
492 | 493 |
493 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 494 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
494 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); | 495 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); |
495 DCHECK(Proxy::IsMainThread()); | 496 DCHECK(Proxy::IsMainThread()); |
496 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); | 497 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); |
497 | 498 |
498 if (layer_tree_host_->output_surface_lost()) { | 499 if (layer_tree_host_->output_surface_lost()) { |
499 RequestNewOutputSurface(); | 500 RequestNewOutputSurface(); |
500 // RequestNewOutputSurface could have synchronously created an output | 501 // RequestNewOutputSurface could have synchronously created an output |
501 // surface, so check again before returning. | 502 // surface, so check again before returning. |
502 if (layer_tree_host_->output_surface_lost()) | 503 if (layer_tree_host_->output_surface_lost()) |
503 return; | 504 return; |
504 } | 505 } |
(...skipping 305 matching lines...) Loading... |
810 | 811 |
811 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 812 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
812 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 813 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
813 } | 814 } |
814 | 815 |
815 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 816 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
816 layer_tree_host_->SendBeginFramesToChildren(args); | 817 layer_tree_host_->SendBeginFramesToChildren(args); |
817 } | 818 } |
818 | 819 |
819 } // namespace cc | 820 } // namespace cc |
OLD | NEW |