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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h

Issue 2248643003: Simplify time tracking in SMILTimeContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: begin() -> start(); touch-up comment Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h
diff --git a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h
index 83e25012baeff336b0d69fe4c51c54f72674c325..a8a12ea4d886d7ac4bd7119aa92dfbea80f4544e 100644
--- a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h
+++ b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h
@@ -57,7 +57,7 @@ public:
bool isPaused() const;
bool isStarted() const;
- void begin();
+ void start();
void pause();
void resume();
void setElapsed(SMILTime);
@@ -96,7 +96,8 @@ private:
};
bool isTimelineRunning() const;
- void scheduleAnimationFrame(SMILTime fireTime);
+ void synchronizeToDocumentTimeline();
+ void scheduleAnimationFrame(double delayTime);
void cancelAnimationFrame();
void wakeupTimerFired(TimerBase*);
void scheduleAnimationPolicyTimer();
@@ -111,19 +112,20 @@ private:
bool hasPendingSynchronization() const;
void updateDocumentOrderIndexes();
- double lastResumeTime() const { return m_resumeTime ? m_resumeTime : m_beginTime; }
SVGSVGElement& ownerSVGElement() const;
Document& document() const;
- double currentTime() const;
- double m_beginTime;
- double m_pauseTime;
- double m_resumeTime;
- double m_accumulatedActiveTime;
- double m_presetStartTime;
+ // The latest "restart" time for the time container's timeline. If the
+ // timeline has not been manipulated (seeked, paused) this will be zero.
+ double m_presentationTime;
+ // The time on the document timeline corresponding to |m_presentationTime|.
+ double m_referenceTime;
FrameSchedulingState m_frameSchedulingState;
+ bool m_started; // The timeline has been started.
+ bool m_paused; // The timeline is paused.
+
bool m_documentOrderIndexesDirty;
Timer<SMILTimeContainer> m_wakeupTimer;

Powered by Google App Engine
This is Rietveld 408576698