Tweak HWCAP_... names to avoid clash with hwcap.h
These HWCAP_... values are defined in hwcap.h, but we don't get them from there because some platforms have older hwcap.h that don't have these bits named yet. Even though we don't directly include hwcap.h, it seems it can get itself included somehow on some platforms. That leads to a name clash with the HWCAP_... #defines in there. To avoid it, rename them. Change-Id: I70788b5e4072c307c6eee55d6f197c3b9a49f5dc Reviewed-on: https://skia-review.googlesource.com/24408 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
f828c1df2f
commit
04d488cf13
@ -78,11 +78,11 @@
|
||||
#include <sys/auxv.h>
|
||||
|
||||
static uint32_t read_cpu_features() {
|
||||
const uint32_t HWCAP_CRC32 = (1<<7);
|
||||
const uint32_t kHWCAP_CRC32 = (1<<7);
|
||||
|
||||
uint32_t features = 0;
|
||||
uint32_t hwcaps = getauxval(AT_HWCAP);
|
||||
if (hwcaps & HWCAP_CRC32) { features |= SkCpu::CRC32; }
|
||||
if (hwcaps & kHWCAP_CRC32) { features |= SkCpu::CRC32; }
|
||||
return features;
|
||||
}
|
||||
|
||||
@ -91,11 +91,11 @@
|
||||
#include <sys/auxv.h>
|
||||
|
||||
static uint32_t read_cpu_features() {
|
||||
const uint32_t HWCAP_VFPv4 = (1<<16);
|
||||
const uint32_t kHWCAP_VFPv4 = (1<<16);
|
||||
|
||||
uint32_t features = 0;
|
||||
uint32_t hwcaps = getauxval(AT_HWCAP);
|
||||
if (hwcaps & HWCAP_VFPv4) { features |= SkCpu::NEON|SkCpu::NEON_FMA|SkCpu::VFP_FP16; }
|
||||
if (hwcaps & kHWCAP_VFPv4) { features |= SkCpu::NEON|SkCpu::NEON_FMA|SkCpu::VFP_FP16; }
|
||||
return features;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user