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

Unified 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: Fix MSVC warning. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/animation_test_common.cc
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index ef852797f23ef9f1c0a544099d855eda50dee964..8a232badea2994222002059610b39ef326ae8c3c 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -5,6 +5,7 @@
#include "cc/test/animation_test_common.h"
#include "cc/animation/animation_id_provider.h"
+#include "cc/animation/animation_player.h"
#include "cc/animation/keyframed_animation_curve.h"
#include "cc/animation/layer_animation_controller.h"
#include "cc/animation/transform_operations.h"
@@ -86,7 +87,7 @@ int AddAnimatedTransform(Target* target,
int delta_y) {
TransformOperations start_operations;
if (duration > 0.0) {
- start_operations.AppendTranslate(delta_x, delta_y, 0.0);
+ start_operations.AppendTranslate(0, 0, 0.0);
}
TransformOperations operations;
@@ -358,4 +359,27 @@ int AddAnimatedFilterToLayer(LayerImpl* layer,
end_brightness);
}
+int AddAnimatedTransformToPlayer(AnimationPlayer* player,
+ double duration,
+ int delta_x,
+ int delta_y) {
+ return AddAnimatedTransform(player, duration, delta_x, delta_y);
+}
+
+int AddOpacityTransitionToPlayer(AnimationPlayer* player,
+ double duration,
+ float start_opacity,
+ float end_opacity,
+ bool use_timing_function) {
+ return AddOpacityTransition(player, duration, start_opacity, end_opacity,
+ use_timing_function);
+}
+
+int AddAnimatedFilterToPlayer(AnimationPlayer* player,
+ double duration,
+ float start_brightness,
+ float end_brightness) {
+ return AddAnimatedFilter(player, duration, start_brightness, end_brightness);
+}
+
} // namespace cc
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698