diff options
author | mtklein <mtklein@google.com> | 2016-07-14 12:03:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-14 12:03:04 -0700 |
commit | 64bbad360f30930befafee1bdefe4ad89f130dac (patch) | |
tree | 5e97d31dc9a0075de95cc2389427cb9138df466b /src/core/SkMipMap.cpp | |
parent | 3296bee70d074bb8094b3229dbe12fa016657e90 (diff) |
Revert of Expand _01 half<->float limitation to _finite. Simplify. (patchset #7 id:120001 of https://codereview.chromium.org/2145663003/ )
Reason for revert:
Unit tests fail on Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast
Original issue's description:
> 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
TBR=msarett@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2151023003
Diffstat (limited to 'src/core/SkMipMap.cpp')
-rw-r--r-- | src/core/SkMipMap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp index 4811c9e073..f469762eba 100644 --- a/src/core/SkMipMap.cpp +++ b/src/core/SkMipMap.cpp @@ -85,10 +85,10 @@ struct ColorTypeFilter_8 { struct ColorTypeFilter_F16 { typedef uint64_t Type; // SkHalf x4 static Sk4f Expand(uint64_t x) { - return SkHalfToFloat_finite(x); + return SkHalfToFloat_01(x); } static uint64_t Compact(const Sk4f& x) { - return SkFloatToHalf_finite(x); + return SkFloatToHalf_01(x); } }; |