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

Unified Diff: trunk/src/cc/trees/thread_proxy.cc

Issue 181383005: Revert 253439 "Make it possible to cancel commits following an a..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 | « trunk/src/cc/trees/layer_tree_host_unittest_animation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/trees/thread_proxy.cc
===================================================================
--- trunk/src/cc/trees/thread_proxy.cc (revision 253506)
+++ trunk/src/cc/trees/thread_proxy.cc (working copy)
@@ -381,7 +381,7 @@
TRACE_EVENT0("cc", "ThreadProxy::SetNeedsAnimate");
main().animate_requested = true;
- main().can_cancel_commit = true;
+ main().can_cancel_commit = false;
SendCommitRequestToImplThreadIfNeeded();
}
@@ -911,17 +911,6 @@
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;
@@ -939,6 +928,18 @@
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()) {
« no previous file with comments | « trunk/src/cc/trees/layer_tree_host_unittest_animation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698