Chromium Code Reviews| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 DebugScopedSetMainThread main(this); | 456 DebugScopedSetMainThread main(this); |
| 457 // This must happen before we notify the scheduler as it may try to recreate | 457 // This must happen before we notify the scheduler as it may try to recreate |
| 458 // the output surface if already in BEGIN_IMPL_FRAME_STATE_IDLE. | 458 // the output surface if already in BEGIN_IMPL_FRAME_STATE_IDLE. |
| 459 layer_tree_host_->DidLoseOutputSurface(); | 459 layer_tree_host_->DidLoseOutputSurface(); |
| 460 } | 460 } |
| 461 client_->DidAbortSwapBuffers(); | 461 client_->DidAbortSwapBuffers(); |
| 462 if (scheduler_on_impl_thread_) | 462 if (scheduler_on_impl_thread_) |
| 463 scheduler_on_impl_thread_->DidLoseOutputSurface(); | 463 scheduler_on_impl_thread_->DidLoseOutputSurface(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void SingleThreadProxy::CommitVSyncParameters(base::TimeTicks timebase, | |
| 467 base::TimeDelta interval) { | |
| 468 if (scheduler_on_impl_thread_) | |
|
enne (OOO)
2014/12/15 19:25:15
Actually, should this be a DCHECK? Does this get c
brianderson
2014/12/15 19:59:50
I wouldn't expect this to get called before the sc
| |
| 469 scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval); | |
| 470 } | |
| 471 | |
| 466 void SingleThreadProxy::DidSwapBuffersOnImplThread() { | 472 void SingleThreadProxy::DidSwapBuffersOnImplThread() { |
| 467 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); | 473 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); |
| 468 if (scheduler_on_impl_thread_) | 474 if (scheduler_on_impl_thread_) |
| 469 scheduler_on_impl_thread_->DidSwapBuffers(); | 475 scheduler_on_impl_thread_->DidSwapBuffers(); |
| 470 client_->DidPostSwapBuffers(); | 476 client_->DidPostSwapBuffers(); |
| 471 } | 477 } |
| 472 | 478 |
| 473 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 479 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
| 474 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 480 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| 475 if (scheduler_on_impl_thread_) | 481 if (scheduler_on_impl_thread_) |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 794 | 800 |
| 795 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 801 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 796 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 802 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 797 } | 803 } |
| 798 | 804 |
| 799 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 805 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 800 layer_tree_host_->SendBeginFramesToChildren(args); | 806 layer_tree_host_->SendBeginFramesToChildren(args); |
| 801 } | 807 } |
| 802 | 808 |
| 803 } // namespace cc | 809 } // namespace cc |
| OLD | NEW |