2015-03-25 17:22:41 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2011-05-31 19:02:37 +00:00
|
|
|
# Core Skia library code.
|
2011-03-21 13:34:23 +00:00
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
2011-05-31 19:02:37 +00:00
|
|
|
'target_name': 'core',
|
2012-10-10 19:45:51 +00:00
|
|
|
'product_name': 'skia_core',
|
2011-03-21 13:34:23 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2011-03-21 13:34:23 +00:00
|
|
|
'msvs_guid': 'B7760B5E-BFA8-486B-ACFD-49E3A6DE8E76',
|
|
|
|
|
2012-08-08 20:39:17 +00:00
|
|
|
'includes': [
|
|
|
|
'core.gypi',
|
2011-03-21 13:34:23 +00:00
|
|
|
],
|
2012-08-08 20:39:17 +00:00
|
|
|
|
2011-03-21 13:34:23 +00:00
|
|
|
'include_dirs': [
|
2014-10-24 18:16:19 +00:00
|
|
|
'../include/c',
|
2011-03-21 13:34:23 +00:00
|
|
|
'../include/config',
|
|
|
|
'../include/core',
|
2013-04-25 13:34:40 +00:00
|
|
|
'../include/pathops',
|
2011-03-21 13:34:23 +00:00
|
|
|
'../include/ports',
|
2015-07-28 15:55:14 +00:00
|
|
|
'../include/private',
|
2013-01-14 18:49:19 +00:00
|
|
|
'../include/utils',
|
2014-08-18 15:27:09 +00:00
|
|
|
'../include/images',
|
2011-03-21 13:34:23 +00:00
|
|
|
'../src/core',
|
2014-06-19 18:05:39 +00:00
|
|
|
'../src/sfnt',
|
2012-08-28 12:19:02 +00:00
|
|
|
'../src/image',
|
2014-06-17 19:08:15 +00:00
|
|
|
'../src/opts',
|
|
|
|
'../src/utils',
|
2011-03-21 13:34:23 +00:00
|
|
|
],
|
2012-09-04 14:37:12 +00:00
|
|
|
'sources': [
|
|
|
|
'core.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
|
|
|
|
],
|
2011-03-21 13:34:23 +00:00
|
|
|
'msvs_disabled_warnings': [4244, 4267,4345, 4390, 4554, 4800],
|
|
|
|
'conditions': [
|
2013-06-11 15:52:19 +00:00
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
|
2011-03-21 13:34:23 +00:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
2011-03-25 17:41:34 +00:00
|
|
|
'-lpthread',
|
2011-03-21 13:34:23 +00:00
|
|
|
],
|
2011-03-21 19:51:57 +00:00
|
|
|
},
|
2011-03-21 13:34:23 +00:00
|
|
|
}],
|
2011-07-01 20:20:07 +00:00
|
|
|
[ 'skia_os == "mac"', {
|
2011-03-21 13:34:23 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/utils/mac',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'../include/utils/mac/SkCGUtils.h',
|
|
|
|
],
|
2011-06-02 19:52:14 +00:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
2011-06-21 13:09:32 +00:00
|
|
|
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
|
2011-06-02 19:52:14 +00:00
|
|
|
],
|
|
|
|
},
|
2011-03-21 13:34:23 +00:00
|
|
|
}],
|
2011-07-01 21:01:32 +00:00
|
|
|
[ 'skia_os == "ios"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/utils/ios',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'../include/utils/mac/SkCGUtils.h',
|
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
2012-10-04 12:52:03 +00:00
|
|
|
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
|
2011-07-01 21:01:32 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2011-07-01 20:20:07 +00:00
|
|
|
[ 'skia_os == "win"', {
|
2011-03-21 13:34:23 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'config/win',
|
|
|
|
],
|
2011-05-04 18:59:38 +00:00
|
|
|
}],
|
2013-06-03 12:10:19 +00:00
|
|
|
[ 'skia_os == "android"', {
|
2013-08-05 13:38:28 +00:00
|
|
|
'dependencies': [
|
|
|
|
'android_deps.gyp:cpu_features',
|
|
|
|
],
|
2013-06-03 12:10:19 +00:00
|
|
|
}],
|
2013-08-05 13:38:28 +00:00
|
|
|
[ 'skia_arch_type == "arm"', {
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
# The code in SkUtilsArm.cpp can be used on an ARM-based Linux system, not only Android.
|
|
|
|
'sources': [
|
|
|
|
'../src/core/SkUtilsArm.cpp',
|
2012-08-01 15:58:41 +00:00
|
|
|
'../src/core/SkUtilsArm.h',
|
arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.
- Add include/core/SkUtilsArm.h, which declares a few helper
macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
function 'sk_cpu_arm_has_neon()' which returns true if
the target CPU supports the ARM NEON instruction set.
Note that the header is in include/core/ because it will
have to be included from NEON-specific code under src/code/
It would probably be more logical to put it under include/opts/
instead, but this would require moving all the NEON-specific
stuff under src/code/ into src/opts/, which is not trivial
due to the way the code is currently architected.
- Add src/core/SkUtilsArm.cpp which implements
'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
when SK_NEON_ARM_IS_DYNAMIC is true.
(For other cases, 'sk_cpu_arm_has_neon' is an inline function
that returns a constant 'true' or 'false' value).
There is no user-level accessible CPUID instruction on ARM,
so do all CPU feature probing by parsing /proc/cpuinfo.
This is Linux-specific.
For Debug build types, the CPU probing result is printed
to the Android log (or Linux command-line) for easier
debugging.
- Create a new 'opts_neon' target (static library) which shall
contain all the NEON-specific code paths for the library.
This is necessary because -mfpu=neon impacts also non-scalar
code. Just like with -mssse3 on x86, we can't build the rest
of the library with this flag.
Note that for now, we only include memset16_neon and
memset32_neon in this library.
- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
properly.
Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058
git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
|
|
|
],
|
|
|
|
}],
|
2013-01-14 16:46:26 +00:00
|
|
|
['skia_gpu == 1', {
|
|
|
|
'include_dirs': [
|
2014-07-28 20:43:02 +00:00
|
|
|
'../include/gpu',
|
|
|
|
'../src/gpu',
|
2013-01-14 16:46:26 +00:00
|
|
|
],
|
|
|
|
}],
|
2011-03-21 13:34:23 +00:00
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
2014-10-24 18:16:19 +00:00
|
|
|
'../include/c',
|
2011-03-21 13:34:23 +00:00
|
|
|
'../include/config',
|
|
|
|
'../include/core',
|
2013-04-25 13:34:40 +00:00
|
|
|
'../include/pathops',
|
2011-03-21 13:34:23 +00:00
|
|
|
],
|
2012-10-10 19:45:51 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'skia_os == "mac"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/utils/mac',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'skia_os == "ios"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/utils/ios',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'skia_os == "win"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'config/win',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
2011-03-21 13:34:23 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|