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

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

Issue 51943004: Creating a helper class for reversing timing functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing "control reaches end of non-void function" issues. Created 7 years, 1 month 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 d95196d3a9acc5c26ba155f92282d22097cd5fc1..c80528c9a5702e331d3c6e0b020aac5f15a2599e 100644
--- a/Source/core/animation/CompositorAnimations.h
+++ b/Source/core/animation/CompositorAnimations.h
@@ -39,6 +39,19 @@ namespace WebCore {
class Element;
class AnimationEffect;
+// 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 ChainedTimingFunction* timefunc);
+ static PassRefPtr<TimingFunction> reverse(const TimingFunction* timefunc);
+};
+
class CompositorAnimations {
public:
« 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