From 00e1d2773de880b96aff7e2d33b2b0914778901f Mon Sep 17 00:00:00 2001 From: "djsollen@google.com" Date: Thu, 31 Jul 2014 22:05:35 +0000 Subject: [PATCH] Update NEON compiler flags for Skia to use the SK_ prefix. The old defines will be left in place until the next Skia DEPS roll. After that roll Skia will be switched to using the SK_ prefixed defines and the old reserved (i.e. __ARM*) defines can be removed. BUG=skia:2785 Review URL: https://codereview.chromium.org/430253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286901 0039d316-1c4b-4281-b951-d872f2087c98 --- skia/BUILD.gn | 4 ++-- skia/skia_common.gypi | 2 ++ skia/skia_library_opts.gyp | 22 ---------------------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/skia/BUILD.gn b/skia/BUILD.gn index 162a0531caa9..67862921a65c 100644 --- a/skia/BUILD.gn +++ b/skia/BUILD.gn @@ -182,10 +182,10 @@ config("skia_library_config") { if (cpu_arch == "arm") { if (arm_use_neon) { - defines += [ "__ARM_HAVE_NEON" ] + defines += [ "SK_ARM_HAS_NEON", "__ARM_HAVE_NEON" ] } if (arm_optionally_use_neon) { - defines += [ "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ] + defines += [ "SK_ARM_HAS_OPTIONAL_NEON", "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ] } } diff --git a/skia/skia_common.gypi b/skia/skia_common.gypi index 46d073697fab..23da0a9cc114 100644 --- a/skia/skia_common.gypi +++ b/skia/skia_common.gypi @@ -111,11 +111,13 @@ # Neon support. [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', { 'defines': [ + 'SK_ARM_HAS_NEON', '__ARM_HAVE_NEON', ], }], [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', { 'defines': [ + 'SK_ARM_HAS_OPTIONAL_NEON', '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', ], }], diff --git a/skia/skia_library_opts.gyp b/skia/skia_library_opts.gyp index 37f5eb44addf..1536ee7cd39a 100644 --- a/skia/skia_library_opts.gyp +++ b/skia/skia_library_opts.gyp @@ -65,16 +65,6 @@ }], [ 'target_arch == "arm"', { 'conditions': [ - [ 'arm_version >= 7 and arm_neon == 1', { - 'defines': [ - '__ARM_HAVE_NEON', - ], - }], - [ 'arm_version >= 7 and arm_neon_optional == 1', { - 'defines': [ - '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', - ], - }], [ 'arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', { 'cflags': [ # The neon assembly contains conditional instructions which @@ -332,18 +322,6 @@ '../third_party/skia/src/opts/memset16_neon.S', '../third_party/skia/src/opts/memset32_neon.S', ], - 'conditions': [ - ['arm_neon == 1', { - 'defines': [ - '__ARM_HAVE_NEON', - ], - }], - ['arm_neon_optional == 1', { - 'defines': [ - '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', - ], - }], - ], }, ], }],