Home
last modified time | relevance | path

Searched refs:SkFixed15 (Results 1 – 4 of 4) sorted by relevance

/external/skqp/src/core/
DSkFixed15.h17 class SkFixed15 {
19 SkFixed15() = default;
21 SkFixed15(float val) : fVal(val * 32768) { SkASSERT(0.0f <= val && val <= 1.0f); } in SkFixed15() function
24 static SkFixed15 Load(uint16_t val) { in Load()
30 static SkFixed15 FromU8(uint8_t val) { in FromU8()
41 SkFixed15 operator +(SkFixed15 o) const { return fVal + o.fVal; }
42 SkFixed15 operator -(SkFixed15 o) const { return fVal - o.fVal; }
43 SkFixed15 operator *(SkFixed15 o) const { return (fVal * o.fVal + (1<<14)) >> 15; }
44 SkFixed15 operator<<(int bits) const { return fVal << bits; }
45 SkFixed15 operator>>(int bits) const { return fVal >> bits; }
[all …]
/external/skia/src/core/
DSkFixed15.h17 class SkFixed15 {
19 SkFixed15() = default;
21 SkFixed15(float val) : fVal(val * 32768) { SkASSERT(0.0f <= val && val <= 1.0f); } in SkFixed15() function
24 static SkFixed15 Load(uint16_t val) { in Load()
30 static SkFixed15 FromU8(uint8_t val) { in FromU8()
41 SkFixed15 operator +(SkFixed15 o) const { return fVal + o.fVal; }
42 SkFixed15 operator -(SkFixed15 o) const { return fVal - o.fVal; }
43 SkFixed15 operator *(SkFixed15 o) const { return (fVal * o.fVal + (1<<14)) >> 15; }
44 SkFixed15 operator<<(int bits) const { return fVal << bits; }
45 SkFixed15 operator>>(int bits) const { return fVal >> bits; }
[all …]
/external/skqp/tests/
DSkFixed15Test.cpp11 DEF_TEST(SkFixed15, r) { in DEF_TEST() argument
14 auto v = SkFixed15::Load(bits); in DEF_TEST()
20 SkFixed15 v = 1.0f; in DEF_TEST()
27 REPORTER_ASSERT(r, SkFixed15::FromU8(x) == SkFixed15(x * (1/255.0f))); in DEF_TEST()
32 REPORTER_ASSERT(r, x == SkFixed15::FromU8(x).to_u8()); in DEF_TEST()
/external/skia/tests/
DSkFixed15Test.cpp11 DEF_TEST(SkFixed15, r) { in DEF_TEST() argument
14 auto v = SkFixed15::Load(bits); in DEF_TEST()
20 SkFixed15 v = 1.0f; in DEF_TEST()
27 REPORTER_ASSERT(r, SkFixed15::FromU8(x) == SkFixed15(x * (1/255.0f))); in DEF_TEST()
32 REPORTER_ASSERT(r, x == SkFixed15::FromU8(x).to_u8()); in DEF_TEST()