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

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

Issue 2696293002: Adds in-out easing type. (Closed)
Patch Set: MakeUnique, default value, comments 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
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..e4ae5c6be315e84aa7de306a21c8e059c2a6c5a2 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,
};
// Abstract base class for custom interpolators, mapping linear input between
@@ -78,6 +79,18 @@ class EaseOut : public Easing {
DISALLOW_COPY_AND_ASSIGN(EaseOut);
};
+// Starts with EaseIn and finishes with EaseOut.
+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/resources/vr_shell/vr_shell_ui_api.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698