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

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

Issue 947033002: CC Animations: Establish AnimationHost, AnimationTimeline and AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement test helpers. Created 5 years, 8 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
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/animation_player.h"
8 #include "cc/animation/keyframed_animation_curve.h" 9 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/animation/transform_operations.h" 11 #include "cc/animation/transform_operations.h"
11 #include "cc/base/time_util.h" 12 #include "cc/base/time_util.h"
12 #include "cc/layers/layer.h" 13 #include "cc/layers/layer.h"
13 #include "cc/layers/layer_impl.h" 14 #include "cc/layers/layer_impl.h"
14 15
15 using cc::Animation; 16 using cc::Animation;
16 using cc::AnimationCurve; 17 using cc::AnimationCurve;
17 using cc::EaseTimingFunction; 18 using cc::EaseTimingFunction;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 int AddAnimatedFilterToLayer(LayerImpl* layer, 346 int AddAnimatedFilterToLayer(LayerImpl* layer,
346 double duration, 347 double duration,
347 float start_brightness, 348 float start_brightness,
348 float end_brightness) { 349 float end_brightness) {
349 return AddAnimatedFilter(layer->layer_animation_controller(), 350 return AddAnimatedFilter(layer->layer_animation_controller(),
350 duration, 351 duration,
351 start_brightness, 352 start_brightness,
352 end_brightness); 353 end_brightness);
353 } 354 }
354 355
356 int AddAnimatedTransformToPlayer(AnimationPlayer* player,
357 double duration,
358 int delta_x,
359 int delta_y) {
360 return AddAnimatedTransform(player, duration, delta_x, delta_y);
361 }
362
363 int AddOpacityTransitionToPlayer(AnimationPlayer* player,
364 double duration,
365 float start_opacity,
366 float end_opacity,
367 bool use_timing_function) {
368 return AddOpacityTransition(player, duration, start_opacity, end_opacity,
369 use_timing_function);
370 }
371
372 int AddAnimatedFilterToPlayer(AnimationPlayer* player,
373 double duration,
374 float start_brightness,
375 float end_brightness) {
376 return AddAnimatedFilter(player, duration, start_brightness, end_brightness);
377 }
378
355 } // namespace cc 379 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698