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

Side by Side Diff: ui/gfx/animation/tween.cc

Issue 2152823004: [Material][Mac] Animation for Omnibox Verbose State Chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning up Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/animation/tween.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/animation/tween.h" 5 #include "ui/gfx/animation/tween.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 case EASE_OUT: 52 case EASE_OUT:
53 return 1.0 - pow(1.0 - state, 2); 53 return 1.0 - pow(1.0 - state, 2);
54 54
55 case SMOOTH_IN_OUT: 55 case SMOOTH_IN_OUT:
56 return sin(state); 56 return sin(state);
57 57
58 case FAST_OUT_SLOW_IN: 58 case FAST_OUT_SLOW_IN:
59 return gfx::CubicBezier(0.4, 0, 0.2, 1).Solve(state); 59 return gfx::CubicBezier(0.4, 0, 0.2, 1).Solve(state);
60 60
61 case FAST_OUT_SLOW_IN_EXPO:
62 return gfx::CubicBezier(0, 0.8, 0.2, 1).Solve(state);
63
61 case LINEAR_OUT_SLOW_IN: 64 case LINEAR_OUT_SLOW_IN:
62 return gfx::CubicBezier(0, 0, .2, 1).Solve(state); 65 return gfx::CubicBezier(0, 0, .2, 1).Solve(state);
63 66
64 case FAST_OUT_LINEAR_IN: 67 case FAST_OUT_LINEAR_IN:
65 return gfx::CubicBezier(0.4, 0, 1, 1).Solve(state); 68 return gfx::CubicBezier(0.4, 0, 1, 1).Solve(state);
66 69
67 case ZERO: 70 case ZERO:
68 return 0; 71 return 0;
69 } 72 }
70 73
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (value <= 0.0) 194 if (value <= 0.0)
192 return start_transform; 195 return start_transform;
193 196
194 gfx::Transform to_return = end_transform; 197 gfx::Transform to_return = end_transform;
195 to_return.Blend(start_transform, value); 198 to_return.Blend(start_transform, value);
196 199
197 return to_return; 200 return to_return;
198 } 201 }
199 202
200 } // namespace gfx 203 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/animation/tween.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698