OLD | NEW |
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 Loading... |
84 // timeToEffectChange returns: | 84 // timeToEffectChange returns: |
85 // infinity - if this animation is no longer in effect | 85 // infinity - if this animation is no longer in effect |
86 // 0 - if this animation requires an update on the next frame | 86 // 0 - if this animation requires an update on the next frame |
87 // n - if this animation requires an update after 'n' units of time | 87 // n - if this animation requires an update after 'n' units of time |
88 double TimeToEffectChange(); | 88 double TimeToEffectChange(); |
89 | 89 |
90 void cancel(); | 90 void cancel(); |
91 | 91 |
92 double currentTime(bool& is_null); | 92 double currentTime(bool& is_null); |
93 double currentTime(); | 93 double currentTime(); |
94 void setCurrentTime(double new_current_time); | 94 void setCurrentTime(double new_current_time, bool is_null); |
95 | 95 |
96 double CurrentTimeInternal() const; | 96 double CurrentTimeInternal() const; |
97 double UnlimitedCurrentTimeInternal() const; | 97 double UnlimitedCurrentTimeInternal() const; |
98 | 98 |
99 void SetCurrentTimeInternal(double new_current_time, | 99 void SetCurrentTimeInternal(double new_current_time, |
100 TimingUpdateReason = kTimingUpdateOnDemand); | 100 TimingUpdateReason = kTimingUpdateOnDemand); |
101 bool Paused() const { return paused_ && !is_paused_for_testing_; } | 101 bool Paused() const { return paused_ && !is_paused_for_testing_; } |
102 static const char* PlayStateString(AnimationPlayState); | 102 static const char* PlayStateString(AnimationPlayState); |
103 String playState() const { return PlayStateString(PlayStateInternal()); } | 103 String playState() const { return PlayStateString(PlayStateInternal()); } |
104 AnimationPlayState PlayStateInternal() const; | 104 AnimationPlayState PlayStateInternal() const; |
(...skipping 24 matching lines...) Expand all Loading... |
129 double playbackRate() const; | 129 double playbackRate() const; |
130 void setPlaybackRate(double); | 130 void setPlaybackRate(double); |
131 const AnimationTimeline* timeline() const { return timeline_; } | 131 const AnimationTimeline* timeline() const { return timeline_; } |
132 AnimationTimeline* timeline() { return timeline_; } | 132 AnimationTimeline* timeline() { return timeline_; } |
133 | 133 |
134 double CalculateStartTime(double current_time) const; | 134 double CalculateStartTime(double current_time) const; |
135 bool HasStartTime() const { return !IsNull(start_time_); } | 135 bool HasStartTime() const { return !IsNull(start_time_); } |
136 double startTime(bool& is_null) const; | 136 double startTime(bool& is_null) const; |
137 double startTime() const; | 137 double startTime() const; |
138 double StartTimeInternal() const { return start_time_; } | 138 double StartTimeInternal() const { return start_time_; } |
139 void setStartTime(double); | 139 void setStartTime(double, bool is_null); |
140 void SetStartTimeInternal(double); | 140 void SetStartTimeInternal(double); |
141 | 141 |
142 const AnimationEffectReadOnly* effect() const { return content_.Get(); } | 142 const AnimationEffectReadOnly* effect() const { return content_.Get(); } |
143 AnimationEffectReadOnly* effect() { return content_.Get(); } | 143 AnimationEffectReadOnly* effect() { return content_.Get(); } |
144 void setEffect(AnimationEffectReadOnly*); | 144 void setEffect(AnimationEffectReadOnly*); |
145 | 145 |
146 void setId(const String& id) { id_ = id; } | 146 void setId(const String& id) { id_ = id; } |
147 const String& id() const { return id_; } | 147 const String& id() const { return id_; } |
148 | 148 |
149 // Pausing via this method is not reflected in the value returned by | 149 // Pausing via this method is not reflected in the value returned by |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 bool current_time_pending_; | 352 bool current_time_pending_; |
353 bool state_is_being_updated_; | 353 bool state_is_being_updated_; |
354 | 354 |
355 bool effect_suppressed_; | 355 bool effect_suppressed_; |
356 }; | 356 }; |
357 | 357 |
358 } // namespace blink | 358 } // namespace blink |
359 | 359 |
360 #endif // Animation_h | 360 #endif // Animation_h |
OLD | NEW |