aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar brettw <brettw@chromium.org>2016-09-06 12:43:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-06 12:43:55 -0700
commit45d1b442f1e0402ad7bc6a333ab86b32648c7a8c (patch)
tree62a502e2017cc39d67fab03f6927d9e973d0e794
parent1dbb207babecdae8f1f74ed9d9900c73064df744 (diff)
Move uils and sksl to a common sources GYP file.
This is for the coalescing of sources in one GYP file to improve GN runtime. If this is successful, the other sources lists will also be merged into this one file. Inlines "../src" and "../include" for skia_source_dir and skia_include_dir. Evaluating these with GYP's variable expansion is annoying since I think another layer of nesting is required. Coding these explicitly is also more clear. This used to be required because Chromium would reference these .gypi files directly with a different path, but this no longer happens. Removes the chromium defines gypi which is no longer referenced. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302723005 Committed: https://skia.googlesource.com/skia/+/39f7a10a04a914384944d8bf62621144ac4eeaa3 Review-Url: https://codereview.chromium.org/2302723005
-rw-r--r--gn/shared_sources.gni23
-rw-r--r--gyp/skia_for_chromium_defines.gypi22
-rw-r--r--gyp/skia_sources.gypi136
-rw-r--r--gyp/sksl.gyp8
-rw-r--r--gyp/sksl.gypi22
-rw-r--r--gyp/skslc.gyp8
-rw-r--r--gyp/utils.gyp8
-rw-r--r--gyp/utils.gypi120
8 files changed, 155 insertions, 192 deletions
diff --git a/gn/shared_sources.gni b/gn/shared_sources.gni
index 8525883e7c..9a4af74538 100644
--- a/gn/shared_sources.gni
+++ b/gn/shared_sources.gni
@@ -69,27 +69,14 @@ _pdf_gypi = exec_script("gypi_to_gn.py",
[ "../gyp/pdf.gypi" ])
skia_pdf_sources = _pdf_gypi.sources
-# SKSL.
-_sksl_gypi = exec_script("gypi_to_gn.py",
+_sources_gypi = exec_script("gypi_to_gn.py",
[
- rebase_path("../gyp/sksl.gypi"),
- "--replace=<(skia_include_path)=$_path_to_include",
- "--replace=<(skia_src_path)=$_path_to_src",
+ rebase_path("../gyp/skia_sources.gypi"),
],
"scope",
- [ "../gyp/sksl.gypi" ])
-skia_sksl_sources = _sksl_gypi.sources
-
-# Utils.
-_utils_gypi = exec_script("gypi_to_gn.py",
- [
- rebase_path("../gyp/utils.gypi"),
- "--replace=<(skia_include_path)=$_path_to_include",
- "--replace=<(skia_src_path)=$_path_to_src",
- ],
- "scope",
- [ "../gyp/utils.gypi" ])
-skia_utils_sources = _utils_gypi.sources
+ [ "../gyp/skia_sources.gypi" ])
+skia_sksl_sources = get_path_info(_sources_gypi.sksl_sources, "abspath")
+skia_utils_sources = get_path_info(_sources_gypi.utils_sources, "abspath")
# Skia Chromium defines. These flags will be defined in chromium If these
# become 'permanent', they should be moved into Chrome's skia build file.
diff --git a/gyp/skia_for_chromium_defines.gypi b/gyp/skia_for_chromium_defines.gypi
deleted file mode 100644
index 6ab5cc8e79..0000000000
--- a/gyp/skia_for_chromium_defines.gypi
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2014 Google Inc.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# THIS FILE IS OBSOLETE. It will be deleted pending a two-sided update to
-# Chromium. Please update the new list in gn/shared_sources.gni.
-
-# This file is included by chrome's skia/skia_common.gypi, and is intended to
-# augment the skia flags that are set there.
-
-{
- 'variables': {
-
- # These flags will be defined in chromium
- #
- # If these become 'permanent', they should be moved into skia_common.gypi
- #
- 'skia_for_chromium_defines': [
- 'SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS',
- ],
- },
-}
diff --git a/gyp/skia_sources.gypi b/gyp/skia_sources.gypi
new file mode 100644
index 0000000000..53036527af
--- /dev/null
+++ b/gyp/skia_sources.gypi
@@ -0,0 +1,136 @@
+# Copyright 2015 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+# Include this gypi to include all 'utils' files
+# The parent gyp/gypi file must define
+# 'skia_src_path' e.g. skia/trunk/src
+# 'skia_include_path' e.g. skia/trunk/include
+#
+# The skia build defines these in common_variables.gypi
+#
+{
+ 'utils_sources': [
+ '../include/utils/SkBoundaryPatch.h',
+ '../include/utils/SkFrontBufferedStream.h',
+ '../include/utils/SkCamera.h',
+ '../include/utils/SkCanvasStateUtils.h',
+ '../include/utils/SkDumpCanvas.h',
+ '../include/utils/SkEventTracer.h',
+ '../include/utils/SkInterpolator.h',
+ '../include/utils/SkLayer.h',
+ '../include/utils/SkMeshUtils.h',
+ '../include/utils/SkNoSaveLayerCanvas.h',
+ '../include/utils/SkNWayCanvas.h',
+ '../include/utils/SkNullCanvas.h',
+ '../include/utils/SkPaintFilterCanvas.h',
+ '../include/utils/SkParse.h',
+ '../include/utils/SkParsePath.h',
+ '../include/utils/SkPictureUtils.h',
+ '../include/utils/SkRandom.h',
+ '../include/utils/SkTextBox.h',
+
+ '../src/utils/SkBase64.cpp',
+ '../src/utils/SkBase64.h',
+ '../src/utils/SkBitmapSourceDeserializer.cpp',
+ '../src/utils/SkBitmapSourceDeserializer.h',
+ '../src/utils/SkBitSet.h',
+ '../src/utils/SkBoundaryPatch.cpp',
+ '../src/utils/SkFrontBufferedStream.cpp',
+ '../src/utils/SkCamera.cpp',
+ '../src/utils/SkCanvasStack.h',
+ '../src/utils/SkCanvasStack.cpp',
+ '../src/utils/SkCanvasStateUtils.cpp',
+ '../src/utils/SkCurveMeasure.cpp',
+ '../src/utils/SkCurveMeasure.h',
+ '../src/utils/SkDashPath.cpp',
+ '../src/utils/SkDashPathPriv.h',
+ '../src/utils/SkDeferredCanvas.cpp',
+ '../src/utils/SkDumpCanvas.cpp',
+ '../src/utils/SkEventTracer.cpp',
+ '../src/utils/SkFloatUtils.h',
+ '../src/utils/SkInterpolator.cpp',
+ '../src/utils/SkLayer.cpp',
+ '../src/utils/SkMatrix22.cpp',
+ '../src/utils/SkMatrix22.h',
+ '../src/utils/SkMeshUtils.cpp',
+ '../src/utils/SkMultiPictureDocument.cpp',
+ '../src/utils/SkNWayCanvas.cpp',
+ '../src/utils/SkNullCanvas.cpp',
+ '../src/utils/SkOSFile.cpp',
+ '../src/utils/SkPaintFilterCanvas.cpp',
+ '../src/utils/SkParse.cpp',
+ '../src/utils/SkParseColor.cpp',
+ '../src/utils/SkParsePath.cpp',
+ '../src/utils/SkPatchGrid.cpp',
+ '../src/utils/SkPatchGrid.h',
+ '../src/utils/SkPatchUtils.cpp',
+ '../src/utils/SkPatchUtils.h',
+ '../src/utils/SkRGBAToYUV.cpp',
+ '../src/utils/SkRGBAToYUV.h',
+ '../src/utils/SkShadowPaintFilterCanvas.cpp',
+ '../src/utils/SkShadowPaintFilterCanvas.h',
+ '../src/utils/SkTextBox.cpp',
+ '../src/utils/SkTextureCompressor.cpp',
+ '../src/utils/SkTextureCompressor.h',
+ '../src/utils/SkTextureCompressor_Utils.h',
+ '../src/utils/SkTextureCompressor_ASTC.cpp',
+ '../src/utils/SkTextureCompressor_ASTC.h',
+ '../src/utils/SkTextureCompressor_Blitter.h',
+ '../src/utils/SkTextureCompressor_R11EAC.cpp',
+ '../src/utils/SkTextureCompressor_R11EAC.h',
+ '../src/utils/SkTextureCompressor_LATC.cpp',
+ '../src/utils/SkTextureCompressor_LATC.h',
+ '../src/utils/SkThreadUtils.h',
+ '../src/utils/SkThreadUtils_pthread.cpp',
+ '../src/utils/SkThreadUtils_pthread.h',
+ '../src/utils/SkThreadUtils_win.cpp',
+ '../src/utils/SkThreadUtils_win.h',
+ '../src/utils/SkWhitelistTypefaces.cpp',
+
+ #mac
+ '../include/utils/mac/SkCGUtils.h',
+ '../src/utils/mac/SkCreateCGImageRef.cpp',
+
+ #windows
+ '../src/utils/win/SkAutoCoInitialize.h',
+ '../src/utils/win/SkAutoCoInitialize.cpp',
+ '../src/utils/win/SkDWrite.h',
+ '../src/utils/win/SkDWrite.cpp',
+ '../src/utils/win/SkDWriteFontFileStream.cpp',
+ '../src/utils/win/SkDWriteFontFileStream.h',
+ '../src/utils/win/SkDWriteGeometrySink.cpp',
+ '../src/utils/win/SkDWriteGeometrySink.h',
+ '../src/utils/win/SkHRESULT.h',
+ '../src/utils/win/SkHRESULT.cpp',
+ '../src/utils/win/SkIStream.h',
+ '../src/utils/win/SkIStream.cpp',
+ '../src/utils/win/SkTScopedComPtr.h',
+ '../src/utils/win/SkWGL.h',
+ '../src/utils/win/SkWGL_win.cpp',
+
+ #testing
+ '../src/fonts/SkGScalerContext.cpp',
+ '../src/fonts/SkGScalerContext.h',
+ '../src/fonts/SkRandomScalerContext.cpp',
+ '../src/fonts/SkRandomScalerContext.h',
+ '../src/fonts/SkTestScalerContext.cpp',
+ '../src/fonts/SkTestScalerContext.h',
+ ],
+ 'sksl_include_dirs': [
+ '../include/config',
+ '../include/core',
+ '../include/private',
+ '../src/sksl',
+ ],
+ 'sksl_sources': [
+ '../src/sksl/SkSLCompiler.cpp',
+ '../src/sksl/SkSLIRGenerator.cpp',
+ '../src/sksl/SkSLParser.cpp',
+ '../src/sksl/SkSLGLSLCodeGenerator.cpp',
+ '../src/sksl/SkSLSPIRVCodeGenerator.cpp',
+ '../src/sksl/SkSLUtil.cpp',
+ '../src/sksl/ir/SkSLSymbolTable.cpp',
+ '../src/sksl/ir/SkSLType.cpp',
+ ],
+}
diff --git a/gyp/sksl.gyp b/gyp/sksl.gyp
index 7e0a4f9ea6..609ace9ac8 100644
--- a/gyp/sksl.gyp
+++ b/gyp/sksl.gyp
@@ -3,14 +3,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
+ 'variables': {
+ 'includes': [ 'skia_sources.gypi' ]
+ },
'targets': [
{
'target_name': 'sksl',
'type': 'static_library',
'standalone_static_library': 1,
- 'includes': [
- 'sksl.gypi',
- ],
+ 'sources': [ '<@(sksl_sources)' ],
+ 'include_dirs': [ '<@(sksl_include_dirs)' ],
'defines': [
'SKIA'
],
diff --git a/gyp/sksl.gypi b/gyp/sksl.gypi
deleted file mode 100644
index 07e3800829..0000000000
--- a/gyp/sksl.gypi
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2016 Google Inc.
-#
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'include_dirs': [
- '<(skia_include_path)/config',
- '<(skia_include_path)/core',
- '<(skia_include_path)/private',
- '<(skia_src_path)/sksl',
- ],
- 'sources': [
- '<(skia_src_path)/sksl/SkSLCompiler.cpp',
- '<(skia_src_path)/sksl/SkSLIRGenerator.cpp',
- '<(skia_src_path)/sksl/SkSLParser.cpp',
- '<(skia_src_path)/sksl/SkSLGLSLCodeGenerator.cpp',
- '<(skia_src_path)/sksl/SkSLSPIRVCodeGenerator.cpp',
- '<(skia_src_path)/sksl/SkSLUtil.cpp',
- '<(skia_src_path)/sksl/ir/SkSLSymbolTable.cpp',
- '<(skia_src_path)/sksl/ir/SkSLType.cpp',
- ],
-}
diff --git a/gyp/skslc.gyp b/gyp/skslc.gyp
index 6e234932a8..5bd6c399b8 100644
--- a/gyp/skslc.gyp
+++ b/gyp/skslc.gyp
@@ -6,14 +6,16 @@
'includes': [
'apptype_console.gypi',
],
+ 'variables': {
+ 'includes': [ 'skia_sources.gypi' ],
+ },
'targets': [
{
'target_name': 'skslc',
'type': 'executable',
- 'includes' : [
- 'sksl.gypi',
- ],
+ 'include_dirs': [ '<@(sksl_include_dirs)' ],
'sources': [
+ '<@(sksl_sources)',
'../src/sksl/SkSLMain.cpp',
],
'configurations': {
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index b6ce7fde1b..12e7836db3 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -4,6 +4,9 @@
# found in the LICENSE file.
# Gyp for utils.
{
+ 'variables': {
+ 'includes': [ 'skia_sources.gypi' ],
+ },
'targets': [
{
'target_name': 'utils',
@@ -14,9 +17,6 @@
'core.gyp:*',
'etc1.gyp:libetc1',
],
- 'includes': [
- 'utils.gypi',
- ],
'include_dirs': [
'../include/effects',
'../include/gpu',
@@ -33,7 +33,7 @@
'../src/utils/win',
],
'sources': [
- 'utils.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
+ '<@(utils_sources)', # Makes the sources appear in IDEs (but does not modify the build).
],
'conditions': [
[ 'skia_os == "mac"', {
diff --git a/gyp/utils.gypi b/gyp/utils.gypi
deleted file mode 100644
index bf7f797b10..0000000000
--- a/gyp/utils.gypi
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 2015 Google Inc.
-#
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-# Include this gypi to include all 'utils' files
-# The parent gyp/gypi file must define
-# 'skia_src_path' e.g. skia/trunk/src
-# 'skia_include_path' e.g. skia/trunk/include
-#
-# The skia build defines these in common_variables.gypi
-#
-{
- 'sources': [
- '<(skia_include_path)/utils/SkBoundaryPatch.h',
- '<(skia_include_path)/utils/SkFrontBufferedStream.h',
- '<(skia_include_path)/utils/SkCamera.h',
- '<(skia_include_path)/utils/SkCanvasStateUtils.h',
- '<(skia_include_path)/utils/SkDumpCanvas.h',
- '<(skia_include_path)/utils/SkEventTracer.h',
- '<(skia_include_path)/utils/SkInterpolator.h',
- '<(skia_include_path)/utils/SkLayer.h',
- '<(skia_include_path)/utils/SkMeshUtils.h',
- '<(skia_include_path)/utils/SkNoSaveLayerCanvas.h',
- '<(skia_include_path)/utils/SkNWayCanvas.h',
- '<(skia_include_path)/utils/SkNullCanvas.h',
- '<(skia_include_path)/utils/SkPaintFilterCanvas.h',
- '<(skia_include_path)/utils/SkParse.h',
- '<(skia_include_path)/utils/SkParsePath.h',
- '<(skia_include_path)/utils/SkPictureUtils.h',
- '<(skia_include_path)/utils/SkRandom.h',
- '<(skia_include_path)/utils/SkTextBox.h',
-
- '<(skia_src_path)/utils/SkBase64.cpp',
- '<(skia_src_path)/utils/SkBase64.h',
- '<(skia_src_path)/utils/SkBitmapSourceDeserializer.cpp',
- '<(skia_src_path)/utils/SkBitmapSourceDeserializer.h',
- '<(skia_src_path)/utils/SkBitSet.h',
- '<(skia_src_path)/utils/SkBoundaryPatch.cpp',
- '<(skia_src_path)/utils/SkFrontBufferedStream.cpp',
- '<(skia_src_path)/utils/SkCamera.cpp',
- '<(skia_src_path)/utils/SkCanvasStack.h',
- '<(skia_src_path)/utils/SkCanvasStack.cpp',
- '<(skia_src_path)/utils/SkCanvasStateUtils.cpp',
- '<(skia_src_path)/utils/SkCurveMeasure.cpp',
- '<(skia_src_path)/utils/SkCurveMeasure.h',
- '<(skia_src_path)/utils/SkDashPath.cpp',
- '<(skia_src_path)/utils/SkDashPathPriv.h',
- '<(skia_src_path)/utils/SkDeferredCanvas.cpp',
- '<(skia_src_path)/utils/SkDumpCanvas.cpp',
- '<(skia_src_path)/utils/SkEventTracer.cpp',
- '<(skia_src_path)/utils/SkFloatUtils.h',
- '<(skia_src_path)/utils/SkInterpolator.cpp',
- '<(skia_src_path)/utils/SkLayer.cpp',
- '<(skia_src_path)/utils/SkMatrix22.cpp',
- '<(skia_src_path)/utils/SkMatrix22.h',
- '<(skia_src_path)/utils/SkMeshUtils.cpp',
- '<(skia_src_path)/utils/SkMultiPictureDocument.cpp',
- '<(skia_src_path)/utils/SkNWayCanvas.cpp',
- '<(skia_src_path)/utils/SkNullCanvas.cpp',
- '<(skia_src_path)/utils/SkOSFile.cpp',
- '<(skia_src_path)/utils/SkPaintFilterCanvas.cpp',
- '<(skia_src_path)/utils/SkParse.cpp',
- '<(skia_src_path)/utils/SkParseColor.cpp',
- '<(skia_src_path)/utils/SkParsePath.cpp',
- '<(skia_src_path)/utils/SkPatchGrid.cpp',
- '<(skia_src_path)/utils/SkPatchGrid.h',
- '<(skia_src_path)/utils/SkPatchUtils.cpp',
- '<(skia_src_path)/utils/SkPatchUtils.h',
- '<(skia_src_path)/utils/SkRGBAToYUV.cpp',
- '<(skia_src_path)/utils/SkRGBAToYUV.h',
- '<(skia_src_path)/utils/SkShadowPaintFilterCanvas.cpp',
- '<(skia_src_path)/utils/SkShadowPaintFilterCanvas.h',
- '<(skia_src_path)/utils/SkTextBox.cpp',
- '<(skia_src_path)/utils/SkTextureCompressor.cpp',
- '<(skia_src_path)/utils/SkTextureCompressor.h',
- '<(skia_src_path)/utils/SkTextureCompressor_Utils.h',
- '<(skia_src_path)/utils/SkTextureCompressor_ASTC.cpp',
- '<(skia_src_path)/utils/SkTextureCompressor_ASTC.h',
- '<(skia_src_path)/utils/SkTextureCompressor_Blitter.h',
- '<(skia_src_path)/utils/SkTextureCompressor_R11EAC.cpp',
- '<(skia_src_path)/utils/SkTextureCompressor_R11EAC.h',
- '<(skia_src_path)/utils/SkTextureCompressor_LATC.cpp',
- '<(skia_src_path)/utils/SkTextureCompressor_LATC.h',
- '<(skia_src_path)/utils/SkThreadUtils.h',
- '<(skia_src_path)/utils/SkThreadUtils_pthread.cpp',
- '<(skia_src_path)/utils/SkThreadUtils_pthread.h',
- '<(skia_src_path)/utils/SkThreadUtils_win.cpp',
- '<(skia_src_path)/utils/SkThreadUtils_win.h',
- '<(skia_src_path)/utils/SkWhitelistTypefaces.cpp',
-
- #mac
- '<(skia_include_path)/utils/mac/SkCGUtils.h',
- '<(skia_src_path)/utils/mac/SkCreateCGImageRef.cpp',
-
- #windows
- '<(skia_src_path)/utils/win/SkAutoCoInitialize.h',
- '<(skia_src_path)/utils/win/SkAutoCoInitialize.cpp',
- '<(skia_src_path)/utils/win/SkDWrite.h',
- '<(skia_src_path)/utils/win/SkDWrite.cpp',
- '<(skia_src_path)/utils/win/SkDWriteFontFileStream.cpp',
- '<(skia_src_path)/utils/win/SkDWriteFontFileStream.h',
- '<(skia_src_path)/utils/win/SkDWriteGeometrySink.cpp',
- '<(skia_src_path)/utils/win/SkDWriteGeometrySink.h',
- '<(skia_src_path)/utils/win/SkHRESULT.h',
- '<(skia_src_path)/utils/win/SkHRESULT.cpp',
- '<(skia_src_path)/utils/win/SkIStream.h',
- '<(skia_src_path)/utils/win/SkIStream.cpp',
- '<(skia_src_path)/utils/win/SkTScopedComPtr.h',
- '<(skia_src_path)/utils/win/SkWGL.h',
- '<(skia_src_path)/utils/win/SkWGL_win.cpp',
-
- #testing
- '<(skia_src_path)/fonts/SkGScalerContext.cpp',
- '<(skia_src_path)/fonts/SkGScalerContext.h',
- '<(skia_src_path)/fonts/SkRandomScalerContext.cpp',
- '<(skia_src_path)/fonts/SkRandomScalerContext.h',
- '<(skia_src_path)/fonts/SkTestScalerContext.cpp',
- '<(skia_src_path)/fonts/SkTestScalerContext.h',
- ],
-}