Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index ab45c3e1de63ff13d0977086dc235484e5586d79..8f19578ad0773913e2ad422db91531f879890cf3 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -381,7 +381,7 @@ void ThreadProxy::SetNeedsAnimate() { |
TRACE_EVENT0("cc", "ThreadProxy::SetNeedsAnimate"); |
main().animate_requested = true; |
- main().can_cancel_commit = false; |
+ main().can_cancel_commit = true; |
SendCommitRequestToImplThreadIfNeeded(); |
} |
@@ -911,6 +911,17 @@ void ThreadProxy::BeginMainFrame( |
layer_tree_host()->WillCommit(); |
+ // Before calling animate, we set main().animate_requested to false. If it is |
+ // true now, it means SetNeedAnimate was called again, but during a state when |
+ // main().commit_request_sent_to_impl_thread = true. We need to force that |
+ // call to happen again now so that the commit request is sent to the impl |
+ // thread. |
+ if (main().animate_requested) { |
+ // Forces SetNeedsAnimate to consider posting a commit task. |
+ main().animate_requested = false; |
+ SetNeedsAnimate(); |
+ } |
+ |
if (!updated && can_cancel_this_commit) { |
TRACE_EVENT_INSTANT0("cc", "EarlyOut_NoUpdates", TRACE_EVENT_SCOPE_THREAD); |
bool did_handle = true; |
@@ -928,18 +939,6 @@ void ThreadProxy::BeginMainFrame( |
return; |
} |
- // Before calling animate, we set main().animate_requested to false. If it is |
- // true |
- // now, it means SetNeedAnimate was called again, but during a state when |
- // main().commit_request_sent_to_impl_thread = true. We need to force that |
- // call to |
- // happen again now so that the commit request is sent to the impl thread. |
- if (main().animate_requested) { |
- // Forces SetNeedsAnimate to consider posting a commit task. |
- main().animate_requested = false; |
- SetNeedsAnimate(); |
- } |
- |
scoped_refptr<ContextProvider> offscreen_context_provider; |
if (main().renderer_capabilities_main_thread_copy.using_offscreen_context3d && |
layer_tree_host()->needs_offscreen_context()) { |