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

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

Issue 11783037: Not for review: Enable accelerated animations for orphaned layers (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Wait for layout to complete before starting orphaned animations Created 7 years, 10 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
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/thread_proxy.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/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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 168 bool FakeLayerAnimationValueObserver::IsActive() const
169 { 169 {
170 return true; 170 return true;
171 } 171 }
172 172
173 bool FakeLayerAnimationValueObserver::IsOrphaned() const
174 {
175 return false;
176 }
177
173 scoped_ptr<cc::AnimationCurve> FakeFloatTransition::clone() const 178 scoped_ptr<cc::AnimationCurve> FakeFloatTransition::clone() const
174 { 179 {
175 return make_scoped_ptr(new FakeFloatTransition(*this)).PassAs<cc::AnimationC urve>(); 180 return make_scoped_ptr(new FakeFloatTransition(*this)).PassAs<cc::AnimationC urve>();
176 } 181 }
177 182
178 int addOpacityTransitionToController(cc::LayerAnimationController& controller, d ouble duration, float startOpacity, float endOpacity, bool useTimingFunction) 183 int addOpacityTransitionToController(cc::LayerAnimationController& controller, d ouble duration, float startOpacity, float endOpacity, bool useTimingFunction)
179 { 184 {
180 return addOpacityTransition(controller, duration, startOpacity, endOpacity, useTimingFunction); 185 return addOpacityTransition(controller, duration, startOpacity, endOpacity, useTimingFunction);
181 } 186 }
182 187
(...skipping 16 matching lines...) Expand all
199 { 204 {
200 return addAnimatedTransform(layer, duration, deltaX, deltaY); 205 return addAnimatedTransform(layer, duration, deltaX, deltaY);
201 } 206 }
202 207
203 int addAnimatedTransformToLayer(cc::LayerImpl& layer, double duration, int delta X, int deltaY) 208 int addAnimatedTransformToLayer(cc::LayerImpl& layer, double duration, int delta X, int deltaY)
204 { 209 {
205 return addAnimatedTransform(*layer.layerAnimationController(), duration, del taX, deltaY); 210 return addAnimatedTransform(*layer.layerAnimationController(), duration, del taX, deltaY);
206 } 211 }
207 212
208 } // namespace cc 213 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698