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

Unified Diff: Source/core/animation/AnimationClock.h

Issue 369793003: Make the web-animations engine use the passed in blink::WebFrameTime values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing remaining usages of -1 in the code. Created 6 years, 5 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 | Source/core/animation/AnimationClock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationClock.h
diff --git a/Source/core/animation/AnimationClock.h b/Source/core/animation/AnimationClock.h
index b5bb0d9adc6b5e13f1351019755fac8e21661591..453efb4335138d7671d077093cc1ea39ba12b49e 100644
--- a/Source/core/animation/AnimationClock.h
+++ b/Source/core/animation/AnimationClock.h
@@ -31,7 +31,7 @@
#ifndef AnimationClock_h
#define AnimationClock_h
-#include "wtf/CurrentTime.h"
+#include "public/platform/WebFrameTime.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassOwnPtr.h"
#include <limits>
@@ -41,22 +41,23 @@ namespace WebCore {
class AnimationClock {
WTF_MAKE_NONCOPYABLE(AnimationClock);
public:
- explicit AnimationClock(WTF::TimeFunction monotonicallyIncreasingTime = WTF::monotonicallyIncreasingTime)
- : m_monotonicallyIncreasingTime(monotonicallyIncreasingTime)
- , m_time(0)
+ explicit AnimationClock()
+ : m_frameTime()
, m_currentTask(std::numeric_limits<unsigned>::max())
- {
- }
+ { }
- void updateTime(double time);
+ void updateTime(blink::WebFrameTime);
double currentTime();
- void resetTimeForTesting();
-
static void notifyTaskStart() { ++s_currentTask; }
+ void resetTimeForTesting();
+ void tickTimeForTesting();
+ void clearTimeForTesting();
+ static blink::WebFrameTime createTimeForTesting(double currentFrameMonotonic, double nextFrameMonotonic);
private:
- WTF::TimeFunction m_monotonicallyIncreasingTime;
- double m_time;
+ double internalCurrentTime();
+
+ blink::WebFrameTime m_frameTime;
unsigned m_currentTask;
static unsigned s_currentTask;
};
« no previous file with comments | « no previous file | Source/core/animation/AnimationClock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698