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

Side by Side Diff: sky/engine/core/animation/AnimationPlayer.h

Issue 718873003: Remove most of config.h (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/animation/Animation.cpp ('k') | sky/engine/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual ExecutionContext* executionContext() const override; 94 virtual ExecutionContext* executionContext() const override;
95 virtual bool hasPendingActivity() const override; 95 virtual bool hasPendingActivity() const override;
96 virtual void stop() override; 96 virtual void stop() override;
97 virtual bool dispatchEvent(PassRefPtr<Event>) override; 97 virtual bool dispatchEvent(PassRefPtr<Event>) override;
98 98
99 double playbackRate() const { return m_playbackRate; } 99 double playbackRate() const { return m_playbackRate; }
100 void setPlaybackRate(double); 100 void setPlaybackRate(double);
101 const AnimationTimeline* timeline() const { return m_timeline; } 101 const AnimationTimeline* timeline() const { return m_timeline; }
102 AnimationTimeline* timeline() { return m_timeline; } 102 AnimationTimeline* timeline() { return m_timeline; }
103 103
104 #if !ENABLE(OILPAN)
105 void timelineDestroyed() { m_timeline = nullptr; } 104 void timelineDestroyed() { m_timeline = nullptr; }
106 #endif
107 105
108 double calculateStartTime(double currentTime) const; 106 double calculateStartTime(double currentTime) const;
109 bool hasStartTime() const { return !isNull(m_startTime); } 107 bool hasStartTime() const { return !isNull(m_startTime); }
110 double startTime() const; 108 double startTime() const;
111 double startTimeInternal() const { return m_startTime; } 109 double startTimeInternal() const { return m_startTime; }
112 void setStartTime(double); 110 void setStartTime(double);
113 void setStartTimeInternal(double); 111 void setStartTimeInternal(double);
114 112
115 const AnimationNode* source() const { return m_content.get(); } 113 const AnimationNode* source() const { return m_content.get(); }
116 AnimationNode* source() { return m_content.get(); } 114 AnimationNode* source() { return m_content.get(); }
(...skipping 19 matching lines...) Expand all
136 void preCommit(bool startOnCompositor); 134 void preCommit(bool startOnCompositor);
137 void postCommit(double timelineTime); 135 void postCommit(double timelineTime);
138 136
139 unsigned sequenceNumber() const { return m_sequenceNumber; } 137 unsigned sequenceNumber() const { return m_sequenceNumber; }
140 138
141 static bool hasLowerPriority(AnimationPlayer* player1, AnimationPlayer* play er2) 139 static bool hasLowerPriority(AnimationPlayer* player1, AnimationPlayer* play er2)
142 { 140 {
143 return player1->sequenceNumber() < player2->sequenceNumber(); 141 return player1->sequenceNumber() < player2->sequenceNumber();
144 } 142 }
145 143
146 #if !ENABLE(OILPAN)
147 // Checks if the AnimationStack is the last reference holder to the Player. 144 // Checks if the AnimationStack is the last reference holder to the Player.
148 // This won't be needed when AnimationPlayer is moved to Oilpan.
149 bool canFree() const; 145 bool canFree() const;
150 #endif
151 146
152 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override; 147 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override;
153 148
154 virtual void trace(Visitor*) override; 149 virtual void trace(Visitor*) override;
155 150
156 private: 151 private:
157 AnimationPlayer(ExecutionContext*, AnimationTimeline&, AnimationNode*); 152 AnimationPlayer(ExecutionContext*, AnimationTimeline&, AnimationNode*);
158 double sourceEnd() const; 153 double sourceEnd() const;
159 bool limited(double currentTime) const; 154 bool limited(double currentTime) const;
160 void updateCurrentTimingState(TimingUpdateReason); 155 void updateCurrentTimingState(TimingUpdateReason);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // animation is started. Updated once the start time is known and each time 206 // animation is started. Updated once the start time is known and each time
212 // modifications are pushed to the compositor. 207 // modifications are pushed to the compositor.
213 OwnPtr<CompositorState> m_compositorState; 208 OwnPtr<CompositorState> m_compositorState;
214 bool m_compositorPending; 209 bool m_compositorPending;
215 bool m_currentTimePending; 210 bool m_currentTimePending;
216 }; 211 };
217 212
218 } // namespace blink 213 } // namespace blink
219 214
220 #endif 215 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/animation/Animation.cpp ('k') | sky/engine/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698