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

Unified Diff: Source/core/animation/TimedItem.h

Issue 28263002: Plumb timeToNextEffect through players and animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved location of timeToEffectChange calculation Created 7 years, 2 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: Source/core/animation/TimedItem.h
diff --git a/Source/core/animation/TimedItem.h b/Source/core/animation/TimedItem.h
index 31520fc4ebefe349a3227de35550923c523c0a43..c9f919055a48710dcb5743f6ffe9ed40fb0e588f 100644
--- a/Source/core/animation/TimedItem.h
+++ b/Source/core/animation/TimedItem.h
@@ -74,6 +74,7 @@ public:
bool isCurrent() const { return ensureCalculated().isCurrent; }
bool isInEffect() const { return ensureCalculated().isInEffect; }
bool isInPlay() const { return ensureCalculated().isInPlay; }
+ double timeToEffectChange() const { return ensureCalculated().timeToEffectChange; }
double startTime() const { return m_startTime; }
@@ -91,11 +92,13 @@ protected:
// it will (if necessary) recalculate timings and (if necessary) call
// updateChildrenAndEffects.
void updateInheritedTime(double inheritedTime) const;
+
+private:
virtual void updateChildrenAndEffects(bool wasInEffect) const = 0;
virtual double intrinsicIterationDuration() const { return 0; };
virtual void willDetach() = 0;
+ virtual double calculateTimeToEffectChange(double inheritedTime, double activeTime, Phase) const = 0;
-private:
void attach(Player* player) { m_player = player; };
void detach()
{
@@ -120,6 +123,7 @@ private:
bool isCurrent;
bool isInEffect;
bool isInPlay;
+ double timeToEffectChange;
} m_calculated;
mutable bool m_isFirstSample;

Powered by Google App Engine
This is Rietveld 408576698