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

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

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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
1117 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { 1123 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) {
1118 if (impl().current_resource_update_controller) 1124 if (impl().current_resource_update_controller)
1119 impl().current_resource_update_controller->PerformMoreUpdates(time); 1125 impl().current_resource_update_controller->PerformMoreUpdates(time);
1120 } 1126 }
1121 1127
1122 base::TimeDelta ThreadProxy::DrawDurationEstimate() { 1128 base::TimeDelta ThreadProxy::DrawDurationEstimate() {
1123 return impl().timing_history.DrawDurationEstimate(); 1129 return impl().timing_history.DrawDurationEstimate();
1124 } 1130 }
1125 1131
1126 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { 1132 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() {
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 impl().scheduler->DidPrepareTiles(); 1369 impl().scheduler->DidPrepareTiles();
1364 } 1370 }
1365 1371
1366 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1372 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1367 DCHECK(IsImplThread()); 1373 DCHECK(IsImplThread());
1368 Proxy::MainThreadTaskRunner()->PostTask( 1374 Proxy::MainThreadTaskRunner()->PostTask(
1369 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1375 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1370 main_thread_weak_ptr_)); 1376 main_thread_weak_ptr_));
1371 } 1377 }
1372 1378
1379 void ThreadProxy::OnDrawForOutputSurface() {
1380 DCHECK(IsImplThread());
1381 impl().scheduler->OnDrawForOutputSurface();
1382 }
1383
1373 } // namespace cc 1384 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698