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

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

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations Created 3 years, 6 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 | « chrome/browser/android/vr_shell/easing.h ('k') | chrome/browser/android/vr_shell/ui_elements/button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/easing.cc
diff --git a/chrome/browser/android/vr_shell/easing.cc b/chrome/browser/android/vr_shell/easing.cc
deleted file mode 100644
index 137bcb5f66a3eff0d7686401af5b9093acf89244..0000000000000000000000000000000000000000
--- a/chrome/browser/android/vr_shell/easing.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/android/vr_shell/easing.h"
-
-#include <cmath>
-
-#include "base/logging.h"
-
-namespace vr_shell {
-namespace easing {
-
-double Easing::CalculateValue(double input) {
- DCHECK(input >= 0.0 && input <= 1.0);
- return CalculateValueImpl(input);
-}
-
-CubicBezier::CubicBezier(double p1x, double p1y, double p2x, double p2y)
- : bezier_(p1x, p1y, p2x, p2y) {}
-
-double CubicBezier::CalculateValueImpl(double state) {
- return bezier_.Solve(state);
-}
-
-EaseIn::EaseIn(double power) : power_(power) {}
-double EaseIn::CalculateValueImpl(double state) {
- return pow(state, power_);
-}
-
-EaseOut::EaseOut(double power) : power_(power) {}
-double EaseOut::CalculateValueImpl(double state) {
- return 1.0 - pow(1.0 - state, power_);
-}
-
-EaseInOut::EaseInOut(double power) : ease_in_(power) {}
-double EaseInOut::CalculateValueImpl(double state) {
- if (state < 0.5) {
- return ease_in_.CalculateValueImpl(state * 2) / 2;
- } else {
- return 1.0 - ease_in_.CalculateValueImpl((1.0 - state) * 2) / 2;
- }
-}
-
-double Linear::CalculateValueImpl(double state) {
- return state;
-}
-
-} // namespace easing
-} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/easing.h ('k') | chrome/browser/android/vr_shell/ui_elements/button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698