diff options
author | Yuqian Li <liyuqian@google.com> | 2017-12-14 13:45:08 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-20 19:46:26 +0000 |
commit | 915817b940b05882d85c220d2b2dc18ef184a6b4 (patch) | |
tree | 179abe73c2f9498080f5cda0d268817a5a13218a /src/views/SkEvent.cpp | |
parent | e7a58321bbbe094ca0f9b03e25843f7666d5c198 (diff) |
Guard the sqrt(temp) where temp < 0 in 2pt conical gradient
Although Linux and Android will return NAN, iOS and some some Win10
devices would return undefined values.
This relands 82161 (with the fix mentioned above). The speedup is
a little less due to the additional temp < 0 check.
4.08% faster in gradient_conicalOutZero_clamp
6.83% faster in gradient_conical_clamp_shallow_dither
9.43% faster in gradient_conicalOutZero_clamp_3color
12.66% faster in gradient_conicalOut_clamp_hicolor
16.67% faster in gradient_conicalOut_clamp_3color
17.83% faster in gradient_conicalOut_clamp
and the speedup is further reduced because we break up the if with
two conditions into two ifs with single condition:
7.32% faster in gradient_conical_clamp_shallow_dither
8.00% faster in gradient_conicalOut_clamp_hicolor
8.57% faster in gradient_conicalOut_clamp
8.73% faster in gradient_conicalOut_clamp_3color
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android,Test-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-CommandBuffer
Change-Id: I41fb8d97e31c577b52a200f0b883591c9bdc4d1c
Reviewed-on: https://skia-review.googlesource.com/84963
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/views/SkEvent.cpp')
0 files changed, 0 insertions, 0 deletions