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

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: 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 side-by-side diff with in-line comments
Download patch
Index: cc/test/animation_test_common.cc
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index d04c5d3bf3343fa0b0c282bd8c90f0219f4330b0..8bc4e104d7d089bf552018153ec8f8451ded487d 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"
@@ -352,4 +353,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

Powered by Google App Engine
This is Rietveld 408576698