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

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: Fix misc bugs introduced in last two patches Created 5 years, 10 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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 bool forced_draw = false; 1086 bool forced_draw = false;
1087 return DrawSwapInternal(forced_draw); 1087 return DrawSwapInternal(forced_draw);
1088 } 1088 }
1089 1089
1090 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { 1090 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() {
1091 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); 1091 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced");
1092 bool forced_draw = true; 1092 bool forced_draw = true;
1093 return DrawSwapInternal(forced_draw); 1093 return DrawSwapInternal(forced_draw);
1094 } 1094 }
1095 1095
1096 void ThreadProxy::ScheduledActionInvalidateOutputSurface() {
1097 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionInvalidateOutputSurface");
1098 DCHECK(impl().layer_tree_host_impl->output_surface());
1099 impl().layer_tree_host_impl->output_surface()->Invalidate();
1100 }
1101
1096 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { 1102 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) {
1097 if (impl().current_resource_update_controller) 1103 if (impl().current_resource_update_controller)
1098 impl().current_resource_update_controller->PerformMoreUpdates(time); 1104 impl().current_resource_update_controller->PerformMoreUpdates(time);
1099 } 1105 }
1100 1106
1101 base::TimeDelta ThreadProxy::DrawDurationEstimate() { 1107 base::TimeDelta ThreadProxy::DrawDurationEstimate() {
1102 return impl().timing_history.DrawDurationEstimate(); 1108 return impl().timing_history.DrawDurationEstimate();
1103 } 1109 }
1104 1110
1105 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { 1111 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 } 1374 }
1369 1375
1370 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1376 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1371 DCHECK(IsImplThread()); 1377 DCHECK(IsImplThread());
1372 Proxy::MainThreadTaskRunner()->PostTask( 1378 Proxy::MainThreadTaskRunner()->PostTask(
1373 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1379 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1374 main_thread_weak_ptr_)); 1380 main_thread_weak_ptr_));
1375 } 1381 }
1376 1382
1377 } // namespace cc 1383 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698