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
|
|
|
}],
|
Revert of Move CPU feature detection to its own file. (patchset #7 id:120001 of https://codereview.chromium.org/1890483002/ )
Reason for revert:
many unexpected GM diffs across GPU+CPU configs on Windows (hopefully just text masks on GPU?). seems like we pick a different srcover variant in some places.
Original issue's description:
> Move CPU feature detection to its own file.
>
> - Moves CPU feature detection to its own file.
> - Cleans up some redundant feature detection scattered around core/ and opts/.
> - Can now detect a few new CPU features:
> * F16C -> Intel f16<->f32 instructions, added between AVX and AVX2
> * FMA -> Intel FMA instructions, added at the same time as AVX2
> * VFP_FP16 -> ARM f16<->f32 instructions, quite common
> * NEON_FMA -> ARM FMA instructions, also quite common
> * SSE and SSE3... why not?
>
> This new internal API makes it very cheap to do fine-grained runtime CPU
> feature detection. Redundant calls to SkCpu::Supports() should be eliminated
> and it's hoistable out of loops. It compiles away entirely when we have the
> appropriate instructions available at compile time.
>
> This means we can call it to guard even a little snippet of 1 or 2 instructions
> right where needed and let inlining hoist the check (if any at all) up to
> somewhere that doesn't hurt performance. I've explained how I made this work
> in the private section of the new header.
>
> Once this lands and bakes a bit, I'll start following up with CLs to use it more
> and to add a bunch of those little 1-2 instruction snippets we've been wanting,
> e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
> (for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890483002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/872ea29357439f05b1f6995dd300fc054733e607
TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1892643003
2016-04-15 15:40:22 +00:00
|
|
|
[ 'skia_arch_type == "arm"', {
|
|
|
|
# The code in SkUtilsArm.cpp can be used on an ARM-based Linux system, not only Android.
|
|
|
|
'sources': [
|
|
|
|
'../src/core/SkUtilsArm.cpp',
|
|
|
|
'../src/core/SkUtilsArm.h',
|
|
|
|
],
|
|
|
|
}],
|
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
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|