aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-02 15:03:56 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-02 15:03:56 +0000
commit6f2d4d4679f5f0e1a1b5c2e940f1b65e34d94649 (patch)
tree01a1dc4727b155ff3eb83579f9d4bbc6809b2e67 /gyp
parentd0a502968c3fc7f03afbe07211e36d3eeaa83694 (diff)
ARM Skia NEON patches - 35 - First AArch64 support
Aarch64 support This change contains the necessary modifications to have Skia build and run properly on an ARMv8 processor in aarch64 execution state. Here's a list of the changes: - add an arm64 target to the build system + SK_CPU_ARM64 flag - MatrixTest was failing when built in Release mode. Fused MAC instructions were generated which made some intermediate results more accurate. As the test relies on result comparison, the more precise results when compared to others led to a gap bigger than what was tolerated. As I don't know if some actual skia code relies on results being comparable, I've disabled fused MAC instruction with -ffp-contract=off for arm64. - Modify include/core/SkOnce.h to have barriers work. - SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS. - use existing Xfermode optimisations with modifications that can be removed in the future when toolchains are ready. Also save a few instructions is two Xfermodes (will apply to ARM too). - use existing SkBoxBlur and SkMorphology optimisations. - use existing SkBlitMask optimisations - use existing BitmapProcState and Convolution optimisations. Future changes will include: - Blitters (only partialy merged upstream) - SkUtils (there's little value in sending asm optimisations without having them benchmarked on real hardware). Signed-off-by: Kevin PETIT <kevin.petit@arm.com> BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=13980 R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com Author: kevin.petit@arm.com Review URL: https://codereview.chromium.org/143423004 git-svn-id: http://skia.googlecode.com/svn/trunk@14025 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common_conditions.gypi6
-rw-r--r--gyp/common_variables.gypi4
-rw-r--r--gyp/opts.gyp17
3 files changed, 26 insertions, 1 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 70effa1723..925e6e1ed7 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -8,6 +8,12 @@
'SK_FORCE_DISTANCEFIELD_FONTS=<(skia_force_distancefield_fonts)',
],
'conditions' : [
+ [ 'skia_arch_type == "arm64"', {
+ 'cflags': [
+ '-ffp-contract=off',
+ ],
+ }],
+
[ 'skia_os == "win"',
{
'defines': [
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index 6145d47e01..2add2ee735 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -47,12 +47,14 @@
'skia_os%': '<(OS)',
'skia_android_framework%': 0,
+ 'skia_arch_type%': 'x86',
},
# Re-define all variables defined within the level-3 'variables' dict,
# so that siblings of the level-2 'variables' dict can see them.
# (skia_os will depend on skia_android_framework.)
'skia_android_framework%': '<(skia_android_framework)',
+ 'skia_arch_type%': '<(skia_arch_type)',
'conditions': [
[ 'skia_android_framework == 1', {
@@ -72,7 +74,7 @@
}, {
'skia_poppler_enabled%': 0,
}],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "mac"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "mac"] or skia_arch_type == "arm64"', {
'skia_arch_width%': 64,
}, {
'skia_arch_width%': 32,
diff --git a/gyp/opts.gyp b/gyp/opts.gyp
index 2fd0e95809..783ea4eb7a 100644
--- a/gyp/opts.gyp
+++ b/gyp/opts.gyp
@@ -122,6 +122,23 @@
'-mno-apcs-frame',
]
}],
+ [ 'skia_arch_type == "arm64"', {
+ 'sources': [
+ '../src/opts/SkBitmapProcState_arm_neon.cpp',
+ '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
+ '../src/opts/SkBitmapProcState_opts_arm.cpp',
+ '../src/opts/SkBlitMask_opts_arm.cpp',
+ '../src/opts/SkBlitMask_opts_arm_neon.cpp',
+ '../src/opts/SkBlitRow_opts_none.cpp',
+ '../src/opts/SkBlurImage_opts_arm.cpp',
+ '../src/opts/SkBlurImage_opts_neon.cpp',
+ '../src/opts/SkMorphology_opts_arm.cpp',
+ '../src/opts/SkMorphology_opts_neon.cpp',
+ '../src/opts/SkUtils_opts_none.cpp',
+ '../src/opts/SkXfermode_opts_arm.cpp',
+ '../src/opts/SkXfermode_opts_arm_neon.cpp',
+ ],
+ }],
],
},
# For the same lame reasons as what is done for skia_opts, we have to