| 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/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/debug/devtools_instrumentation.h" | 10 #include "cc/debug/devtools_instrumentation.h" |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 LayerTreeHostImpl::FrameData frame; | 535 LayerTreeHostImpl::FrameData frame; |
| 536 DoComposite(frame_begin_time, &frame); | 536 DoComposite(frame_begin_time, &frame); |
| 537 | 537 |
| 538 // DoComposite could abort, but because this is a synchronous composite | 538 // DoComposite could abort, but because this is a synchronous composite |
| 539 // another draw will never be scheduled, so break remaining promises. | 539 // another draw will never be scheduled, so break remaining promises. |
| 540 layer_tree_host_impl_->active_tree()->BreakSwapPromises( | 540 layer_tree_host_impl_->active_tree()->BreakSwapPromises( |
| 541 SwapPromise::SWAP_FAILS); | 541 SwapPromise::SWAP_FAILS); |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 | 544 |
| 545 void SingleThreadProxy::AsValueInto(base::debug::TracedValue* state) const { | 545 void SingleThreadProxy::AsValueInto( |
| 546 base::trace_event::TracedValue* state) const { |
| 546 // The following line casts away const modifiers because it is just | 547 // The following line casts away const modifiers because it is just |
| 547 // setting debug state. We still want the AsValue() function and its | 548 // setting debug state. We still want the AsValue() function and its |
| 548 // call chain to be const throughout. | 549 // call chain to be const throughout. |
| 549 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); | 550 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); |
| 550 | 551 |
| 551 state->BeginDictionary("layer_tree_host_impl"); | 552 state->BeginDictionary("layer_tree_host_impl"); |
| 552 layer_tree_host_impl_->AsValueInto(state); | 553 layer_tree_host_impl_->AsValueInto(state); |
| 553 state->EndDictionary(); | 554 state->EndDictionary(); |
| 554 } | 555 } |
| 555 | 556 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 819 |
| 819 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 820 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 820 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 821 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 821 } | 822 } |
| 822 | 823 |
| 823 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 824 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 824 layer_tree_host_->SendBeginFramesToChildren(args); | 825 layer_tree_host_->SendBeginFramesToChildren(args); |
| 825 } | 826 } |
| 826 | 827 |
| 827 } // namespace cc | 828 } // namespace cc |
| OLD | NEW |