revert 8897 -- broke clang build

git-svn-id: http://skia.googlecode.com/svn/trunk@8898 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-04-29 14:31:29 +00:00
parent c267b4bfc9
commit 44d37d9d72

View File

@ -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);
#ifndef SkCLZ
#if defined(_MSC_VER) && _MSC_VER >= 1400
#include <intrin.h>
#if defined(SK_CPU_ARM)
#define SkCLZ(x) __builtin_clz(x)
#endif
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
#ifndef SkCLZ
#define SkCLZ(x) SkCLZ_portable(x)
#endif
/**