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/profiler/scoped_tracker.h" | 8 #include "base/profiler/scoped_tracker.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/animation/animation_events.h" | 10 #include "cc/animation/animation_events.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 TRACE_EVENT0("cc", "SingleThreadProxy::FinishAllRendering"); | 91 TRACE_EVENT0("cc", "SingleThreadProxy::FinishAllRendering"); |
92 DCHECK(task_runner_provider_->IsMainThread()); | 92 DCHECK(task_runner_provider_->IsMainThread()); |
93 { | 93 { |
94 DebugScopedSetImplThread impl(task_runner_provider_); | 94 DebugScopedSetImplThread impl(task_runner_provider_); |
95 layer_tree_host_impl_->FinishAllRendering(); | 95 layer_tree_host_impl_->FinishAllRendering(); |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 bool SingleThreadProxy::IsStarted() const { | 99 bool SingleThreadProxy::IsStarted() const { |
100 DCHECK(task_runner_provider_->IsMainThread()); | 100 DCHECK(task_runner_provider_->IsMainThread()); |
101 return layer_tree_host_impl_; | 101 return !!layer_tree_host_impl_; |
102 } | 102 } |
103 | 103 |
104 bool SingleThreadProxy::CommitToActiveTree() const { | 104 bool SingleThreadProxy::CommitToActiveTree() const { |
105 // With SingleThreadProxy we skip the pending tree and commit directly to the | 105 // With SingleThreadProxy we skip the pending tree and commit directly to the |
106 // active tree. | 106 // active tree. |
107 return true; | 107 return true; |
108 } | 108 } |
109 | 109 |
110 void SingleThreadProxy::SetVisible(bool visible) { | 110 void SingleThreadProxy::SetVisible(bool visible) { |
111 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); | 111 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 << "DidFinishImplFrame called while not inside an impl frame!"; | 874 << "DidFinishImplFrame called while not inside an impl frame!"; |
875 inside_impl_frame_ = false; | 875 inside_impl_frame_ = false; |
876 #endif | 876 #endif |
877 } | 877 } |
878 | 878 |
879 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 879 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
880 layer_tree_host_->SendBeginFramesToChildren(args); | 880 layer_tree_host_->SendBeginFramesToChildren(args); |
881 } | 881 } |
882 | 882 |
883 } // namespace cc | 883 } // namespace cc |
OLD | NEW |