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

Unified Diff: public/platform/WebCompositorAnimation.h

Issue 225183014: Handle direction control in compositor Animations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: same patch with a manual test added Created 6 years, 3 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 | « Source/core/core.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebCompositorAnimation.h
diff --git a/public/platform/WebCompositorAnimation.h b/public/platform/WebCompositorAnimation.h
index e367d46a1fcbd398e02c0606f374e503dd840507..2150d804fa809fa62b3ef00612b5fd44a49a28b8 100644
--- a/public/platform/WebCompositorAnimation.h
+++ b/public/platform/WebCompositorAnimation.h
@@ -6,6 +6,7 @@
#define WebCompositorAnimation_h
#define WEB_ANIMATION_SUPPORTS_FRACTIONAL_ITERATIONS 1
+#define WEB_ANIMATION_SUPPORTS_FULL_DIRECTION 1
namespace blink {
@@ -19,6 +20,13 @@ public:
TargetPropertyScrollOffset
};
+ enum Direction {
+ DirectionNormal = 0,
+ DirectionReverse,
+ DirectionAlternate,
+ DirectionAlternateReverse
+ };
+
virtual ~WebCompositorAnimation() { }
// An id is effectively the animation's name, and it is not unique.
@@ -38,9 +46,8 @@ public:
virtual double timeOffset() const = 0;
virtual void setTimeOffset(double monotonicTime) = 0;
- // If alternatesDirection is true, on odd numbered iterations we reverse the curve.
- virtual bool alternatesDirection() const = 0;
- virtual void setAlternatesDirection(bool) = 0;
+ virtual Direction direction() const = 0;
+ virtual void setDirection(Direction) = 0;
};
} // namespace blink
« no previous file with comments | « Source/core/core.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698