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

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

Issue 2947843005: Update voice interaction animation (Closed)
Patch Set: 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 unified diff | Download patch
« ui/gfx/animation/tween.h ('K') | « 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 LINEAR_OUT_SLOW_IN: 61 case LINEAR_OUT_SLOW_IN:
62 return gfx::CubicBezier(0, 0, .2, 1).Solve(state); 62 return gfx::CubicBezier(0, 0, .2, 1).Solve(state);
63 63
64 case SLOW_OUT_LINEAR_IN:
65 return gfx::CubicBezier(0, 0, 1, .2).Solve(state);
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
71 NOTREACHED(); 74 NOTREACHED();
72 return state; 75 return state;
73 } 76 }
(...skipping 117 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
« ui/gfx/animation/tween.h ('K') | « ui/gfx/animation/tween.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698