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

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: 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
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 setPlaybackRateForInspector(double);
dstockwell 2014/11/12 03:39:42 remove "ForInspector" this should be a general fea
samli 2014/11/12 20:01:13 Done.
95 double playbackRateForInspector() 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 // Inspector variables
dstockwell 2014/11/12 03:39:42 Don't know what these are for.
samli 2014/11/12 20:01:13 Done.
117 double m_lastCurrentTime;
118 double m_lastRealTime;
alancutter (OOO until 2018) 2014/11/12 03:19:18 These names are quite unclear. It's hard to think
samli 2014/11/12 20:01:13 Done.
119 double m_playbackRate;
120
113 friend class SMILTimeContainer; 121 friend class SMILTimeContainer;
114 static const double s_minimumDelay; 122 static const double s_minimumDelay;
115 123
116 OwnPtrWillBeMember<PlatformTiming> m_timing; 124 OwnPtrWillBeMember<PlatformTiming> m_timing;
117 125
118 class AnimationTimelineTiming final : public PlatformTiming { 126 class AnimationTimelineTiming final : public PlatformTiming {
119 public: 127 public:
120 AnimationTimelineTiming(AnimationTimeline* timeline) 128 AnimationTimelineTiming(AnimationTimeline* timeline)
121 : m_timeline(timeline) 129 : m_timeline(timeline)
122 , m_timer(this, &AnimationTimelineTiming::timerFired) 130 , m_timer(this, &AnimationTimelineTiming::timerFired)
(...skipping 13 matching lines...) Expand all
136 RawPtrWillBeMember<AnimationTimeline> m_timeline; 144 RawPtrWillBeMember<AnimationTimeline> m_timeline;
137 Timer<AnimationTimelineTiming> m_timer; 145 Timer<AnimationTimelineTiming> m_timer;
138 }; 146 };
139 147
140 friend class AnimationAnimationTimelineTest; 148 friend class AnimationAnimationTimelineTest;
141 }; 149 };
142 150
143 } // namespace blink 151 } // namespace blink
144 152
145 #endif 153 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698