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

Side by Side Diff: Source/core/animation/Player.h

Issue 28263002: Plumb timeToNextEffect through players and animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 38
39 class DocumentTimeline; 39 class DocumentTimeline;
40 40
41 class Player FINAL : public RefCounted<Player> { 41 class Player FINAL : public RefCounted<Player> {
42 42
43 public: 43 public:
44 ~Player(); 44 ~Player();
45 static PassRefPtr<Player> create(DocumentTimeline*, TimedItem*); 45 static PassRefPtr<Player> create(DocumentTimeline*, TimedItem*);
46 46
47 // Returns whether this player is still current or in effect. 47 // Returns whether this player is still current or in effect.
48 bool update(); 48 // timeToEffectChange returns:
49 // -1 - if this player is no longer in effect
Timothy Loh 2013/10/18 06:01:27 Maybe change -1 to std::numeric_limits<double>::in
shans 2013/10/21 00:37:57 Done.
50 // 0 - if this player requires an update on the next frame
51 // n - if this player requires an update after 'n' units of time
52 bool update(double& timeToEffectChange);
53
54 inline bool update()
Timothy Loh 2013/10/18 06:01:27 Do we need to keep this version around?
shans 2013/10/21 00:37:57 Yeah. There are a few places where we simply don't
55 {
56 double tmp;
Timothy Loh 2013/10/18 06:01:27 We don't use these sorts of abbreviated variable n
shans 2013/10/21 00:37:57 Changed to 'unused'
57 return update(tmp);
58 }
59
49 void cancel(); 60 void cancel();
50 double currentTime() const; 61 double currentTime() const;
51 void setCurrentTime(double); 62 void setCurrentTime(double);
52 bool paused() const { return !isNull(m_pauseStartTime); } 63 bool paused() const { return !isNull(m_pauseStartTime); }
53 void setPaused(bool); 64 void setPaused(bool);
54 double playbackRate() const { return m_playbackRate; } 65 double playbackRate() const { return m_playbackRate; }
55 void setPlaybackRate(double); 66 void setPlaybackRate(double);
56 double startTime() const { return m_startTime; } 67 double startTime() const { return m_startTime; }
57 double timeDrift() const; 68 double timeDrift() const;
58 DocumentTimeline* timeline() { return m_timeline; } 69 DocumentTimeline* timeline() { return m_timeline; }
(...skipping 10 matching lines...) Expand all
69 double m_timeDrift; 80 double m_timeDrift;
70 const double m_startTime; 81 const double m_startTime;
71 82
72 RefPtr<TimedItem> m_content; 83 RefPtr<TimedItem> m_content;
73 DocumentTimeline* const m_timeline; 84 DocumentTimeline* const m_timeline;
74 }; 85 };
75 86
76 } // namespace 87 } // namespace
77 88
78 #endif 89 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698