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

Unified Diff: cc/delay_based_time_source.cc

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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/debug_rect_history.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/delay_based_time_source.cc
diff --git a/cc/delay_based_time_source.cc b/cc/delay_based_time_source.cc
index be0b10b73a3924924ce56279b3151946d2a55281..da320113f12541af04dd7f17dd6594316c1c2346 100644
--- a/cc/delay_based_time_source.cc
+++ b/cc/delay_based_time_source.cc
@@ -6,6 +6,7 @@
#include "CCDelayBasedTimeSource.h"
+#include "cc/dcheck.h"
#include "TraceEvent.h"
#include <algorithm>
#include <wtf/CurrentTime.h>
@@ -91,7 +92,7 @@ base::TimeTicks CCDelayBasedTimeSource::nextTickTime()
void CCDelayBasedTimeSource::onTimerFired()
{
- ASSERT(m_state != STATE_INACTIVE);
+ CC_DCHECK(m_state != STATE_INACTIVE);
base::TimeTicks now = this->now();
m_lastTickTime = now;
@@ -203,7 +204,7 @@ base::TimeTicks CCDelayBasedTimeSource::nextTickTarget(base::TimeTicks now)
int intervalsElapsed = static_cast<int>(floor((now - m_nextParameters.tickTarget).InSecondsF() / newInterval.InSecondsF()));
base::TimeTicks lastEffectiveTick = m_nextParameters.tickTarget + newInterval * intervalsElapsed;
base::TimeTicks newTickTarget = lastEffectiveTick + newInterval;
- ASSERT(newTickTarget > now);
+ CC_DCHECK(newTickTarget > now);
// Avoid double ticks when:
// 1) Turning off the timer and turning it right back on.
@@ -220,7 +221,7 @@ void CCDelayBasedTimeSource::postNextTickTask(base::TimeTicks now)
// Post another task *before* the tick and update state
base::TimeDelta delay = newTickTarget - now;
- ASSERT(delay.InMillisecondsF() <=
+ CC_DCHECK(delay.InMillisecondsF() <=
m_nextParameters.interval.InMillisecondsF() * (1.0 + doubleTickThreshold));
m_timer.startOneShot(delay.InSecondsF());
« no previous file with comments | « cc/debug_rect_history.cc ('k') | cc/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698