| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 425 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
| 426 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 426 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| 427 if (scheduler_on_impl_thread_) | 427 if (scheduler_on_impl_thread_) |
| 428 scheduler_on_impl_thread_->DidSwapBuffersComplete(); | 428 scheduler_on_impl_thread_->DidSwapBuffersComplete(); |
| 429 layer_tree_host_->DidCompleteSwapBuffers(); | 429 layer_tree_host_->DidCompleteSwapBuffers(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void SingleThreadProxy::BeginFrame(const BeginFrameArgs& args) { | 432 void SingleThreadProxy::BeginFrame(const BeginFrameArgs& args) { |
| 433 TRACE_EVENT0("cc", "SingleThreadProxy::BeginFrame"); | 433 TRACE_EVENT0("cc", "SingleThreadProxy::BeginFrame"); |
| 434 if (scheduler_on_impl_thread_) | 434 if (scheduler_on_impl_thread_) |
| 435 scheduler_on_impl_thread_->BeginImplFrame(args); | 435 scheduler_on_impl_thread_->BeginFrame(args); |
| 436 } | 436 } |
| 437 | 437 |
| 438 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 438 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
| 439 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); | 439 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); |
| 440 DCHECK(Proxy::IsMainThread()); | 440 DCHECK(Proxy::IsMainThread()); |
| 441 DCHECK(!layer_tree_host_->output_surface_lost()); | 441 DCHECK(!layer_tree_host_->output_surface_lost()); |
| 442 | 442 |
| 443 BeginFrameArgs begin_frame_args = BeginFrameArgs::Create( | 443 BeginFrameArgs begin_frame_args = BeginFrameArgs::Create( |
| 444 frame_begin_time, base::TimeTicks(), BeginFrameArgs::DefaultInterval()); | 444 frame_begin_time, base::TimeTicks(), BeginFrameArgs::DefaultInterval()); |
| 445 DoCommit(begin_frame_args); | 445 DoCommit(begin_frame_args); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 | 686 |
| 687 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { | 687 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { |
| 688 return timing_history_.CommitToActivateDurationEstimate(); | 688 return timing_history_.CommitToActivateDurationEstimate(); |
| 689 } | 689 } |
| 690 | 690 |
| 691 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 691 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 692 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 692 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 693 } | 693 } |
| 694 | 694 |
| 695 } // namespace cc | 695 } // namespace cc |
| OLD | NEW |