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

Side by Side Diff: cc/animation.cc

Issue 12453010: Allow impl-only animations, and return opacity values via AnimationEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits, patch for submission. Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/animation.h ('k') | cc/animation_events.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/animation.h" 5 #include "cc/animation.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 , m_runState(WaitingForTargetAvailability) 52 , m_runState(WaitingForTargetAvailability)
53 , m_iterations(1) 53 , m_iterations(1)
54 , m_startTime(0) 54 , m_startTime(0)
55 , m_alternatesDirection(false) 55 , m_alternatesDirection(false)
56 , m_timeOffset(0) 56 , m_timeOffset(0)
57 , m_needsSynchronizedStartTime(false) 57 , m_needsSynchronizedStartTime(false)
58 , m_suspended(false) 58 , m_suspended(false)
59 , m_pauseTime(0) 59 , m_pauseTime(0)
60 , m_totalPausedTime(0) 60 , m_totalPausedTime(0)
61 , m_isControllingInstance(false) 61 , m_isControllingInstance(false)
62 , m_isImplOnly(false)
62 { 63 {
63 } 64 }
64 65
65 Animation::~Animation() 66 Animation::~Animation()
66 { 67 {
67 if (m_runState == Running || m_runState == Paused) 68 if (m_runState == Running || m_runState == Paused)
68 setRunState(Aborted, 0); 69 setRunState(Aborted, 0);
69 } 70 }
70 71
71 void Animation::setRunState(RunState runState, double monotonicTime) 72 void Animation::setRunState(RunState runState, double monotonicTime)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 { 202 {
202 // Currently, we only push changes due to pausing and resuming animations on the main thread. 203 // Currently, we only push changes due to pausing and resuming animations on the main thread.
203 if (m_runState == Animation::Paused || other->m_runState == Animation::Pause d) { 204 if (m_runState == Animation::Paused || other->m_runState == Animation::Pause d) {
204 other->m_runState = m_runState; 205 other->m_runState = m_runState;
205 other->m_pauseTime = m_pauseTime; 206 other->m_pauseTime = m_pauseTime;
206 other->m_totalPausedTime = m_totalPausedTime; 207 other->m_totalPausedTime = m_totalPausedTime;
207 } 208 }
208 } 209 }
209 210
210 } // namespace cc 211 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation.h ('k') | cc/animation_events.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698