aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-29 14:31:29 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-29 14:31:29 +0000
commit44d37d9d7228e7409f4feea722c26f570434b8fd (patch)
treee63b4a71e1caf6c454be9b378b8ab5cb2ad8de90 /include
parentc267b4bfc91b93c1c1b782b66ae48f857cc88b42 (diff)
revert 8897 -- broke clang build
git-svn-id: http://skia.googlecode.com/svn/trunk@8898 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkMath.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/include/core/SkMath.h b/include/core/SkMath.h
index 2da1a3a921..cee3257197 100644
--- a/include/core/SkMath.h
+++ b/include/core/SkMath.h
@@ -40,24 +40,12 @@ int32_t SkSqrtBits(int32_t value, int bitBias);
//! Returns the number of leading zero bits (0...32)
int SkCLZ_portable(uint32_t);
+#if defined(SK_CPU_ARM)
+ #define SkCLZ(x) __builtin_clz(x)
+#endif
+
#ifndef SkCLZ
- #if defined(_MSC_VER) && _MSC_VER >= 1400
- #include <intrin.h>
-
- static inline int SkCLZ(uint32_t mask) {
- if (mask) {
- DWORD index;
- _BitScanReverse(&index, mask);
- return index ^ 0x1F;
- } else {
- return 32;
- }
- }
- #elif defined(SK_CPU_ARM) || defined(__GNUC__)
- #define SkCLZ(x) __builtin_clz(x)
- #else
- #define SkCLZ(x) SkCLZ_portable(x)
- #endif
+ #define SkCLZ(x) SkCLZ_portable(x)
#endif
/**