diff options
author | msarett <msarett@google.com> | 2016-09-16 09:51:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-16 09:51:12 -0700 |
commit | 43d6651111374b5d1e4ddd9030dcf079b448ec47 (patch) | |
tree | cd015928e14895e720154f156aab1e14d3536787 /src/core/SkPM4fPriv.h | |
parent | a8370b2c56e42b9e29b4cfbda95d14fdfba7f15e (diff) |
Support Float32 output from SkColorSpaceXform
* Adds Float32 support to SkColorSpaceXform
* Changes API to allows clients to ask for F32, updates clients to
new API
* Adds Sk4f_load4 and Sk4f_store4 to SkNx
* Make use of new xform in SkGr.cpp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2339233003
Diffstat (limited to 'src/core/SkPM4fPriv.h')
-rw-r--r-- | src/core/SkPM4fPriv.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/core/SkPM4fPriv.h b/src/core/SkPM4fPriv.h index 89a0caeb70..f2d2557d3a 100644 --- a/src/core/SkPM4fPriv.h +++ b/src/core/SkPM4fPriv.h @@ -55,20 +55,4 @@ static inline Sk4f Sk4f_from_SkColor(SkColor color) { return swizzle_rb(Sk4f_fromS32(color)); } -static inline void assert_unit(float x) { - SkASSERT(0 <= x && x <= 1); -} - -static inline float exact_srgb_to_linear(float srgb) { - assert_unit(srgb); - float linear; - if (srgb <= 0.04045) { - linear = srgb / 12.92f; - } else { - linear = powf((srgb + 0.055f) / 1.055f, 2.4f); - } - assert_unit(linear); - return linear; -} - #endif |