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

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

Issue 1076313006: Animation start scale should be considered for the raster scale (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing and Added more tests Created 5 years, 7 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/trees/layer_tree_host_common.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/animation/animation_id_provider.h" 7 #include "cc/animation/animation_id_provider.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/animation/transform_operations.h" 10 #include "cc/animation/transform_operations.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 bool FakeTransformTransition::AffectsScale() const { return false; } 169 bool FakeTransformTransition::AffectsScale() const { return false; }
170 170
171 bool FakeTransformTransition::IsTranslation() const { return true; } 171 bool FakeTransformTransition::IsTranslation() const { return true; }
172 172
173 bool FakeTransformTransition::PreservesAxisAlignment() const { 173 bool FakeTransformTransition::PreservesAxisAlignment() const {
174 return true; 174 return true;
175 } 175 }
176 176
177 bool FakeTransformTransition::AnimationStartScale(bool forward_direction,
178 float* start_scale) const {
179 *start_scale = 1.f;
180 return true;
181 }
182
177 bool FakeTransformTransition::MaximumTargetScale(bool forward_direction, 183 bool FakeTransformTransition::MaximumTargetScale(bool forward_direction,
178 float* max_scale) const { 184 float* max_scale) const {
179 *max_scale = 1.f; 185 *max_scale = 1.f;
180 return true; 186 return true;
181 } 187 }
182 188
183 scoped_ptr<AnimationCurve> FakeTransformTransition::Clone() const { 189 scoped_ptr<AnimationCurve> FakeTransformTransition::Clone() const {
184 return make_scoped_ptr(new FakeTransformTransition(*this)); 190 return make_scoped_ptr(new FakeTransformTransition(*this));
185 } 191 }
186 192
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 double duration, 352 double duration,
347 float start_brightness, 353 float start_brightness,
348 float end_brightness) { 354 float end_brightness) {
349 return AddAnimatedFilter(layer->layer_animation_controller(), 355 return AddAnimatedFilter(layer->layer_animation_controller(),
350 duration, 356 duration,
351 start_brightness, 357 start_brightness,
352 end_brightness); 358 end_brightness);
353 } 359 }
354 360
355 } // namespace cc 361 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698