Go to the source code of this file.
◆ SK_FDot6Half
#define SK_FDot6Half (32) |
◆ SK_FDot6One
◆ SkFDot6Ceil
#define SkFDot6Ceil |
( |
|
x | ) |
(((x) + 63) >> 6) |
◆ SkFDot6Floor
#define SkFDot6Floor |
( |
|
x | ) |
((x) >> 6) |
◆ SkFDot6Round
#define SkFDot6Round |
( |
|
x | ) |
(((x) + 32) >> 6) |
◆ SkFDot6ToFloat
◆ SkFDot6ToScalar
#define SkFDot6ToScalar |
( |
|
x | ) |
((SkScalar)(x) * 0.015625f) |
◆ SkFixedToFDot6
#define SkFixedToFDot6 |
( |
|
x | ) |
((x) >> 10) |
◆ SkIntToFDot6
#define SkIntToFDot6 |
( |
|
x | ) |
((x) << 6) |
◆ SkScalarToFDot6
#define SkScalarToFDot6 |
( |
|
x | ) |
(SkFDot6)((x) * 64) |
◆ SkFDot6
◆ SkFDot6Div()
Definition at line 68 of file SkFDot6.h.
68 {
70
71 if (SkTFitsIn<int16_t>(
a)) {
73 } else {
75 }
76}
#define SkFixedDiv(numer, denom)
static constexpr int32_t SkLeftShift(int32_t value, int32_t shift)
◆ SkFDot6ToFixed()
◆ SkScalarRoundToFDot6()
Definition at line 23 of file SkFDot6.h.
24{
25 union {
26 double fDouble;
27 int32_t fBits[2];
28 } tmp;
29 int fractionalBits = 6 + shift;
30 double magic = (1LL << (52 - (fractionalBits))) * 1.5;
31
33#ifdef SK_CPU_BENDIAN
34 return tmp.fBits[1];
35#else
36 return tmp.fBits[0];
37#endif
38}
#define SkScalarToDouble(x)