Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 1385043002: cc: Remove SetLayerTreeHostClientReady() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startcomp
Patch Set: sky's offline comment Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/debug/benchmark_instrumentation.h" 10 #include "cc/debug/benchmark_instrumentation.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DCHECK(Proxy::IsMainThread()); 101 DCHECK(Proxy::IsMainThread());
102 return layer_tree_host_impl_; 102 return layer_tree_host_impl_;
103 } 103 }
104 104
105 bool SingleThreadProxy::CommitToActiveTree() const { 105 bool SingleThreadProxy::CommitToActiveTree() const {
106 // With SingleThreadProxy we skip the pending tree and commit directly to the 106 // With SingleThreadProxy we skip the pending tree and commit directly to the
107 // active tree. 107 // active tree.
108 return true; 108 return true;
109 } 109 }
110 110
111 void SingleThreadProxy::SetLayerTreeHostClientReady() {
112 TRACE_EVENT0("cc", "SingleThreadProxy::SetLayerTreeHostClientReady");
113 // Scheduling is controlled by the embedder in the single thread case, so
114 // nothing to do.
115 DCHECK(Proxy::IsMainThread());
116 DebugScopedSetImplThread impl(this);
117 if (scheduler_on_impl_thread_) {
118 scheduler_on_impl_thread_->SetCanStart();
119 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
120 }
121 }
122
123 void SingleThreadProxy::SetVisible(bool visible) { 111 void SingleThreadProxy::SetVisible(bool visible) {
124 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); 112 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible);
125 DebugScopedSetImplThread impl(this); 113 DebugScopedSetImplThread impl(this);
126 114
127 layer_tree_host_impl_->SetVisible(visible); 115 layer_tree_host_impl_->SetVisible(visible);
128 116
129 if (scheduler_on_impl_thread_) 117 if (scheduler_on_impl_thread_)
130 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); 118 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
131 } 119 }
132 120
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 << "DidFinishImplFrame called while not inside an impl frame!"; 887 << "DidFinishImplFrame called while not inside an impl frame!";
900 inside_impl_frame_ = false; 888 inside_impl_frame_ = false;
901 #endif 889 #endif
902 } 890 }
903 891
904 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 892 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
905 layer_tree_host_->SendBeginFramesToChildren(args); 893 layer_tree_host_->SendBeginFramesToChildren(args);
906 } 894 }
907 895
908 } // namespace cc 896 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698