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

Side by Side Diff: include/core/SkScalar.h

Issue 1258963005: remove now-dead flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/SkImageInfo.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 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkScalar_DEFINED 8 #ifndef SkScalar_DEFINED
9 #define SkScalar_DEFINED 9 #define SkScalar_DEFINED
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 static inline SkScalar SkScalarPin(SkScalar x, SkScalar min, SkScalar max) { 177 static inline SkScalar SkScalarPin(SkScalar x, SkScalar min, SkScalar max) {
178 return SkTPin(x, min, max); 178 return SkTPin(x, min, max);
179 } 179 }
180 180
181 SkScalar SkScalarSinCos(SkScalar radians, SkScalar* cosValue); 181 SkScalar SkScalarSinCos(SkScalar radians, SkScalar* cosValue);
182 182
183 static inline SkScalar SkScalarSquare(SkScalar x) { return x * x; } 183 static inline SkScalar SkScalarSquare(SkScalar x) { return x * x; }
184 184
185 #define SkScalarMul(a, b) ((SkScalar)(a) * (b)) 185 #define SkScalarMul(a, b) ((SkScalar)(a) * (b))
186 #define SkScalarMulAdd(a, b, c) ((SkScalar)(a) * (b) + (c)) 186 #define SkScalarMulAdd(a, b, c) ((SkScalar)(a) * (b) + (c))
187 #ifdef SK_SUPPORT_LEGACY_SCALAR_DIV
188 #define SkScalarDiv(a, b) ((SkScalar)(a) / (b))
189 #endif
190 #define SkScalarMulDiv(a, b, c) ((SkScalar)(a) * (b) / (c)) 187 #define SkScalarMulDiv(a, b, c) ((SkScalar)(a) * (b) / (c))
191 #define SkScalarInvert(x) (SK_Scalar1 / (x)) 188 #define SkScalarInvert(x) (SK_Scalar1 / (x))
192 #define SkScalarFastInvert(x) (SK_Scalar1 / (x)) 189 #define SkScalarFastInvert(x) (SK_Scalar1 / (x))
193 #define SkScalarAve(a, b) (((a) + (b)) * SK_ScalarHalf) 190 #define SkScalarAve(a, b) (((a) + (b)) * SK_ScalarHalf)
194 #define SkScalarHalf(a) ((a) * SK_ScalarHalf) 191 #define SkScalarHalf(a) ((a) * SK_ScalarHalf)
195 192
196 #define SkDegreesToRadians(degrees) ((degrees) * (SK_ScalarPI / 180)) 193 #define SkDegreesToRadians(degrees) ((degrees) * (SK_ScalarPI / 180))
197 #define SkRadiansToDegrees(radians) ((radians) * (180 / SK_ScalarPI)) 194 #define SkRadiansToDegrees(radians) ((radians) * (180 / SK_ScalarPI))
198 195
199 static inline SkScalar SkMaxScalar(SkScalar a, SkScalar b) { return a > b ? a : b; } 196 static inline SkScalar SkMaxScalar(SkScalar a, SkScalar b) { return a > b ? a : b; }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 SkASSERT(n >= 0); 260 SkASSERT(n >= 0);
264 for (int i = 0; i < n; ++i) { 261 for (int i = 0; i < n; ++i) {
265 if (a[i] != b[i]) { 262 if (a[i] != b[i]) {
266 return false; 263 return false;
267 } 264 }
268 } 265 }
269 return true; 266 return true;
270 } 267 }
271 268
272 #endif 269 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698