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

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

Issue 292533002: Remove forced commit and readback from the scheduler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-cnr-scheduler: tests Created 6 years, 7 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 | Annotate | Revision Log
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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 bool forced_draw = false; 1145 bool forced_draw = false;
1146 return DrawSwapInternal(forced_draw); 1146 return DrawSwapInternal(forced_draw);
1147 } 1147 }
1148 1148
1149 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { 1149 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() {
1150 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); 1150 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced");
1151 bool forced_draw = true; 1151 bool forced_draw = true;
1152 return DrawSwapInternal(forced_draw); 1152 return DrawSwapInternal(forced_draw);
1153 } 1153 }
1154 1154
1155 DrawResult ThreadProxy::ScheduledActionDrawAndReadback() {
1156 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndReadback");
1157 NOTREACHED();
1158 return INVALID_RESULT;
1159 }
1160
1161 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { 1155 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) {
1162 if (impl().current_resource_update_controller) 1156 if (impl().current_resource_update_controller)
1163 impl().current_resource_update_controller->PerformMoreUpdates(time); 1157 impl().current_resource_update_controller->PerformMoreUpdates(time);
1164 } 1158 }
1165 1159
1166 base::TimeDelta ThreadProxy::DrawDurationEstimate() { 1160 base::TimeDelta ThreadProxy::DrawDurationEstimate() {
1167 return impl().timing_history.DrawDurationEstimate(); 1161 return impl().timing_history.DrawDurationEstimate();
1168 } 1162 }
1169 1163
1170 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { 1164 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 TRACE_EVENT0("cc", "ThreadProxy::CreateAndInitializeOutputSurface"); 1204 TRACE_EVENT0("cc", "ThreadProxy::CreateAndInitializeOutputSurface");
1211 DCHECK(IsMainThread()); 1205 DCHECK(IsMainThread());
1212 1206
1213 // Check that output surface has not been recreated by CompositeAndReadback 1207 // Check that output surface has not been recreated by CompositeAndReadback
1214 // after this task is posted but before it is run. 1208 // after this task is posted but before it is run.
1215 bool has_initialized_output_surface = true; 1209 bool has_initialized_output_surface = true;
1216 { 1210 {
1217 CompletionEvent completion; 1211 CompletionEvent completion;
1218 Proxy::ImplThreadTaskRunner()->PostTask( 1212 Proxy::ImplThreadTaskRunner()->PostTask(
1219 FROM_HERE, 1213 FROM_HERE,
1220 base::Bind(&ThreadProxy::HasInitializedOutputSurfaceOnImplThread, 1214 base::Bind(&ThreadProxy::HasInitializedOutputSurfaceOnImplThread,
simonhong 2014/05/17 00:03:21 I think we can also remove this check.
danakj 2014/05/17 06:07:11 Yep that's in another cl already :)
simonhong 2014/05/17 08:45:31 Aha! great!
1221 impl_thread_weak_ptr_, 1215 impl_thread_weak_ptr_,
1222 &completion, 1216 &completion,
1223 &has_initialized_output_surface)); 1217 &has_initialized_output_surface));
1224 completion.Wait(); 1218 completion.Wait();
1225 } 1219 }
1226 if (has_initialized_output_surface) 1220 if (has_initialized_output_surface)
1227 return; 1221 return;
1228 1222
1229 layer_tree_host()->DidLoseOutputSurface(); 1223 layer_tree_host()->DidLoseOutputSurface();
1230 main().output_surface_creation_callback.Reset( 1224 main().output_surface_creation_callback.Reset(
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 1501
1508 impl().timing_history.DidActivatePendingTree(); 1502 impl().timing_history.DidActivatePendingTree();
1509 } 1503 }
1510 1504
1511 void ThreadProxy::DidManageTiles() { 1505 void ThreadProxy::DidManageTiles() {
1512 DCHECK(IsImplThread()); 1506 DCHECK(IsImplThread());
1513 impl().scheduler->DidManageTiles(); 1507 impl().scheduler->DidManageTiles();
1514 } 1508 }
1515 1509
1516 } // namespace cc 1510 } // namespace cc
OLDNEW
« cc/scheduler/scheduler_state_machine_unittest.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