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

Side by Side Diff: include/utils/SkInterpolator.h

Issue 1548223002: remove cruft from SkTypes.h, including SkBool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « include/core/SkTypes.h ('k') | src/animator/SkDisplayType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkInterpolator_DEFINED 10 #ifndef SkInterpolator_DEFINED
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void setRepeatCount(SkScalar repeatCount) { fRepeat = repeatCount; } 52 void setRepeatCount(SkScalar repeatCount) { fRepeat = repeatCount; }
53 53
54 /** Set the whether the repeat is mirrored. 54 /** Set the whether the repeat is mirrored.
55 @param reset If true, the odd repeats interpolate from the last key 55 @param reset If true, the odd repeats interpolate from the last key
56 frame and the first. 56 frame and the first.
57 */ 57 */
58 void setReset(bool reset) { 58 void setReset(bool reset) {
59 fFlags = SkToU8((fFlags & ~kReset) | (int)reset); 59 fFlags = SkToU8((fFlags & ~kReset) | (int)reset);
60 } 60 }
61 61
62 Result timeToT(SkMSec time, SkScalar* T, int* index, SkBool* exact) const; 62 Result timeToT(SkMSec time, SkScalar* T, int* index, bool* exact) const;
63 63
64 protected: 64 protected:
65 enum Flags { 65 enum Flags {
66 kMirror = 1, 66 kMirror = 1,
67 kReset = 2, 67 kReset = 2,
68 kHasBlend = 4 68 kHasBlend = 4
69 }; 69 };
70 static SkScalar ComputeRelativeT(SkMSec time, SkMSec prevTime, 70 static SkScalar ComputeRelativeT(SkMSec time, SkMSec prevTime,
71 SkMSec nextTime, const SkScalar blend[4] = NULL); 71 SkMSec nextTime, const SkScalar blend[4] = NULL);
72 int16_t fFrameCount; 72 int16_t fFrameCount;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 typedef SkInterpolatorBase INHERITED; 121 typedef SkInterpolatorBase INHERITED;
122 }; 122 };
123 123
124 /** Given all the parameters are [0...1], apply the cubic specified by (0,0) 124 /** Given all the parameters are [0...1], apply the cubic specified by (0,0)
125 (bx,by) (cx,cy) (1,1) to value, returning the answer, also [0...1]. 125 (bx,by) (cx,cy) (1,1) to value, returning the answer, also [0...1].
126 */ 126 */
127 SkScalar SkUnitCubicInterp(SkScalar value, SkScalar bx, SkScalar by, 127 SkScalar SkUnitCubicInterp(SkScalar value, SkScalar bx, SkScalar by,
128 SkScalar cx, SkScalar cy); 128 SkScalar cx, SkScalar cy);
129 129
130 #endif 130 #endif
OLDNEW
« no previous file with comments | « include/core/SkTypes.h ('k') | src/animator/SkDisplayType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698