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

Unified Diff: Source/core/animation/CompositorAnimations.h

Issue 220503002: Revert "Handle direction control in compositor Animations" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | Source/core/animation/CompositorAnimations.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/CompositorAnimations.h
diff --git a/Source/core/animation/CompositorAnimations.h b/Source/core/animation/CompositorAnimations.h
index 1d2a66406151bd970b95eab30e3629d9c5ba89fc..05aa23f36128b4046be798571924f89d622b1abb 100644
--- a/Source/core/animation/CompositorAnimations.h
+++ b/Source/core/animation/CompositorAnimations.h
@@ -40,6 +40,18 @@ namespace WebCore {
class Element;
+// Given an input timing function between keyframe at 0 and keyframe at 1.0, we
+// need a timing function such that the behavior with the keyframes swapped is
+// equivalent to reversing time with the input timing function and keyframes.
+// This means flipping the timing function about x=0.5 and about y=0.5.
+// FIXME: Remove once the Compositor natively understands reversing time.
+class CompositorAnimationsTimingFunctionReverser {
+public:
+ static PassRefPtr<TimingFunction> reverse(const LinearTimingFunction* timefunc);
+ static PassRefPtr<TimingFunction> reverse(const CubicBezierTimingFunction* timefunc);
+ static PassRefPtr<TimingFunction> reverse(const TimingFunction* timefunc);
+};
+
class CompositorAnimations {
public:
static CompositorAnimations* instance() { return instance(0); }
« no previous file with comments | « no previous file | Source/core/animation/CompositorAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698