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

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: 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 2ebf5c000ae3ddbdeea691269f86fa8fa47f00ab..82d2a5713e5e671f81781851686c921817e059bf 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -1045,6 +1045,25 @@ void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) {
layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame();
}
+
+void ThreadProxy::PostBeginFrameDeadlineTask(base::TimeTicks deadline) {
+ base::TimeDelta delta = deadline - base::TimeTicks::Now();
ajuma 2013/06/14 15:22:32 To get a sufficiently precise delta on Windows, we
brianderson 2013/06/14 18:42:36 Ok. We'll have to be very careful about comparing
+ if (delta <= base::TimeDelta()) {
+ scheduler_on_impl_thread_->OnBeginFrameDeadline();
+ return;
+ }
+
+ Proxy::ImplThread()->PostDelayedTask(
Sami 2013/06/14 15:59:20 Can/should we cancel this task if we drew before t
brianderson 2013/06/14 18:42:36 It's kind of "canceled" manually based on the begi
+ base::Bind(&ThreadProxy::OnBeginFrameDeadline,
+ weak_factory_on_impl_thread_.GetWeakPtr()),
+ deadline - base::TimeTicks::Now());
ajuma 2013/06/14 15:22:32 We can reuse |delta| here.
brianderson 2013/06/14 18:42:36 oops!
+}
+
+void ThreadProxy::OnBeginFrameDeadline() {
+ DCHECK(IsImplThread());
+ scheduler_on_impl_thread_->OnBeginFrameDeadline();
+}
+
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