Chromium Code Reviews| Index: Source/core/svg/animation/SMILTimeContainer.h |
| diff --git a/Source/core/svg/animation/SMILTimeContainer.h b/Source/core/svg/animation/SMILTimeContainer.h |
| index 53565e99e5ecad742066aacc42bab3b10d576271..2d5a36f56750dd76ab659800631e79c1bd9e7bfb 100644 |
| --- a/Source/core/svg/animation/SMILTimeContainer.h |
| +++ b/Source/core/svg/animation/SMILTimeContainer.h |
| @@ -29,6 +29,7 @@ |
| #include "core/dom/QualifiedName.h" |
| #include "core/svg/animation/SMILTime.h" |
| #include "platform/Timer.h" |
| +#include "platform/graphics/ImageAnimationPolicy.h" |
| #include "platform/heap/Handle.h" |
| #include "wtf/HashMap.h" |
| #include "wtf/HashSet.h" |
| @@ -57,9 +58,10 @@ public: |
| bool isPaused() const; |
| bool isStarted() const; |
| + bool isFrozen() const; |
| void begin(); |
| - void pause(); |
| + void pause(bool freeze = false); |
| void resume(); |
| void setElapsed(SMILTime); |
| @@ -83,11 +85,24 @@ private: |
| // Scheduled a animation frame for continuous update. |
| AnimationFrame |
| }; |
| + enum AnimatedState { |
|
fs
2014/12/22 16:23:15
I'd prefer to enumerate all the discrete states ra
je_julie(Not used)
2014/12/24 03:50:51
I removed it with improved concept.
|
| + // initial state. |
| + NormalState = 0, |
| + // Paused animations. |
| + PausedState = 1 << 0, |
| + // Frozen animations. |
| + FrozenState = 1 << 1 |
| + }; |
| + ImageAnimationPolicy getAnimationPolicy() const; |
|
fs
2014/12/22 16:23:15
animationPolicy
je_julie(Not used)
2014/12/24 03:50:51
done.
|
| + void freezeTimeline(); |
| bool isTimelineRunning() const; |
| void scheduleAnimationFrame(SMILTime fireTime); |
| void cancelAnimationFrame(); |
| void wakeupTimerFired(Timer<SMILTimeContainer>*); |
| + void cancelAnimationPolicyTimer(); |
| + void startAnimationPolicyTimer(); |
| + void animationPolicyOnceTimerFired(Timer<SMILTimeContainer>*); |
| void updateAnimationsAndScheduleFrameIfNeeded(SMILTime elapsed, bool seekToTime = false); |
| SMILTime updateAnimations(SMILTime elapsed, bool seekToTime = false); |
| void serviceOnNextFrame(); |
| @@ -108,8 +123,10 @@ private: |
| FrameSchedulingState m_frameSchedulingState; |
| bool m_documentOrderIndexesDirty; |
| + int m_animationState; |
|
fs
2014/12/22 16:23:15
With the discrete states this would then be the en
je_julie(Not used)
2014/12/24 03:50:51
I removed it with improved concept.
|
| Timer<SMILTimeContainer> m_wakeupTimer; |
| + Timer<SMILTimeContainer> m_animationPolicyOnceTimer; |
| using ElementAttributePair = pair<RawPtrWillBeWeakMember<SVGElement>, QualifiedName>; |
| using AnimationsLinkedHashSet = WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<SVGSMILElement>>; |