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

Unified Diff: cc/trees/thread_proxy.cc

Issue 218633010: cc: Handle retroactive BeginFrames in the Scheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@compositorVsyncDisable
Patch Set: fix comment typo Created 6 years, 8 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
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/browser/android/in_process/synchronous_compositor_output_surface.h » ('j') | 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 e30edd741dc01e63d9df92b786baa96b3e0f1578..b0cd3282879e9ee1e08ff835e960174fe2743580 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -441,22 +441,18 @@ void ThreadProxy::OnSwapBuffersCompleteOnImplThread() {
base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_));
}
-void ThreadProxy::SetNeedsBeginImplFrame(bool enable) {
- TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginImplFrame", "enable", enable);
- DCHECK(IsImplThread());
- impl().layer_tree_host_impl->SetNeedsBeginImplFrame(enable);
+void ThreadProxy::SetNeedsBeginFrame(bool enable) {
+ TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrame", "enable", enable);
+ impl().layer_tree_host_impl->SetNeedsBeginFrame(enable);
UpdateBackgroundAnimateTicking();
}
-void ThreadProxy::BeginImplFrame(const BeginFrameArgs& args) {
- TRACE_EVENT0("cc", "ThreadProxy::BeginImplFrame");
- DCHECK(IsImplThread());
-
- // Sample the frame time now. This time will be used for updating animations
- // when we draw.
- impl().layer_tree_host_impl->UpdateCurrentFrameTime();
+void ThreadProxy::BeginFrame(const BeginFrameArgs& args) {
+ impl().scheduler->BeginFrame(args);
+}
- impl().scheduler->BeginImplFrame(args);
+void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
+ impl().layer_tree_host_impl->WillBeginImplFrame(args);
}
void ThreadProxy::OnCanDrawStateChanged(bool can_draw) {
@@ -1496,7 +1492,7 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
layer_tree_host()->DeleteContentsTexturesOnImplThread(
impl().layer_tree_host_impl->resource_provider());
impl().current_resource_update_controller.reset();
- impl().layer_tree_host_impl->SetNeedsBeginImplFrame(false);
+ impl().layer_tree_host_impl->SetNeedsBeginFrame(false);
impl().scheduler.reset();
impl().layer_tree_host_impl.reset();
impl().weak_factory.InvalidateWeakPtrs();
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/browser/android/in_process/synchronous_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698