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

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

Issue 1287013003: Ensure serviceOnNextFrame isn't put off indefinitely. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 OwnPtrWillBeMember<PlatformTiming> m_timing; 131 OwnPtrWillBeMember<PlatformTiming> m_timing;
132 double m_lastCurrentTimeInternal; 132 double m_lastCurrentTimeInternal;
133 133
134 OwnPtr<WebCompositorAnimationTimeline> m_compositorTimeline; 134 OwnPtr<WebCompositorAnimationTimeline> m_compositorTimeline;
135 135
136 class AnimationTimelineTiming final : public PlatformTiming { 136 class AnimationTimelineTiming final : public PlatformTiming {
137 public: 137 public:
138 AnimationTimelineTiming(AnimationTimeline* timeline) 138 AnimationTimelineTiming(AnimationTimeline* timeline)
139 : m_timeline(timeline) 139 : m_timeline(timeline)
140 , m_timer(this, &AnimationTimelineTiming::timerFired) 140 , m_timer(this, &AnimationTimelineTiming::timerFired)
141 , m_currentScheduledTime(std::numeric_limits<double>::infinity())
141 { 142 {
142 ASSERT(m_timeline); 143 ASSERT(m_timeline);
143 } 144 }
144 145
145 void wakeAfter(double duration) override; 146 void wakeAfter(double duration) override;
146 void cancelWake() override; 147 void cancelWake() override;
147 void serviceOnNextFrame() override; 148 void serviceOnNextFrame() override;
148 149
149 void timerFired(Timer<AnimationTimelineTiming>*) { m_timeline->wake(); } 150 void timerFired(Timer<AnimationTimelineTiming>*) { m_timeline->wake(); }
150 151
151 DECLARE_VIRTUAL_TRACE(); 152 DECLARE_VIRTUAL_TRACE();
152 153
153 private: 154 private:
154 RawPtrWillBeMember<AnimationTimeline> m_timeline; 155 RawPtrWillBeMember<AnimationTimeline> m_timeline;
155 Timer<AnimationTimelineTiming> m_timer; 156 Timer<AnimationTimelineTiming> m_timer;
157 double m_currentScheduledTime;
156 }; 158 };
157 159
158 friend class AnimationAnimationTimelineTest; 160 friend class AnimationAnimationTimelineTest;
159 }; 161 };
160 162
161 } // namespace blink 163 } // namespace blink
162 164
163 #endif 165 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimationTimeline.cpp » ('j') | Source/core/animation/AnimationTimeline.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698