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

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

Issue 16105005: Cleanup legacy flags and switches (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/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/base/animation/tween.h" 5 #include "ui/base/animation/tween.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <float.h> 10 #include <float.h>
(...skipping 26 matching lines...) Expand all
37 case LINEAR: 37 case LINEAR:
38 return state; 38 return state;
39 39
40 case EASE_OUT_SNAP: 40 case EASE_OUT_SNAP:
41 state = 0.95 * (1.0 - pow(1.0 - state, 2)); 41 state = 0.95 * (1.0 - pow(1.0 - state, 2));
42 return state; 42 return state;
43 43
44 case EASE_OUT: 44 case EASE_OUT:
45 return 1.0 - pow(1.0 - state, 2); 45 return 1.0 - pow(1.0 - state, 2);
46 46
47 case EASE_OUT_2:
48 return 1.0 - pow(1.0 - state, 3);
49
50 case EASE_OUT_3:
51 return 1.0 - pow(1.0 - state, 4);
52
53 case SMOOTH_IN_OUT: 47 case SMOOTH_IN_OUT:
54 return sin(state); 48 return sin(state);
55 49
56 case ZERO: 50 case ZERO:
57 return 0; 51 return 0;
58 } 52 }
59 53
60 NOTREACHED(); 54 NOTREACHED();
61 return state; 55 return state;
62 } 56 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (value <= 0.0) 97 if (value <= 0.0)
104 return start_transform; 98 return start_transform;
105 99
106 gfx::Transform to_return = end_transform; 100 gfx::Transform to_return = end_transform;
107 to_return.Blend(start_transform, value); 101 to_return.Blend(start_transform, value);
108 102
109 return to_return; 103 return to_return;
110 } 104 }
111 105
112 } // namespace ui 106 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/animation/tween.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698