Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: src/core/SkMathPriv.h

Issue 1203533003: Clarify iOS flush-to-zero status. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use 'defined' for consistency. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkFloatBits.cpp ('k') | src/core/SkPoint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMathPriv.h
diff --git a/src/core/SkMathPriv.h b/src/core/SkMathPriv.h
index e997045ea85318db4fe32b2643fc251dd83f4914..345815354cc68a887bc1ab76c5c543c90628a1b5 100644
--- a/src/core/SkMathPriv.h
+++ b/src/core/SkMathPriv.h
@@ -10,10 +10,14 @@
#include "SkMath.h"
-#ifdef SK_BUILD_FOR_IOS
-// The iOS ARM processor discards small denormalized numbers to go faster.
+#if defined(SK_BUILD_FOR_IOS) && (defined(SK_BUILD_FOR_ARM32) || defined(SK_BUILD_FOR_ARM64))
+// iOS on ARM starts processes with the Flush-To-Zero (FTZ) and
+// Denormals-Are-Zero (DAZ) bits in the fpscr register set.
// Algorithms that rely on denormalized numbers need alternative implementations.
-#define SK_DISCARD_DENORMALIZED_FOR_SPEED
+// This can also be controlled in SSE with the MXCSR register,
+// x87 with FSTCW/FLDCW, and mips with FCSR. This should be detected at runtime,
+// or the library built one way or the other more generally (by the build).
+#define SK_CPU_FLUSH_TO_ZERO
#endif
/** Returns -1 if n < 0, else returns 0
« no previous file with comments | « src/core/SkFloatBits.cpp ('k') | src/core/SkPoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698