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

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: Patch to run on try bots. Created 6 years, 6 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') | Source/core/animation/AnimationClock.cpp » ('J')
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..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;
};
« no previous file with comments | « no previous file | Source/core/animation/AnimationClock.cpp » ('j') | Source/core/animation/AnimationClock.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698