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

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

Issue 73643004: Web Animations: Extract an API for servicing animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to references for non-null params. Created 7 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 | Annotate | Revision Log
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 m_pauseStartTime = seekTime; 158 m_pauseStartTime = seekTime;
159 else 159 else
160 m_timeDrift = currentTimeBeforeDrift() - seekTime; 160 m_timeDrift = currentTimeBeforeDrift() - seekTime;
161 161
162 update(); 162 update();
163 } 163 }
164 164
165 void Player::pauseForTesting() 165 void Player::pauseForTesting()
166 { 166 {
167 // FIXME: Need to support pausing compositor animations to pass virtual/thre aded tests. 167 // FIXME: Need to support pausing compositor animations to pass virtual/thre aded tests.
168 RELEASE_ASSERT(!hasActiveAnimationsOnCompositor());
Steve Block 2013/11/20 00:36:16 Why is this removed?
dstockwell 2013/11/20 00:49:16 This allows the tests to pass, although they may n
169 RELEASE_ASSERT(!paused()); 168 RELEASE_ASSERT(!paused());
170 m_isPausedForTesting = true; 169 m_isPausedForTesting = true;
171 setPausedImpl(true); 170 setPausedImpl(true);
172 } 171 }
173 172
174 void Player::setPaused(bool newValue) 173 void Player::setPaused(bool newValue)
175 { 174 {
176 ASSERT(!m_isPausedForTesting); 175 ASSERT(!m_isPausedForTesting);
177 setPausedImpl(newValue); 176 setPausedImpl(newValue);
178 } 177 }
(...skipping 14 matching lines...) Expand all
193 } 192 }
194 193
195 void Player::setPlaybackRate(double newRate) 194 void Player::setPlaybackRate(double newRate)
196 { 195 {
197 double previousTime = currentTime(); 196 double previousTime = currentTime();
198 m_playbackRate = newRate; 197 m_playbackRate = newRate;
199 setCurrentTime(previousTime); 198 setCurrentTime(previousTime);
200 } 199 }
201 200
202 } // namespace 201 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698