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

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

Issue 1162253005: Animations: Add the effect clipping primitive to web animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « LayoutTests/web-animations-api/player-clip.html ('k') | Source/core/animation/Animation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.h
diff --git a/Source/core/animation/Animation.h b/Source/core/animation/Animation.h
index 9433247fc0d0123e040addddd974c88df979471b..467974ab25f4ee0e2f76444e23d55be899d063a0 100644
--- a/Source/core/animation/Animation.h
+++ b/Source/core/animation/Animation.h
@@ -133,6 +133,11 @@ public:
void setStartTime(double);
void setStartTimeInternal(double);
+ double startClip() const { return startClipInternal() * 1000; }
+ double endClip() const { return endClipInternal() * 1000; }
+ void setStartClip(double t) { setStartClipInternal(t / 1000); }
+ void setEndClip(double t) { setEndClipInternal(t / 1000); }
+
const AnimationEffect* source() const { return m_content.get(); }
AnimationEffect* source() { return m_content.get(); }
void setSource(AnimationEffect*);
@@ -202,10 +207,19 @@ private:
void notifyAnimationStarted(double monotonicTime, int group) override;
void notifyAnimationFinished(double monotonicTime, int group) override { }
+ double startClipInternal() const { return m_startClip; };
+ double endClipInternal() const { return m_endClip; };
+ void setStartClipInternal(double t) { m_startClip = t; }
+ void setEndClipInternal(double t) { m_endClip = t; }
+ bool clipped(double);
+ double clipTimeToEffectChange(double) const;
+
AnimationPlayState m_playState;
double m_playbackRate;
double m_startTime;
double m_holdTime;
+ double m_startClip;
+ double m_endClip;
unsigned m_sequenceNumber;
« no previous file with comments | « LayoutTests/web-animations-api/player-clip.html ('k') | Source/core/animation/Animation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698