3ff2cc81a5
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 |
||
---|---|---|
.. | ||
GrAuditTrail.h | ||
GrInstancedPipelineInfo.h | ||
GrRenderTargetProxy.h | ||
GrSingleOwner.h | ||
GrSurfaceProxy.h | ||
GrTextureProxy.h | ||
SkAtomics.h | ||
SkChecksum.h | ||
SkFixed.h | ||
SkFloatBits.h | ||
SkFloatingPoint.h | ||
SkGpuFenceSync.h | ||
SkLeanWindows.h | ||
SkMiniRecorder.h | ||
SkMutex.h | ||
SkOnce.h | ||
SkRecords.h | ||
SkSemaphore.h | ||
SkSpinlock.h | ||
SkTArray.h | ||
SkTDArray.h | ||
SkTDict.h | ||
SkTemplates.h | ||
SkTFitsIn.h | ||
SkTHash.h | ||
SkThreadID.h | ||
SkTLogic.h | ||
SkTSearch.h | ||
SkWeakRefCnt.h |