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

Side by Side Diff: cc/test/animation_test_common.cc

Issue 11633044: We don't want to tick animation controllers for non-active layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding the suggested TODO. Created 7 years, 11 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/test/animation_test_common.h ('k') | cc/thread_proxy.cc » ('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/test/animation_test_common.h" 5 #include "cc/test/animation_test_common.h"
6 6
7 #include "cc/keyframed_animation_curve.h" 7 #include "cc/keyframed_animation_curve.h"
8 #include "cc/layer.h" 8 #include "cc/layer.h"
9 #include "cc/layer_animation_controller.h" 9 #include "cc/layer_animation_controller.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) 158 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity)
159 { 159 {
160 m_opacity = opacity; 160 m_opacity = opacity;
161 } 161 }
162 162
163 void FakeLayerAnimationValueObserver::OnTransformAnimated(const gfx::Transform& transform) 163 void FakeLayerAnimationValueObserver::OnTransformAnimated(const gfx::Transform& transform)
164 { 164 {
165 m_transform = transform; 165 m_transform = transform;
166 } 166 }
167 167
168 bool FakeLayerAnimationValueObserver::IsActive() const
169 {
170 return true;
171 }
172
168 scoped_ptr<cc::AnimationCurve> FakeFloatTransition::clone() const 173 scoped_ptr<cc::AnimationCurve> FakeFloatTransition::clone() const
169 { 174 {
170 return make_scoped_ptr(new FakeFloatTransition(*this)).PassAs<cc::AnimationC urve>(); 175 return make_scoped_ptr(new FakeFloatTransition(*this)).PassAs<cc::AnimationC urve>();
171 } 176 }
172 177
173 int addOpacityTransitionToController(cc::LayerAnimationController& controller, d ouble duration, float startOpacity, float endOpacity, bool useTimingFunction) 178 int addOpacityTransitionToController(cc::LayerAnimationController& controller, d ouble duration, float startOpacity, float endOpacity, bool useTimingFunction)
174 { 179 {
175 return addOpacityTransition(controller, duration, startOpacity, endOpacity, useTimingFunction); 180 return addOpacityTransition(controller, duration, startOpacity, endOpacity, useTimingFunction);
176 } 181 }
177 182
(...skipping 16 matching lines...) Expand all
194 { 199 {
195 return addAnimatedTransform(layer, duration, deltaX, deltaY); 200 return addAnimatedTransform(layer, duration, deltaX, deltaY);
196 } 201 }
197 202
198 int addAnimatedTransformToLayer(cc::LayerImpl& layer, double duration, int delta X, int deltaY) 203 int addAnimatedTransformToLayer(cc::LayerImpl& layer, double duration, int delta X, int deltaY)
199 { 204 {
200 return addAnimatedTransform(*layer.layerAnimationController(), duration, del taX, deltaY); 205 return addAnimatedTransform(*layer.layerAnimationController(), duration, del taX, deltaY);
201 } 206 }
202 207
203 } // namespace cc 208 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698