Chromium Code Reviews| 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(); |