| 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,benchmark", | 483 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| 484 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | |
| 485 if (scheduler_on_impl_thread_) | 484 if (scheduler_on_impl_thread_) |
| 486 scheduler_on_impl_thread_->DidSwapBuffersComplete(); | 485 scheduler_on_impl_thread_->DidSwapBuffersComplete(); |
| 487 layer_tree_host_->DidCompleteSwapBuffers(); | 486 layer_tree_host_->DidCompleteSwapBuffers(); |
| 488 } | 487 } |
| 489 | 488 |
| 490 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 489 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
| 491 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); | 490 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); |
| 492 DCHECK(Proxy::IsMainThread()); | 491 DCHECK(Proxy::IsMainThread()); |
| 493 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); | 492 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); |
| 494 | 493 |
| 495 if (layer_tree_host_->output_surface_lost()) { | 494 if (layer_tree_host_->output_surface_lost()) { |
| 496 RequestNewOutputSurface(); | 495 RequestNewOutputSurface(); |
| 497 // RequestNewOutputSurface could have synchronously created an output | 496 // RequestNewOutputSurface could have synchronously created an output |
| 498 // surface, so check again before returning. | 497 // surface, so check again before returning. |
| 499 if (layer_tree_host_->output_surface_lost()) | 498 if (layer_tree_host_->output_surface_lost()) |
| 500 return; | 499 return; |
| 501 } | 500 } |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 | 806 |
| 808 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 807 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 809 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 808 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 810 } | 809 } |
| 811 | 810 |
| 812 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 811 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 813 layer_tree_host_->SendBeginFramesToChildren(args); | 812 layer_tree_host_->SendBeginFramesToChildren(args); |
| 814 } | 813 } |
| 815 | 814 |
| 816 } // namespace cc | 815 } // namespace cc |
| OLD | NEW |