| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 Animation* Play(AnimationEffectReadOnly*); | 76 Animation* Play(AnimationEffectReadOnly*); |
| 77 HeapVector<Member<Animation>> getAnimations(); | 77 HeapVector<Member<Animation>> getAnimations(); |
| 78 | 78 |
| 79 void AnimationAttached(Animation&); | 79 void AnimationAttached(Animation&); |
| 80 | 80 |
| 81 bool IsActive(); | 81 bool IsActive(); |
| 82 bool HasPendingUpdates() const { | 82 bool HasPendingUpdates() const { |
| 83 return !animations_needing_update_.IsEmpty(); | 83 return !animations_needing_update_.IsEmpty(); |
| 84 } | 84 } |
| 85 double ZeroTime(); | 85 double ZeroTime(); |
| 86 double currentTime(bool& is_null); | 86 virtual double currentTime(bool& is_null); |
| 87 double currentTime(); | 87 virtual double currentTime(); |
| 88 double CurrentTimeInternal(bool& is_null); | 88 virtual double CurrentTimeInternal(bool& is_null); |
| 89 double CurrentTimeInternal(); | 89 virtual double CurrentTimeInternal(); |
| 90 void setCurrentTime(double, bool is_null); | 90 void setCurrentTime(double, bool is_null); |
| 91 void SetCurrentTimeInternal(double); | 91 void SetCurrentTimeInternal(double); |
| 92 double EffectiveTime(); | 92 double EffectiveTime(); |
| 93 void PauseAnimationsForTesting(double); | 93 void PauseAnimationsForTesting(double); |
| 94 | 94 |
| 95 void SetAllCompositorPending(bool source_changed = false); | 95 void SetAllCompositorPending(bool source_changed = false); |
| 96 void SetOutdatedAnimation(Animation*); | 96 void SetOutdatedAnimation(Animation*); |
| 97 void ClearOutdatedAnimation(Animation*); | 97 void ClearOutdatedAnimation(Animation*); |
| 98 bool HasOutdatedAnimation() const { return outdated_animation_count_ > 0; } | 98 bool HasOutdatedAnimation() const { return outdated_animation_count_ > 0; } |
| 99 bool NeedsAnimationTimingUpdate(); | 99 bool NeedsAnimationTimingUpdate(); |
| 100 void InvalidateKeyframeEffects(const TreeScope&); | 100 void InvalidateKeyframeEffects(const TreeScope&); |
| 101 | 101 |
| 102 void SetPlaybackRate(double); | 102 void SetPlaybackRate(double); |
| 103 double PlaybackRate() const; | 103 double PlaybackRate() const; |
| 104 | 104 |
| 105 CompositorAnimationTimeline* CompositorTimeline() const { | 105 CompositorAnimationTimeline* CompositorTimeline() const { |
| 106 return compositor_timeline_.get(); | 106 return compositor_timeline_.get(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 Document* GetDocument() { return document_.Get(); } | 109 Document* GetDocument() { return document_.Get(); } |
| 110 void Wake(); | 110 void Wake(); |
| 111 void ResetForTesting(); | 111 void ResetForTesting(); |
| 112 | 112 |
| 113 DECLARE_TRACE(); | 113 DECLARE_VIRTUAL_TRACE(); |
| 114 | 114 |
| 115 protected: | 115 protected: |
| 116 AnimationTimeline(Document*, PlatformTiming*); | 116 AnimationTimeline(Document*, PlatformTiming*); |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 Member<Document> document_; | 119 Member<Document> document_; |
| 120 double zero_time_; | 120 double zero_time_; |
| 121 bool zero_time_initialized_; | 121 bool zero_time_initialized_; |
| 122 unsigned outdated_animation_count_; | 122 unsigned outdated_animation_count_; |
| 123 // Animations which will be updated on the next frame | 123 // Animations which will be updated on the next frame |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 Member<AnimationTimeline> timeline_; | 157 Member<AnimationTimeline> timeline_; |
| 158 TaskRunnerTimer<AnimationTimelineTiming> timer_; | 158 TaskRunnerTimer<AnimationTimelineTiming> timer_; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 friend class AnimationAnimationTimelineTest; | 161 friend class AnimationAnimationTimelineTest; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| 165 | 165 |
| 166 #endif | 166 #endif |
| OLD | NEW |