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

Unified Diff: cc/thread_proxy.cc

Issue 12255014: cc: Avoid posting renewTreePriority tasks with negative delay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index fe92817ea58a659061e98380f4953a1c5dd5043c..45148a33d257ee5cf0c73e7ebf4fd422b56bb44d 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -1191,16 +1191,16 @@ void ThreadProxy::renewTreePriority()
priority == SMOOTHNESS_TAKES_PRIORITY);
}
+ base::TimeDelta delay = m_smoothnessTakesPriorityExpirationTime -
+ base::TimeTicks::Now();
+
// Need to make sure a delayed task is posted when we have smoothness
// takes priority expiration time in the future.
- if (m_smoothnessTakesPriorityExpirationTime <= base::TimeTicks::Now())
+ if (delay <= base::TimeDelta())
return;
if (m_renewTreePriorityOnImplThreadPending)
return;
- base::TimeDelta delay = m_smoothnessTakesPriorityExpirationTime -
- base::TimeTicks::Now();
-
Proxy::implThread()->postDelayedTask(
base::Bind(&ThreadProxy::renewTreePriorityOnImplThread,
m_weakFactoryOnImplThread.GetWeakPtr()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698