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

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

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 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 SkFloatBits_DEFINED 10 #ifndef SkFloatBits_DEFINED
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 /** Return the ceiling of the float as an int. 121 /** Return the ceiling of the float as an int.
122 If the value is out of range, or NaN, return +/- SK_MaxS32 122 If the value is out of range, or NaN, return +/- SK_MaxS32
123 */ 123 */
124 static inline int32_t SkFloatToIntCeil(float x) { 124 static inline int32_t SkFloatToIntCeil(float x) {
125 return SkFloatBits_toIntCeil(SkFloat2Bits(x)); 125 return SkFloatBits_toIntCeil(SkFloat2Bits(x));
126 } 126 }
127 127
128 // Scalar wrappers for float-bit routines 128 // Scalar wrappers for float-bit routines
129 129
130 #ifdef SK_SCALAR_IS_FLOAT 130 #define SkScalarAs2sCompliment(x) SkFloatAs2sCompliment(x)
131 #define SkScalarAs2sCompliment(x) SkFloatAs2sCompliment(x) 131 #define Sk2sComplimentAsScalar(x) Sk2sComplimentAsFloat(x)
132 #define Sk2sComplimentAsScalar(x) Sk2sComplimentAsFloat(x)
133 #else
134 #define SkScalarAs2sCompliment(x) (x)
135 #define Sk2sComplimentAsScalar(x) (x)
136 #endif
137 132
138 #endif 133 #endif
OLDNEW
« no previous file with comments | « include/core/SkFixed.h ('k') | include/core/SkMatrix.h » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698