Avoid runtime initialization of FLT_EPSILON_SQRT

FLT_EPSILON_SQRT is initialized with a call to sqrt which, in release
builds on Windows, results in an initializer call (on official release
builds this is optimized away). On Windows release (all flavors)
builds this also triggers duplicate instantiations of the variable
(always a risk with non-integral const variables defined in header
files) with 32 copies ending up in both chrome.dll and chrome_child.dll.

This change avoids the run-time initializer and as a side effect it
also avoids most or all of the duplication. Section size savings in a
Windows 32-bit release official build are:

chrome.dll
     .text:   -64 bytes change
    .rdata:   -16 bytes change
     .data:  -256 bytes change
    .reloc:  -116 bytes change
Total change:  -452 bytes

chrome_child.dll
     .text:   160 bytes change
    .rdata:  -144 bytes change
     .data:  -256 bytes change
    .reloc:   -60 bytes change
Total change:  -300 bytes

A more complete fix would include using extern const to declare these
constants in the header file but define them once in a .cc file, but
it's not clear that this is necessary.

The size savings on non-official builds are greater. The increase in
the .text segment is odd, but harmless since those bytes are shared.

BUG=630755

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5061

Change-Id: I53d0cdc38e022039646df491d824a1aaf11def80
Reviewed-on: https://skia-review.googlesource.com/5061
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
1 file changed