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

Side by Side Diff: cc/animation.h

Issue 12453010: Allow impl-only animations, and return opacity values via AnimationEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | cc/animation.cc » ('j') | cc/animation_events.h » ('J')
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 #ifndef CC_ANIMATION_H_ 5 #ifndef CC_ANIMATION_H_
6 #define CC_ANIMATION_H_ 6 #define CC_ANIMATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/cc_export.h" 10 #include "cc/cc_export.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 ControllingInstance = 0, 100 ControllingInstance = 0,
101 NonControllingInstance 101 NonControllingInstance
102 }; 102 };
103 103
104 scoped_ptr<Animation> clone(InstanceType) const; 104 scoped_ptr<Animation> clone(InstanceType) const;
105 scoped_ptr<Animation> cloneAndInitialize(InstanceType, RunState initialRunSt ate, double startTime) const; 105 scoped_ptr<Animation> cloneAndInitialize(InstanceType, RunState initialRunSt ate, double startTime) const;
106 bool isControllingInstance() const { return m_isControllingInstance; } 106 bool isControllingInstance() const { return m_isControllingInstance; }
107 107
108 void pushPropertiesTo(Animation*) const; 108 void pushPropertiesTo(Animation*) const;
109 109
110 void setIsImplAnimationOnly(bool isImplOnly) { m_isImplAnimationOnly = isImp lOnly; }
Ian Vollick 2013/03/06 01:00:57 nit: setIsImplOnly. The 'Animation' bit adds no ex
wjmaclean 2013/03/06 17:03:13 Done.
111 bool isImplAnimationOnly() { return m_isImplAnimationOnly; }
112
110 private: 113 private:
111 Animation(scoped_ptr<AnimationCurve>, int animationId, int groupId, TargetPr operty); 114 Animation(scoped_ptr<AnimationCurve>, int animationId, int groupId, TargetPr operty);
112 115
113 scoped_ptr<AnimationCurve> m_curve; 116 scoped_ptr<AnimationCurve> m_curve;
114 117
115 // IDs are not necessarily unique. 118 // IDs are not necessarily unique.
116 int m_id; 119 int m_id;
117 120
118 // Animations that must be run together are called 'grouped' and have the sa me group id 121 // Animations that must be run together are called 'grouped' and have the sa me group id
119 // Grouped animations are guaranteed to start at the same time and no other animations 122 // Grouped animations are guaranteed to start at the same time and no other animations
(...skipping 28 matching lines...) Expand all
148 151
149 // Animations lead dual lives. An active animation will be conceptually owne d by 152 // Animations lead dual lives. An active animation will be conceptually owne d by
150 // two controllers, one on the impl thread and one on the main. In reality, there 153 // two controllers, one on the impl thread and one on the main. In reality, there
151 // will be two separate Animation instances for the same animation. They 154 // will be two separate Animation instances for the same animation. They
152 // will have the same group id and the same target property (these two value s 155 // will have the same group id and the same target property (these two value s
153 // uniquely identify an animation). The instance on the impl thread is the i nstance 156 // uniquely identify an animation). The instance on the impl thread is the i nstance
154 // that ultimately controls the values of the animating layer and so we will refer 157 // that ultimately controls the values of the animating layer and so we will refer
155 // to it as the 'controlling instance'. 158 // to it as the 'controlling instance'.
156 bool m_isControllingInstance; 159 bool m_isControllingInstance;
157 160
161 bool m_isImplAnimationOnly;
162
158 DISALLOW_COPY_AND_ASSIGN(Animation); 163 DISALLOW_COPY_AND_ASSIGN(Animation);
159 }; 164 };
160 165
161 } // namespace cc 166 } // namespace cc
162 167
163 #endif // CC_ANIMATION_H_ 168 #endif // CC_ANIMATION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation.cc » ('j') | cc/animation_events.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698