diff options
| author | Mike Klein <mtklein@chromium.org> | 2016-12-02 15:21:03 -0500 |
|---|---|---|
| committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-05 15:22:37 +0000 |
| commit | e2e2ae23751d5a81f9cc9db8df2f5064108248aa (patch) | |
| tree | 7b7906626977bb179d291579cdf0a2e7eec83aa2 /samplecode/SampleCode.cpp | |
| parent | 55360b11c7da3b19e0c5ae1aa5a7a457cb5e373a (diff) | |
Manual byte -> float conversion.
This is a follow-up to reviews.skia.org/5540, which did float -> byte.
We use the same trick here exploiting 32768.0f / 0x47000000.
The benefit here is smaller than the other CL, but still measurable.
The exchange here is:
before: int->float, multiply
after: OR, FMA
The cost of an FMA is the same as a multiply, so we're basically just replacing int->float conversion with a bitwise OR.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: Ieac2247664afa3ff415aec2b48c21505905bee23
Reviewed-on: https://skia-review.googlesource.com/5542
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'samplecode/SampleCode.cpp')
0 files changed, 0 insertions, 0 deletions
