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

Unified Diff: chrome/browser/android/vr_shell/easing.h

Issue 2696293002: Adds in-out easing type. (Closed)
Patch Set: Created 3 years, 10 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 | chrome/browser/android/vr_shell/easing.cc » ('j') | chrome/browser/android/vr_shell/easing.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/easing.h
diff --git a/chrome/browser/android/vr_shell/easing.h b/chrome/browser/android/vr_shell/easing.h
index c3a025e9a2b8f500c8b4d163f968c0fbfb62d5a4..5bb27a89eac46fbd5d9c5a055ac60299e406da45 100644
--- a/chrome/browser/android/vr_shell/easing.h
+++ b/chrome/browser/android/vr_shell/easing.h
@@ -15,7 +15,8 @@ enum EasingType {
LINEAR = 0,
CUBICBEZIER,
EASEIN,
- EASEOUT
+ EASEOUT,
+ EASEINOUT
cjgrant 2017/02/16 15:10:25 nit: Should have a comma as well. https://engdoc.c
tiborg 2017/02/16 18:39:33 Done.
};
// Abstract base class for custom interpolators, mapping linear input between
@@ -78,6 +79,18 @@ class EaseOut : public Easing {
DISALLOW_COPY_AND_ASSIGN(EaseOut);
};
+// Behaves like EaseIn for inputs smaller 0.5 and like EaseOut otherwise.
cjgrant 2017/02/16 15:10:25 s/smaller/smaller than/. But I found the comment
tiborg 2017/02/16 18:39:33 Done.
+class EaseInOut : public Easing {
+ public:
+ explicit EaseInOut(double power);
+ double CalculateValueImpl(double input) override;
+
+ private:
+ EaseIn ease_in_;
+ EaseOut ease_out_;
+ DISALLOW_COPY_AND_ASSIGN(EaseInOut);
+};
+
} // namespace easing
} // namespace vr_shell
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/easing.cc » ('j') | chrome/browser/android/vr_shell/easing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698