aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkGpuBlurUtils.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-10 08:31:42 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-10 08:31:42 -0700
commit3ff2cc81a58b3fe5287980cf618147c84a6c81f6 (patch)
tree6de878cca8d7a083f4897ac8f6a47a45b577a5e3 /src/effects/SkGpuBlurUtils.h
parent6e90d42d3d5b8e51e60afbe97b27a0c16c2bacf1 (diff)
constexpr NaN,+Inf,-Inf
Reading extern values meant these couldn't be compile-time constants. math.h has INFINITY, which is macro that is supposed to expand to float +inf. On MSVC it seems it's natively a double, so we cast just to make sure. There's nan(const char*) in math.h for NaN too, but I don't trust that to be compile-time evaluated. So instead, we keep reinterpreting a bit pattern. I did try to write static constexpr float float_nan() { ... } and completely failed. constexpr seems a bit too restrictive in C++11 to make it work, but Clang kept telling me, you'll be able to do this with C++14. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233853002 Review-Url: https://codereview.chromium.org/2233853002
Diffstat (limited to 'src/effects/SkGpuBlurUtils.h')
0 files changed, 0 insertions, 0 deletions