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

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: Fix some comments 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..0e005ec44186e3ad4709d2a44cf0558d9b1944da 100644
--- a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h
+++ b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.h
@@ -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.
pdr. 2016/08/18 19:50:06 We mix "start" and "begin" here. Wdyt about m_hasB
fs 2016/08/18 20:34:32 I guess begin, and variants thereof, would be more
fs 2016/08/19 11:11:24 I ended up going with begin() -> start().
+ bool m_paused; // The timeline is paused.
+
bool m_documentOrderIndexesDirty;
Timer<SMILTimeContainer> m_wakeupTimer;

Powered by Google App Engine
This is Rietveld 408576698