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

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

Issue 873473006: cc: Commit directly to active tree when using single thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« cc/trees/single_thread_proxy.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | 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/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 impl_thread_weak_ptr_, 146 impl_thread_weak_ptr_,
147 &completion)); 147 &completion));
148 completion.Wait(); 148 completion.Wait();
149 } 149 }
150 150
151 bool ThreadProxy::IsStarted() const { 151 bool ThreadProxy::IsStarted() const {
152 DCHECK(Proxy::IsMainThread()); 152 DCHECK(Proxy::IsMainThread());
153 return main().started; 153 return main().started;
154 } 154 }
155 155
156 bool ThreadProxy::CommitToActiveTree() const {
157 // With ThreadProxy we use a pending tree and activate it once it's ready to
158 // draw.
159 return false;
160 }
161
156 void ThreadProxy::SetLayerTreeHostClientReady() { 162 void ThreadProxy::SetLayerTreeHostClientReady() {
157 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReady"); 163 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReady");
158 Proxy::ImplThreadTaskRunner()->PostTask( 164 Proxy::ImplThreadTaskRunner()->PostTask(
159 FROM_HERE, 165 FROM_HERE,
160 base::Bind(&ThreadProxy::SetLayerTreeHostClientReadyOnImplThread, 166 base::Bind(&ThreadProxy::SetLayerTreeHostClientReadyOnImplThread,
161 impl_thread_weak_ptr_)); 167 impl_thread_weak_ptr_));
162 } 168 }
163 169
164 void ThreadProxy::SetLayerTreeHostClientReadyOnImplThread() { 170 void ThreadProxy::SetLayerTreeHostClientReadyOnImplThread() {
165 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReadyOnImplThread"); 171 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReadyOnImplThread");
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 } 1366 }
1361 1367
1362 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1368 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1363 DCHECK(IsImplThread()); 1369 DCHECK(IsImplThread());
1364 Proxy::MainThreadTaskRunner()->PostTask( 1370 Proxy::MainThreadTaskRunner()->PostTask(
1365 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1371 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1366 main_thread_weak_ptr_)); 1372 main_thread_weak_ptr_));
1367 } 1373 }
1368 1374
1369 } // namespace cc 1375 } // namespace cc
OLDNEW
« cc/trees/single_thread_proxy.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698