Home | History | Annotate | Download | only in core

Lines Matching defs:SkFixed

15 /** \file SkFixed.h
22 typedef int32_t SkFixed;
35 #define SkFloatToFixed(x) ((SkFixed)((x) * SK_Fixed1))
38 static inline SkFixed SkFloatToFixed(float x) {
40 return (SkFixed)n;
45 static inline SkFixed SkFloatToFixed_Check(float x) {
47 SkFixed n32 = (SkFixed)n64;
56 #define SkDoubleToFixed(x) ((SkFixed)((x) * SK_Fixed1))
68 /** Converts an integer to a SkFixed, asserting that the result does not overflow
72 inline SkFixed SkIntToFixed(int n)
78 // force the cast to SkFixed to ensure that the answer is signed (like the debug version)
79 #define SkIntToFixed(n) (SkFixed)((n) << 16)
82 /** Converts a SkFixed to a SkFract, asserting that the result does not overflow
86 inline SkFract SkFixedToFract(SkFixed x)
95 /** Returns the signed fraction of a SkFixed
97 inline SkFixed SkFixedFraction(SkFixed x)
99 SkFixed mask = x >> 31 << 16;
103 /** Converts a SkFract to a SkFixed
123 SkFixed SkFixedMul_portable(SkFixed, SkFixed);
125 inline SkFixed SkFixedSquare_portable(SkFixed value)
130 SkFixed result = ah * a + al * ah + (al * al >> 16);
138 SkFixed SkFixedDivInt(int32_t numer, int32_t denom);
139 SkFixed SkFixedMod(SkFixed numer, SkFixed denom);
141 SkFixed SkFixedFastInvert(SkFixed n);
143 SkFixed SkFixedMean(SkFixed a, SkFixed b); //*< returns sqrt(x*y)
144 int SkFixedMulCommon(SkFixed, int , int bias); // internal used by SkFixedMulFloor, SkFixedMulCeil, SkFixedMulRound
149 SkFixed SkFixedSinCos(SkFixed radians, SkFixed* cosValueOrNull);
151 inline SkFixed SkFixedCos(SkFixed radians)
153 SkFixed cosValue;
157 SkFixed SkFixedTan(SkFixed radians);
158 SkFixed SkFixedASin(SkFixed);
159 SkFixed SkFixedACos(SkFixed);
160 SkFixed SkFixedATan2(SkFixed y, SkFixed x);
161 SkFixed SkFixedExp(SkFixed);
162 SkFixed SkFixedLog(SkFixed);
166 inline bool SkFixedNearlyZero(SkFixed x, SkFixed tolerance = SK_FixedNearlyZero)
176 inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b)
178 return (SkFixed)((SkLONGLONG)a * b >> 16);
184 inline SkFixed SkFixedSquare_longlong(SkFixed value)
186 return (SkFixed)((SkLONGLONG)value * value >> 16);
197 inline SkFixed SkFloatToFixed_arm(float x)
214 inline SkFixed SkFixedMul_arm(SkFixed x, SkFixed y)
226 inline SkFixed SkFixedMulAdd_arm(SkFixed x, SkFixed y, SkFixed a)
238 inline SkFixed SkFractMul_arm(SkFixed x, SkFixed y)
282 #define SkFixed48ToFixed(x) ((SkFixed)((x) >> 32))