aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLinearBitmapPipeline_sample.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-15 07:00:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-15 07:00:11 -0700
commit58e389b0518b46bbe58ba01c23443cf23c18435c (patch)
tree51f6d91fa6a116666c9c318897211cbc7ca0395b /src/core/SkLinearBitmapPipeline_sample.h
parent428036621e1667b504051872869ac38cf6fac9c8 (diff)
Expand _01 half<->float limitation to _finite. Simplify.
It's become clear we need to sometimes deal with values <0 or >1. I'm not yet convinced we care about NaN or +-inf. We had some fairly clever tricks and optimizations here for NEON and SSE. I've thrown them out in favor of a single implementation. If we find the specializations mattered, we can certainly figure out how to extend them to this new range/domain. This happens to add a vectorized float -> half for ARMv7, which was missing from the _01 version. (The SSE strategy was not portable to platforms that flush denorm floats to zero.) I've tested the full float range for FloatToHalf on my desktop and a 5x. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145663003 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot Committed: https://skia.googlesource.com/skia/+/3296bee70d074bb8094b3229dbe12fa016657e90 Review-Url: https://codereview.chromium.org/2145663003
Diffstat (limited to 'src/core/SkLinearBitmapPipeline_sample.h')
-rw-r--r--src/core/SkLinearBitmapPipeline_sample.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkLinearBitmapPipeline_sample.h b/src/core/SkLinearBitmapPipeline_sample.h
index 39400f6750..e957ae7e4d 100644
--- a/src/core/SkLinearBitmapPipeline_sample.h
+++ b/src/core/SkLinearBitmapPipeline_sample.h
@@ -198,7 +198,7 @@ public:
PixelConverter(const SkPixmap& srcPixmap) { }
Sk4f toSk4f(const Element pixel) const {
- return SkHalfToFloat_01(pixel);
+ return SkHalfToFloat_finite(pixel);
}
};