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

Unified Diff: cc/trees/thread_proxy.cc

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Many optimizations. Address comments. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« cc/scheduler/scheduler_state_machine.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index b307c9e5cbfe91e1068bf7ace9fbd04be8ad174f..34782d6d68550118560c3bf034115cc7d8095113 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -1085,6 +1085,16 @@ base::TimeDelta ThreadProxy::DrawDurationEstimate() {
return historical_estimate + padding;
}
+void ThreadProxy::PostBeginFrameDeadline(const base::Closure &closure,
+ base::TimeTicks deadline) {
+ base::TimeDelta delta = deadline - base::TimeTicks::Now();
+ if (delta <= base::TimeDelta()) {
+ closure.Run();
+ return;
+ }
+ Proxy::ImplThread()->PostDelayedTask(closure, delta);
+}
+
void ThreadProxy::ReadyToFinalizeTextureUpdates() {
DCHECK(IsImplThread());
scheduler_on_impl_thread_->FinishCommit();
« cc/scheduler/scheduler_state_machine.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