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

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

Issue 1055743002: Revert of cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 bool forced_draw = false; 1107 bool forced_draw = false;
1108 return DrawSwapInternal(forced_draw); 1108 return DrawSwapInternal(forced_draw);
1109 } 1109 }
1110 1110
1111 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { 1111 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() {
1112 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); 1112 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced");
1113 bool forced_draw = true; 1113 bool forced_draw = true;
1114 return DrawSwapInternal(forced_draw); 1114 return DrawSwapInternal(forced_draw);
1115 } 1115 }
1116 1116
1117 void ThreadProxy::ScheduledActionInvalidateOutputSurface() {
1118 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionInvalidateOutputSurface");
1119 DCHECK(impl().layer_tree_host_impl->output_surface());
1120 impl().layer_tree_host_impl->output_surface()->Invalidate();
1121 }
1122
1123 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { 1117 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) {
1124 if (impl().current_resource_update_controller) 1118 if (impl().current_resource_update_controller)
1125 impl().current_resource_update_controller->PerformMoreUpdates(time); 1119 impl().current_resource_update_controller->PerformMoreUpdates(time);
1126 } 1120 }
1127 1121
1128 base::TimeDelta ThreadProxy::DrawDurationEstimate() { 1122 base::TimeDelta ThreadProxy::DrawDurationEstimate() {
1129 return impl().timing_history.DrawDurationEstimate(); 1123 return impl().timing_history.DrawDurationEstimate();
1130 } 1124 }
1131 1125
1132 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { 1126 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 impl().scheduler->DidPrepareTiles(); 1368 impl().scheduler->DidPrepareTiles();
1375 } 1369 }
1376 1370
1377 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1371 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1378 DCHECK(IsImplThread()); 1372 DCHECK(IsImplThread());
1379 Proxy::MainThreadTaskRunner()->PostTask( 1373 Proxy::MainThreadTaskRunner()->PostTask(
1380 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1374 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1381 main_thread_weak_ptr_)); 1375 main_thread_weak_ptr_));
1382 } 1376 }
1383 1377
1384 void ThreadProxy::OnDrawForOutputSurface() {
1385 DCHECK(IsImplThread());
1386 impl().scheduler->OnDrawForOutputSurface();
1387 }
1388
1389 } // namespace cc 1378 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698