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

Side by Side Diff: Source/core/animation/AnimationTimeline.h

Issue 717003002: Animations: Allow document animation timelines to have a playback rate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review changes Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 double currentTime(bool& isNull); 84 double currentTime(bool& isNull);
85 double currentTime(); 85 double currentTime();
86 double currentTimeInternal(bool& isNull); 86 double currentTimeInternal(bool& isNull);
87 double currentTimeInternal(); 87 double currentTimeInternal();
88 double effectiveTime(); 88 double effectiveTime();
89 void pauseAnimationsForTesting(double); 89 void pauseAnimationsForTesting(double);
90 90
91 void setOutdatedAnimationPlayer(AnimationPlayer*); 91 void setOutdatedAnimationPlayer(AnimationPlayer*);
92 bool hasOutdatedAnimationPlayer() const; 92 bool hasOutdatedAnimationPlayer() const;
93 93
94 void setPlaybackRate(double);
95 double playbackRate() const;
96
94 Document* document() { return m_document.get(); } 97 Document* document() { return m_document.get(); }
95 #if !ENABLE(OILPAN) 98 #if !ENABLE(OILPAN)
96 void detachFromDocument(); 99 void detachFromDocument();
97 #endif 100 #endif
98 void wake(); 101 void wake();
99 102
100 void trace(Visitor*); 103 void trace(Visitor*);
101 104
102 protected: 105 protected:
103 AnimationTimeline(Document*, PassOwnPtrWillBeRawPtr<PlatformTiming>); 106 AnimationTimeline(Document*, PassOwnPtrWillBeRawPtr<PlatformTiming>);
104 107
105 private: 108 private:
106 RawPtrWillBeMember<Document> m_document; 109 RawPtrWillBeMember<Document> m_document;
107 double m_zeroTime; 110 double m_zeroTime;
108 // AnimationPlayers which will be updated on the next frame 111 // AnimationPlayers which will be updated on the next frame
109 // i.e. current, in effect, or had timing changed 112 // i.e. current, in effect, or had timing changed
110 WillBeHeapHashSet<RefPtrWillBeMember<AnimationPlayer>> m_playersNeedingUpdat e; 113 WillBeHeapHashSet<RefPtrWillBeMember<AnimationPlayer>> m_playersNeedingUpdat e;
111 WillBeHeapHashSet<RawPtrWillBeWeakMember<AnimationPlayer>> m_players; 114 WillBeHeapHashSet<RawPtrWillBeWeakMember<AnimationPlayer>> m_players;
112 115
116 double m_currentTimeSnapshot;
117 double m_rawCurrentTimeSnapshot;
118 double m_playbackRate;
119
113 friend class SMILTimeContainer; 120 friend class SMILTimeContainer;
114 static const double s_minimumDelay; 121 static const double s_minimumDelay;
115 122
116 OwnPtrWillBeMember<PlatformTiming> m_timing; 123 OwnPtrWillBeMember<PlatformTiming> m_timing;
117 124
118 class AnimationTimelineTiming final : public PlatformTiming { 125 class AnimationTimelineTiming final : public PlatformTiming {
119 public: 126 public:
120 AnimationTimelineTiming(AnimationTimeline* timeline) 127 AnimationTimelineTiming(AnimationTimeline* timeline)
121 : m_timeline(timeline) 128 : m_timeline(timeline)
122 , m_timer(this, &AnimationTimelineTiming::timerFired) 129 , m_timer(this, &AnimationTimelineTiming::timerFired)
(...skipping 13 matching lines...) Expand all
136 RawPtrWillBeMember<AnimationTimeline> m_timeline; 143 RawPtrWillBeMember<AnimationTimeline> m_timeline;
137 Timer<AnimationTimelineTiming> m_timer; 144 Timer<AnimationTimelineTiming> m_timer;
138 }; 145 };
139 146
140 friend class AnimationAnimationTimelineTest; 147 friend class AnimationAnimationTimelineTest;
141 }; 148 };
142 149
143 } // namespace blink 150 } // namespace blink
144 151
145 #endif 152 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698