summaryrefslogtreecommitdiff
path: root/skia
diff options
context:
space:
mode:
Diffstat (limited to 'skia')
-rw-r--r--skia/BUILD.gn156
-rw-r--r--skia/skia.gyp71
-rw-r--r--skia/skia_common.gypi162
-rw-r--r--skia/skia_gn_files.gypi43
-rw-r--r--skia/skia_library.gypi305
-rw-r--r--skia/skia_library_opts.gyp330
-rw-r--r--skia/skia_pdfium.gypi30
7 files changed, 53 insertions, 1044 deletions
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 533fc60b88..61790ebab3 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//testing/test.gni")
+import("//third_party/skia/gn/shared_sources.gni")
if (current_cpu == "arm") {
import("//build/config/arm.gni")
@@ -16,86 +17,6 @@ if (current_cpu == "mipsel" || current_cpu == "mips64el") {
skia_support_gpu = !is_ios
skia_support_pdf = false #!is_ios && (enable_basic_printing || enable_print_preview)
-# The list of Skia core sources that are to be set for chromium.
-gypi_skia_core =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("//third_party/skia/gyp/core.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "//third_party/skia/gyp/core.gypi" ])
-
-# The list of Skia gpu sources that are to be set for chromium.
-if (skia_support_gpu) {
- gypi_skia_gpu =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("//third_party/skia/gyp/gpu.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "//third_party/skia/gyp/gpu.gypi" ])
-}
-
-# The list of Skia pdf sources that are to be set for chromium.
-if (skia_support_pdf) {
- gypi_skia_pdf =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("//third_party/skia/gyp/pdf.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "//third_party/skia/gyp/pdf.gypi" ])
-}
-
-# The list of Skia effects that are to be set for chromium.
-gypi_skia_effects =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("//third_party/skia/gyp/effects.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "//third_party/skia/gyp/effects.gypi" ])
-
-# The list of Skia utils that are to be set for chromium.
-gypi_skia_utils =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("//third_party/skia/gyp/utils.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "//third_party/skia/gyp/utils.gypi" ])
-
-gypi_skia_opts =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("//third_party/skia/gyp/opts.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "//third_party/skia/gyp/opts.gypi" ])
-
-# The list of Skia files is kept in skia_gn_files.gypi. Read it.
-gypi_values =
- exec_script("//build/gypi_to_gn.py",
- [
- rebase_path("skia_gn_files.gypi"),
- "--replace=<(skia_include_path)=//third_party/skia/include",
- "--replace=<(skia_src_path)=//third_party/skia/src",
- ],
- "scope",
- [ "skia_gn_files.gypi" ])
-
# External-facing config for dependent code.
config("skia_config") {
include_dirs = [
@@ -250,10 +171,42 @@ component("skia") {
]
# The skia gypi values are relative to the skia_dir, so we need to rebase.
- sources += gypi_skia_core.sources
- sources += gypi_skia_effects.sources
- sources += gypi_skia_utils.sources
- sources += gypi_values.skia_library_sources
+ sources += skia_core_sources
+ sources += skia_effects_sources
+ sources += skia_utils_sources
+ sources += [
+ "//third_party/skia/src/ports/SkImageGenerator_none.cpp",
+
+ "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp",
+ "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp",
+ "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
+ "//third_party/skia/src/ports/SkFontHost_FreeType.cpp",
+ "//third_party/skia/src/ports/SkFontHost_win.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_android.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp",
+ "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp",
+ "//third_party/skia/src/ports/SkImageEncoder_none.cpp",
+ "//third_party/skia/src/ports/SkOSFile_posix.cpp",
+ "//third_party/skia/src/ports/SkOSFile_stdio.cpp",
+ "//third_party/skia/src/ports/SkOSFile_win.cpp",
+ "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp",
+ "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp",
+ "//third_party/skia/src/ports/SkTLS_pthread.cpp",
+ "//third_party/skia/src/ports/SkTLS_win.cpp",
+ "//third_party/skia/src/ports/SkTypeface_win_dw.cpp",
+ "//third_party/skia/src/sfnt/SkOTTable_name.cpp",
+ "//third_party/skia/src/sfnt/SkOTUtils.cpp",
+
+ #mac
+ "//third_party/skia/src/utils/mac/SkStream_mac.cpp",
+
+ #pdfium
+ "//third_party/skia/src/ports/SkDiscardableMemory_none.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_custom.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_custom_empty_factory.cpp",
+ "//third_party/skia/src/ports/SkMemory_malloc.cpp",
+ ]
# This and skia_opts are really the same conceptual target so share headers.
allow_circular_includes_from = [ ":skia_opts" ]
@@ -264,8 +217,8 @@ component("skia") {
# GPU
if (skia_support_gpu) {
- sources += gypi_skia_gpu.skgpu_sources
- sources += gypi_skia_gpu.skgpu_null_gl_sources
+ sources += skia_gpu_sources
+ sources += skia_null_gpu_sources
}
# Remove unused util files include in utils.gypi
@@ -278,9 +231,6 @@ component("skia") {
"//third_party/skia/src/utils/SkLayer.cpp",
"//third_party/skia/src/utils/SkMeshUtils.cpp",
"//third_party/skia/src/utils/SkParsePath.cpp",
-
- #testing
- "//third_party/skia/src/fonts/SkGScalerContext.cpp",
]
if (is_win) {
@@ -374,7 +324,7 @@ component("skia") {
if (skia_support_pdf) {
deps += [ "//third_party/sfntly" ]
- sources += gypi_skia_pdf.sources
+ sources += skia_pdf_sources
} else {
sources += [ "//third_party/skia/src/pdf/SkDocument_PDF_None.cpp" ]
}
@@ -402,7 +352,7 @@ component("skia") {
# Separated out so it can be compiled with different flags for SSE.
if (current_cpu == "x86" || current_cpu == "x64") {
source_set("skia_opts_sse3") {
- sources = gypi_skia_opts.ssse3_sources
+ sources = skia_opts.ssse3_sources
if (!is_win || is_clang) {
cflags = [ "-mssse3" ]
}
@@ -418,7 +368,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
]
}
source_set("skia_opts_sse41") {
- sources = gypi_skia_opts.sse41_sources
+ sources = skia_opts.sse41_sources
if (!is_win || is_clang) {
cflags = [ "-msse4.1" ]
}
@@ -434,7 +384,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
]
}
source_set("skia_opts_sse42") {
- sources = gypi_skia_opts.sse42_sources
+ sources = skia_opts.sse42_sources
if (!is_win || is_clang) {
cflags = [ "-msse4.2" ]
}
@@ -450,7 +400,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
]
}
source_set("skia_opts_avx") {
- sources = gypi_skia_opts.avx_sources
+ sources = skia_opts.avx_sources
if (!is_win) {
cflags = [ "-mavx" ]
}
@@ -466,7 +416,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
]
}
source_set("skia_opts_avx2") {
- sources = gypi_skia_opts.avx2_sources
+ sources = skia_opts.avx2_sources
if (!is_win) {
cflags = [ "-mavx2" ]
}
@@ -487,7 +437,7 @@ source_set("skia_opts") {
defines = []
if (current_cpu == "x86" || current_cpu == "x64") {
- sources = gypi_skia_opts.sse2_sources
+ sources = skia_opts.sse2_sources
deps = [
":skia_opts_avx",
":skia_opts_avx2",
@@ -501,9 +451,9 @@ source_set("skia_opts") {
cflags += [ "-fomit-frame-pointer" ]
if (arm_version >= 7) {
- sources = gypi_skia_opts.armv7_sources
+ sources = skia_opts.armv7_sources
if (arm_use_neon || arm_optionally_use_neon) {
- sources += gypi_skia_opts.neon_sources
+ sources += skia_opts.neon_sources
# Root build config sets -mfpu=$arm_fpu, which we expect to be neon
# when running this.
@@ -513,21 +463,21 @@ source_set("skia_opts") {
}
}
} else {
- sources = gypi_skia_opts.none_sources
+ sources = skia_opts.none_sources
}
} else if (current_cpu == "arm64") {
- sources = gypi_skia_opts.arm64_sources
+ sources = skia_opts.arm64_sources
} else if (current_cpu == "mipsel") {
cflags += [ "-fomit-frame-pointer" ]
if (mips_dsp_rev >= 1) {
- sources = gypi_skia_opts.mips_dsp_sources
+ sources = skia_opts.mips_dsp_sources
} else {
- sources = gypi_skia_opts.none_sources
+ sources = skia_opts.none_sources
}
} else if (current_cpu == "mips64el") {
cflags += [ "-fomit-frame-pointer" ]
- sources = gypi_skia_opts.none_sources
+ sources = skia_opts.none_sources
} else {
assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
}
diff --git a/skia/skia.gyp b/skia/skia.gyp
deleted file mode 100644
index 29f5464938..0000000000
--- a/skia/skia.gyp
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'conditions': [
- # In component mode (shared_lib), we build all of skia as a single DLL.
- # However, in the static mode, we need to build skia as multiple targets
- # in order to support the use case where a platform (e.g. Android) may
- # already have a copy of skia as a system library.
- ['component=="static_library"', {
- 'targets': [
- {
- 'target_name': 'skia_library',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- 'skia_library.gypi',
- ],
- },
- ],
- }],
- ['component=="static_library"', {
- 'targets': [
- {
- 'target_name': 'skia',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'type': 'none',
- 'dependencies': [
- 'skia_library',
- 'skia_pdfium',
- ],
- 'export_dependent_settings': [
- 'skia_library',
- 'skia_pdfium',
- ],
- 'direct_dependent_settings': {
- 'conditions': [
- [ 'OS == "win"', {
- 'defines': [
- 'GR_GL_FUNCTION_TYPE=__stdcall',
- ],
- }],
- ],
- },
- },
- {
- 'target_name': 'skia_pdfium',
- 'type': 'static_library',
- 'includes': [
- 'skia_pdfium.gypi',
- 'skia_common.gypi',
- ],
- },
- ],
- }],
- ],
-}
diff --git a/skia/skia_common.gypi b/skia/skia_common.gypi
deleted file mode 100644
index 0a8e019611..0000000000
--- a/skia/skia_common.gypi
+++ /dev/null
@@ -1,162 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This gypi file handles the removal of platform-specific files from the
-# Skia build.
-{
- 'include_dirs': [
- '..',
- 'config',
- ],
-
- 'conditions': [
- [ 'OS != "android"', {
- 'sources/': [
- ['exclude', '_android\\.(cc|cpp)$'],
- ],
- }],
- [ 'OS != "ios"', {
- 'sources/': [
- ['exclude', '_ios\\.(cc|cpp|mm?)$'],
- ],
- }],
- [ 'OS == "ios"', {
- 'defines': [
- 'SK_BUILD_FOR_IOS',
- ],
- }],
- [ 'OS == "win"', {
- 'defines': [
- 'SK_BUILD_FOR_WIN32',
- ],
- }],
- [ 'OS != "mac"', {
- 'sources/': [
- ['exclude', '_mac\\.(cc|cpp|mm?)$'],
- ],
- }],
- [ 'OS == "mac"', {
- 'defines': [
- 'SK_BUILD_FOR_MAC',
- ],
- }],
- [ 'OS != "win"', {
- 'sources/': [ ['exclude', '_win\\.(cc|cpp)$'] ],
- }],
- [ 'OS == "win"', {
- 'defines': [
- # On windows, GDI handles are a scarse system-wide resource so we have to keep
- # the glyph cache, which holds up to 4 GDI handles per entry, to a fairly small
- # size.
- # http://crbug.com/314387
- 'SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256',
- 'GR_GL_FUNCTION_TYPE=__stdcall',
- ],
- }],
- [ 'OS!="linux"', {
- 'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'] ],
- }],
-
- #Settings for text blitting, chosen to approximate the system browser.
- [ 'OS == "linux"', {
- 'defines': [
- 'SK_GAMMA_EXPONENT=1.2',
- 'SK_GAMMA_CONTRAST=0.2',
- ],
- }],
- ['OS == "android"', {
- 'defines': [
- 'SK_GAMMA_APPLY_TO_A8',
- 'SK_GAMMA_EXPONENT=1.4',
- 'SK_GAMMA_CONTRAST=0.0',
- ],
- }],
- ['OS == "win"', {
- 'defines': [
- 'SK_GAMMA_SRGB',
- 'SK_GAMMA_CONTRAST=0.5',
- ],
- }],
- ['OS == "mac"', {
- 'defines': [
- 'SK_GAMMA_SRGB',
- 'SK_GAMMA_CONTRAST=0.0',
- ],
- }],
-
- # Neon support.
- [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', {
- 'defines': [
- 'SK_ARM_HAS_NEON',
- ],
- }],
- [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 0 and arm_neon_optional == 1', {
- 'defines': [
- 'SK_ARM_HAS_OPTIONAL_NEON',
- ],
- }],
- ],
-
- 'variables': {
- 'variables': {
- 'conditions': [
- ['OS== "ios"', {
- 'skia_support_gpu': 0,
- }, {
- 'skia_support_gpu': 1,
- }],
- ],
- },
- 'skia_support_gpu': '<(skia_support_gpu)',
- 'skia_support_pdf': '<(skia_support_pdf)',
-
- # These two set the paths so we can include skia/gyp/core.gypi
- 'skia_src_path': '../third_party/skia/src',
- 'skia_include_path': '../third_party/skia/include',
-
- # This list will contain all defines that also need to be exported to
- # dependent components.
- 'skia_export_defines': [
- 'SK_SUPPORT_GPU=<(skia_support_gpu)',
- ],
-
- 'default_font_cache_limit%': '(20*1024*1024)',
-
- 'conditions': [
- ['OS== "android"', {
- # Android devices are typically more memory constrained, so
- # default to a smaller glyph cache (it may be overriden at runtime
- # when the renderer starts up, depending on the actual device memory).
- 'default_font_cache_limit': '(1*1024*1024)',
- 'skia_export_defines': [
- 'SK_BUILD_FOR_ANDROID',
- ],
- }],
- ],
- },
-
- 'defines': [
- '<@(skia_export_defines)',
-
- 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)',
- ],
-
- 'direct_dependent_settings': {
- 'defines': [
- '<@(skia_export_defines)',
- ],
- },
-
- # We would prefer this to be direct_dependent_settings,
- # however we currently have no means to enforce that direct dependents
- # re-export if they include Skia headers in their public headers.
- 'all_dependent_settings': {
- 'include_dirs': [
- '..',
- 'config',
- ],
- },
-
- 'msvs_disabled_warnings': [4244, 4267, 4341, 4345, 4390, 4554, 4748, 4800],
-}
diff --git a/skia/skia_gn_files.gypi b/skia/skia_gn_files.gypi
deleted file mode 100644
index a3aca21014..0000000000
--- a/skia/skia_gn_files.gypi
+++ /dev/null
@@ -1,43 +0,0 @@
-# This file is read into the GN build.
-
-# Files are relative to third_party/skia.
-{
- 'skia_library_sources': [
- '<(skia_src_path)/ports/SkImageGenerator_none.cpp',
-
- '<(skia_src_path)/fonts/SkFontMgr_indirect.cpp',
- '<(skia_src_path)/fonts/SkRemotableFontMgr.cpp',
- '<(skia_src_path)/ports/SkFontHost_FreeType_common.cpp',
- '<(skia_src_path)/ports/SkFontHost_FreeType.cpp',
- '<(skia_src_path)/ports/SkFontHost_win.cpp',
- '<(skia_src_path)/ports/SkFontMgr_android.cpp',
- '<(skia_src_path)/ports/SkFontMgr_android_factory.cpp',
- '<(skia_src_path)/ports/SkFontMgr_android_parser.cpp',
- '<(skia_src_path)/ports/SkGlobalInitialization_default.cpp',
- '<(skia_src_path)/ports/SkImageEncoder_none.cpp',
- '<(skia_src_path)/ports/SkOSFile_posix.cpp',
- '<(skia_src_path)/ports/SkOSFile_stdio.cpp',
- '<(skia_src_path)/ports/SkOSFile_win.cpp',
- '<(skia_src_path)/ports/SkRemotableFontMgr_win_dw.cpp',
- '<(skia_src_path)/ports/SkScalerContext_win_dw.cpp',
- '<(skia_src_path)/ports/SkTLS_pthread.cpp',
- '<(skia_src_path)/ports/SkTLS_win.cpp',
- '<(skia_src_path)/ports/SkTypeface_win_dw.cpp',
- '<(skia_src_path)/sfnt/SkOTTable_name.cpp',
- '<(skia_src_path)/sfnt/SkOTUtils.cpp',
-
- #mac
- '<(skia_src_path)/utils/mac/SkStream_mac.cpp',
-
- #windows
-
- #testing
- '<(skia_src_path)/fonts/SkGScalerContext.cpp',
-
- #pdfium
- '<(skia_src_path)/ports/SkDiscardableMemory_none.cpp',
- '<(skia_src_path)/ports/SkFontMgr_custom.cpp',
- '<(skia_src_path)/ports/SkFontMgr_custom_empty_factory.cpp',
- '<(skia_src_path)/ports/SkMemory_malloc.cpp',
- ],
-}
diff --git a/skia/skia_library.gypi b/skia/skia_library.gypi
deleted file mode 100644
index e933732410..0000000000
--- a/skia/skia_library.gypi
+++ /dev/null
@@ -1,305 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-# This gypi file contains the Skia library.
-# In component mode (shared_lib) it is folded into a single shared library with
-# the PDFium-specific enhancements but in all other cases it is a separate lib.
-
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# variables and defines should go in skia_common.gypi so they can be seen
-# by files listed here and in skia_library_opts.gypi.
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-{
- 'dependencies': [
- 'skia_library_opts.gyp:skia_opts',
- '../third_party/third_party.gyp:fx_zlib',
- ],
-
- 'includes': [
- '../third_party/skia/gyp/core.gypi',
- '../third_party/skia/gyp/effects.gypi',
- '../third_party/skia/gyp/pdf.gypi',
- '../third_party/skia/gyp/utils.gypi',
- ],
-
- 'sources': [
- '../third_party/skia/src/lazy/SkDiscardableMemoryPool.cpp',
-
- '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
- '../third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp',
-
- '../third_party/skia/src/ports/SkDiscardableMemory_none.cpp',
-
- '../third_party/skia/src/fonts/SkFontMgr_indirect.cpp',
- '../third_party/skia/src/fonts/SkRemotableFontMgr.cpp',
- '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
-
- '../third_party/skia/src/ports/SkImageEncoder_none.cpp',
- '../third_party/skia/src/ports/SkImageGenerator_none.cpp',
-
- '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
- '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
- '../third_party/skia/src/ports/SkFontHost_win.cpp',
- "../third_party/skia/src/ports/SkFontMgr_android.cpp",
- "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
- '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp',
- '../third_party/skia/src/ports/SkFontMgr_custom.cpp',
- '../third_party/skia/src/ports/SkFontMgr_custom_empty_factory.cpp',
-
- '../third_party/skia/src/ports/SkGlobalInitialization_default.cpp',
- '../third_party/skia/src/ports/SkMemory_malloc.cpp',
- '../third_party/skia/src/ports/SkOSFile_posix.cpp',
- '../third_party/skia/src/ports/SkOSFile_stdio.cpp',
- '../third_party/skia/src/ports/SkOSFile_win.cpp',
- '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
- '../third_party/skia/src/ports/SkTLS_pthread.cpp',
- '../third_party/skia/src/ports/SkTLS_win.cpp',
- '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
-
- '../third_party/skia/src/sfnt/SkOTTable_name.cpp',
- '../third_party/skia/src/sfnt/SkOTUtils.cpp',
- ],
-
- # Exclude all unused files in skia utils.gypi file
- 'sources!': [
- '../third_party/skia/src/utils/SkBoundaryPatch.cpp',
- '../third_party/skia/src/utils/SkFrontBufferedStream.cpp',
- '../third_party/skia/src/utils/SkCamera.cpp',
- '../third_party/skia/src/utils/SkDumpCanvas.cpp',
- '../third_party/skia/src/utils/SkInterpolator.cpp',
- '../third_party/skia/src/utils/SkLayer.cpp',
- '../third_party/skia/src/utils/SkMD5.cpp',
- '../third_party/skia/src/utils/SkMeshUtils.cpp',
- '../third_party/skia/src/utils/SkNinePatch.cpp',
- '../third_party/skia/src/utils/SkParsePath.cpp',
-
-#windows
- '../third_party/skia/src/utils/win/SkAutoCoInitialize.cpp',
- '../third_party/skia/src/utils/win/SkIStream.cpp',
- '../third_party/skia/src/utils/win/SkWGL_win.cpp',
-
-#testing
- '../third_party/skia/src/fonts/SkGScalerContext.cpp',
- ],
-
- 'include_dirs': [
- '../third_party/skia/include/c',
- '../third_party/skia/include/core',
- '../third_party/skia/include/client/android',
- '../third_party/skia/include/effects',
- '../third_party/skia/include/images',
- '../third_party/skia/include/lazy',
- '../third_party/skia/include/pathops',
- '../third_party/skia/include/pdf',
- '../third_party/skia/include/pipe',
- '../third_party/skia/include/ports',
- '../third_party/skia/include/private',
- '../third_party/skia/include/utils',
- '../third_party/skia/src/core',
- '../third_party/skia/src/opts',
- '../third_party/skia/src/image',
- '../third_party/skia/src/pdf',
- '../third_party/skia/src/ports',
- '../third_party/skia/src/sfnt',
- '../third_party/skia/src/utils',
- '../third_party/skia/src/lazy',
- # TODO(dsinclair): Right way to use third_party.gyp:fx_freetype?
- '../third_party/freetype/include',
- ],
- 'conditions': [
- ['skia_support_gpu != 0', {
- 'includes': [
- '../third_party/skia/gyp/gpu.gypi',
- ],
- 'sources': [
- '<@(skgpu_null_gl_sources)',
- '<@(skgpu_sources)',
- ],
- 'include_dirs': [
- '../third_party/skia/include/gpu',
- '../third_party/skia/src/gpu',
- ],
- }],
- ['skia_support_pdf == 0', {
- 'sources/': [
- ['exclude', '../third_party/skia/src/doc/SkDocument_PDF.cpp'],
- ['exclude', '../third_party/skia/src/pdf/'],
- ],
- }],
- ['skia_support_pdf == 1', {
- 'dependencies': [
- '../third_party/sfntly/sfntly.gyp:sfntly',
- ],
- }],
-
- [ 'OS == "win"', {
- 'sources!': [
- # Keeping _win.cpp
- "../third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
- ],
- 'dependencies': [
- '../third_party/third_party.gyp:fx_freetype'
- ],
- },{
- 'sources!': [
- # Keeping _pthread.cpp
- "../third_party/skia/src/utils/SkThreadUtils_win.cpp",
- ],
- }],
-
- [ 'OS != "mac"', {
- 'sources/': [
- ['exclude', '/mac/']
- ],
- }],
- [ 'OS == "android" and target_arch == "arm"', {
- 'sources': [
- '../third_party/skia/src/core/SkUtilsArm.cpp',
- ],
- }],
- [ 'OS=="linux"', {
- 'dependencies': [
- '../third_party/third_party.gyp:fx_freetype'
- ],
- 'cflags': [
- '-Wno-unused',
- '-Wno-unused-function',
- ],
- }],
- [ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
- 'sources!': [
- '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
- '../third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp',
- '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
- '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
- ],
- }],
- [ 'OS=="mac" or OS=="ios"', {
- 'sources!': [
- '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
- '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
-
- ],
- }],
- [ 'OS == "android"', {
- 'dependencies': [
- '../third_party/expat/expat.gyp:expat',
- '../third_party/freetype-android/freetype.gyp:ft2',
- ],
- # This exports a hard dependency because it needs to run its
- # symlink action in order to expose the skia header files.
- 'hard_dependency': 1,
- 'include_dirs': [
- '../third_party/expat/files/lib',
- ],
- },{ # not 'OS == "android"'
- 'sources!': [
- "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
- '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp',
- ],
- }],
- [ 'OS == "ios"', {
- 'include_dirs': [
- '../third_party/skia/include/utils/ios',
- '../third_party/skia/include/utils/mac',
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
- ],
- },
- 'sources': [
- # This file is used on both iOS and Mac, so it should be removed
- # from the ios and mac conditions and moved into the main sources
- # list.
- '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
- ],
-
- # The main skia_opts target does not currently work on iOS because the
- # target architecture on iOS is determined at compile time rather than
- # gyp time (simulator builds are x86, device builds are arm). As a
- # temporary measure, this is a separate opts target for iOS-only, using
- # the _none.cpp files to avoid architecture-dependent implementations.
- 'dependencies': [
- 'skia_library_opts.gyp:skia_opts_none',
- ],
- 'dependencies!': [
- 'skia_library_opts.gyp:skia_opts',
- ],
- }],
- [ 'OS == "mac"', {
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/skia/include/utils/mac',
- ],
- },
- 'include_dirs': [
- '../third_party/skia/include/utils/mac',
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
- ],
- },
- 'sources': [
- '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
- ],
- }],
- [ 'OS == "win"', {
- 'sources!': [
- '../third_party/skia/src/ports/SkOSFile_posix.cpp',
- '../third_party/skia/src/ports/SkTime_Unix.cpp',
- '../third_party/skia/src/ports/SkTLS_pthread.cpp',
- ],
- 'include_dirs': [
- '../third_party/skia/include/utils/win',
- '../third_party/skia/src/utils/win',
- ],
- },{ # not 'OS == "win"'
- 'sources!': [
- '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
- '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
- '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
-
- '../third_party/skia/src/utils/win/SkDWrite.cpp',
- '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp',
- '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp',
- '../third_party/skia/src/utils/win/SkHRESULT.cpp',
- ],
- }],
- ],
- 'target_conditions': [
- # Pull in specific Mac files for iOS (which have been filtered out
- # by file name rules).
- [ 'OS == "ios"', {
- 'sources/': [
- ['include', 'SkFontHost_mac\\.cpp$',],
- ['include', 'SkStream_mac\\.cpp$',],
- ['include', 'SkCreateCGImageRef\\.cpp$',],
- ],
- 'xcode_settings' : {
- 'WARNING_CFLAGS': [
- # SkFontHost_mac.cpp uses API deprecated in iOS 7.
- # crbug.com/408571
- '-Wno-deprecated-declarations',
- ],
- },
- }],
- ],
-
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/skia/include/core',
- '../third_party/skia/include/effects',
- '../third_party/skia/include/pdf',
- '../third_party/skia/include/gpu',
- '../third_party/skia/include/lazy',
- '../third_party/skia/include/pathops',
- '../third_party/skia/include/pipe',
- '../third_party/skia/include/ports',
- '../third_party/skia/include/utils',
- ],
- },
-}
diff --git a/skia/skia_library_opts.gyp b/skia/skia_library_opts.gyp
deleted file mode 100644
index 32b69bb164..0000000000
--- a/skia/skia_library_opts.gyp
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This gyp file contains the platform-specific optimizations for Skia
-{
- 'variables': {
- 'skia_src_path': '../third_party/skia/src',
- 'includes': [ '../third_party/skia/gyp/opts.gypi' ],
- 'include_dirs': [
- '../third_party/skia/include/core',
- '../third_party/skia/include/effects',
- '../third_party/skia/include/private',
- '../third_party/skia/include/utils',
- '../third_party/skia/src/core',
- '../third_party/skia/src/opts',
- '../third_party/skia/src/utils',
- ],
- },
-
- 'targets': [
- # SSE files have to be built in a separate target, because gcc needs
- # different -msse flags for different SSE levels which enable use of SSE
- # intrinsics but also allow emission of SSE2 instructions for scalar code.
- # gyp does not allow per-file compiler flags.
- # For about the same reason, we need to compile the ARM opts files
- # separately as well.
- {
- 'target_name': 'skia_opts',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'conditions': [
- [ 'target_arch != "arm" and target_arch != "mipsel" and \
- target_arch != "arm64" and target_arch != "mips64el"', {
- # Chrome builds with -msse2 locally, so sse2_sources could in theory
- # be in the regular skia target. But we need skia_opts for arm
- # anyway, so putting sse2_sources here is simpler than making this
- # conditionally a type none target on x86.
- 'sources': [ '<@(sse2_sources)' ],
- 'dependencies': [
- 'skia_opts_ssse3',
- 'skia_opts_sse41',
- 'skia_opts_sse42',
- 'skia_opts_avx',
- 'skia_opts_avx2',
- ],
- }],
- [ 'target_arch == "arm"', {
- 'conditions': [
- [ 'arm_version >= 7', {
- 'sources': [ '<@(armv7_sources)' ],
- }, { # arm_version < 7
- 'sources': [ '<@(none_sources)' ],
- }],
- [ 'arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {
- 'dependencies': [
- 'skia_opts_neon',
- ]
- }],
- ],
- # The assembly uses the frame pointer register (r7 in Thumb/r11 in
- # ARM), the compiler doesn't like that. Explicitly remove the
- # -fno-omit-frame-pointer flag for Android, as that gets added to all
- # targets via common.gypi.
- 'cflags!': [
- '-fno-omit-frame-pointer',
- '-marm',
- '-mapcs-frame',
- ],
- 'cflags': [
- '-fomit-frame-pointer',
- ],
- }],
- [ 'target_arch == "mipsel"',{
- 'cflags': [ '-fomit-frame-pointer' ],
- 'conditions': [
- [ 'mips_dsp_rev >= 1', {
- 'sources': [ '<@(mips_dsp_sources)' ],
- }, { # mips_dsp_rev == 0
- 'sources': [ '<@(none_sources)' ],
- }],
- ],
- }],
- [ 'target_arch == "mips64el"',{
- 'cflags': [ '-fomit-frame-pointer' ],
- 'sources': [ '<@(none_sources)' ],
- }],
- [ 'target_arch == "arm64"', {
- 'sources': [ '<@(arm64_sources)' ],
- }],
- ],
- },
- # For the same lame reasons as what is done for skia_opts, we have to
- # create another target specifically for SSSE3 code as we would not want
- # to compile the SSE2 code with -mssse3 which would potentially allow
- # gcc to generate SSSE3 code.
- {
- 'target_name': 'skia_opts_ssse3',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'conditions': [
- [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
- 'cflags': [ '-mssse3' ],
- }],
- [ 'OS == "mac"', {
- 'xcode_settings': {
- 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES',
- },
- }],
- [ 'OS == "win" and clang == 1', {
- # cl.exe's /arch flag doesn't have a setting for SSSE3, and cl.exe
- # doesn't need it for intrinsics. clang-cl does need it, though.
- 'msvs_settings': {
- 'VCCLCompilerTool': { 'AdditionalOptions': [ '-mssse3' ] },
- },
- }],
- [ 'OS == "win"', {
- 'defines' : [ 'SK_CPU_SSE_LEVEL=31' ],
- }],
- [ 'target_arch != "arm" and target_arch != "arm64" and \
- target_arch != "mipsel" and target_arch != "mips64el"', {
- 'sources': [ '<@(ssse3_sources)' ],
- }],
- ],
- },
- # For the same lame reasons as what is done for skia_opts, we also have to
- # create another target specifically for SSE4.1 code as we would not want
- # to compile the SSE2 code with -msse4.1 which would potentially allow
- # gcc to generate SSE4.1 code.
- {
- 'target_name': 'skia_opts_sse41',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'sources': [ '<@(sse41_sources)' ],
- 'conditions': [
- [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
- 'cflags': [ '-msse4.1' ],
- }],
- [ 'OS == "mac"', {
- 'xcode_settings': {
- 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES',
- },
- }],
- [ 'OS == "win" and clang == 1', {
- # cl.exe's /arch flag doesn't have a setting for SSE4.1, and cl.exe
- # doesn't need it for intrinsics. clang-cl does need it, though.
- 'msvs_settings': {
- 'VCCLCompilerTool': { 'AdditionalOptions': [ '-msse4.1' ] },
- },
- }],
- [ 'OS == "win"', {
- 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ],
- }],
- ],
- },
- {
- 'target_name': 'skia_opts_sse42',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'sources': [ '<@(sse42_sources)' ],
- 'conditions': [
- [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
- 'cflags': [ '-msse4.2' ],
- }],
- [ 'OS == "mac"', {
- 'xcode_settings': {
- 'GCC_ENABLE_SSE42_EXTENSIONS': 'YES',
- },
- }],
- [ 'OS == "win" and clang == 1', {
- # cl.exe's /arch flag doesn't have a setting for SSE4.2, and cl.exe
- # doesn't need it for intrinsics. clang-cl does need it, though.
- 'msvs_settings': {
- 'VCCLCompilerTool': { 'AdditionalOptions': [ '-msse4.2' ] },
- },
- }],
- [ 'OS == "win"', {
- 'defines' : [ 'SK_CPU_SSE_LEVEL=42' ],
- }],
- ],
- },
- {
- 'target_name': 'skia_opts_avx',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'sources': [ '<@(avx_sources)' ],
- 'conditions': [
- [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
- 'cflags': [ '-mavx' ],
- }],
- [ 'OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CFLAGS': [ '-mavx' ],
- },
- }],
- [ 'OS == "win"', {
- 'msvs_settings': { 'VCCLCompilerTool': { 'EnableEnhancedInstructionSet': '3' } },
- }],
- ],
- },
- {
- 'target_name': 'skia_opts_avx2',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'sources': [ '<@(avx2_sources)' ],
- 'conditions': [
- [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
- 'cflags': [ '-mavx2' ],
- }],
- [ 'OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CFLAGS': [ '-mavx2' ],
- },
- }],
- [ 'OS == "win"', {
- 'msvs_settings': { 'VCCLCompilerTool': { 'EnableEnhancedInstructionSet': '5' } },
- }],
- ],
- },
- {
- 'target_name': 'skia_opts_none',
- 'type': 'static_library',
- # The optimize: 'max' scattered throughout are particularly
- # important when compiled by MSVC 2013, which seems
- # to mis-link-time-compile code that's built with
- # different optimization levels. http://crbug.com/543583
- 'variables': {
- 'optimize': 'max',
- },
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'sources': [ '<@(none_sources)' ],
- },
- ],
- 'conditions': [
- # NEON code must be compiled with -mfpu=neon which also affects scalar
- # code. To support dynamic NEON code paths, we need to build all
- # NEON-specific sources in a separate static library. The situation
- # is very similar to the SSSE3 one.
- ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', {
- 'targets': [
- {
- 'target_name': 'skia_opts_neon',
- 'type': 'static_library',
- 'includes': [
- 'skia_common.gypi',
- ],
- 'include_dirs': [ '<@(include_dirs)' ],
- 'cflags!': [
- '-fno-omit-frame-pointer',
- '-mfpu=vfp', # remove them all, just in case.
- '-mfpu=vfpv3',
- '-mfpu=vfpv3-d16',
- ],
- 'cflags': [
- '-mfpu=neon',
- '-fomit-frame-pointer',
- ],
- 'ldflags': [
- '-march=armv7-a',
- '-Wl,--fix-cortex-a8',
- ],
- 'sources': [ '<@(neon_sources)' ],
- },
- ],
- }],
- ],
-}
diff --git a/skia/skia_pdfium.gypi b/skia/skia_pdfium.gypi
deleted file mode 100644
index 5c80a4b9fd..0000000000
--- a/skia/skia_pdfium.gypi
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-# This gypi file contains all the PDFium-specific enhancements to Skia.
-# In component mode (shared_lib) it is folded into a single shared library with
-# the Skia files but in all other cases it is a separate library.
-{
- 'dependencies': [
- 'skia_library',
- ],
-
- 'direct_dependent_settings': {
- 'include_dirs': [
- 'ext',
- ],
- },
- 'variables': {
- # TODO(scottmg): http://crbug.com/177306
- 'clang_warning_flags_unset': [
- # Don't warn about string->bool used in asserts.
- '-Wstring-conversion',
- ],
- },
- 'sources': [
- 'config/SkUserConfig.h',
- 'ext/google_logging.cc',
- ],
-}