Chromium Code Reviews| Index: Source/core/animation/AnimationClock.h |
| diff --git a/Source/core/animation/AnimationClock.h b/Source/core/animation/AnimationClock.h |
| index b5bb0d9adc6b5e13f1351019755fac8e21661591..f13a666f6e16f87e08e3fbca764586216e6545db 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,24 @@ 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(-1, -1, -1, -1) |
|
eseidel
2014/07/07 16:31:50
Can this be a default constructor on WebFrameTime
mithro-old
2014/07/07 17:47:15
Open to better suggestions on how to deal with the
|
| , 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(); |
| + |
| private: |
| - WTF::TimeFunction m_monotonicallyIncreasingTime; |
| - double m_time; |
| + double internalCurrentTime(); |
| + |
| + blink::WebFrameTime m_frameTime; |
| unsigned m_currentTask; |
| static unsigned s_currentTask; |
| }; |