diff options
author | caryclark <caryclark@google.com> | 2016-09-06 07:07:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-06 07:07:52 -0700 |
commit | e6088c6063b60f58411936af9c48841131a5e001 (patch) | |
tree | 725341412a6b99b57ea2f8aaa6e15b52bc80f72e | |
parent | 5a3c528f5661a0d5843ecab9567c40c96a9d881e (diff) |
Revert of Move uils and sksl to a common sources GYP file. (patchset #1 id:1 of https://codereview.chromium.org/2302723005/ )
Reason for revert:
The broke the PDFium build. See
https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-PDFium/builds/2094
Original issue's description:
> 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
TBR=mtklein@chromium.org,brettw@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2317683002
-rw-r--r-- | gn/shared_sources.gni | 23 | ||||
-rw-r--r-- | gyp/skia_for_chromium_defines.gypi | 22 | ||||
-rw-r--r-- | gyp/skia_sources.gypi | 136 | ||||
-rw-r--r-- | gyp/sksl.gyp | 8 | ||||
-rw-r--r-- | gyp/sksl.gypi | 22 | ||||
-rw-r--r-- | gyp/skslc.gyp | 8 | ||||
-rw-r--r-- | gyp/utils.gyp | 8 | ||||
-rw-r--r-- | gyp/utils.gypi | 120 |
8 files changed, 192 insertions, 155 deletions
diff --git a/gn/shared_sources.gni b/gn/shared_sources.gni index 9a4af74538..8525883e7c 100644 --- a/gn/shared_sources.gni +++ b/gn/shared_sources.gni @@ -69,14 +69,27 @@ _pdf_gypi = exec_script("gypi_to_gn.py", [ "../gyp/pdf.gypi" ]) skia_pdf_sources = _pdf_gypi.sources -_sources_gypi = exec_script("gypi_to_gn.py", +# SKSL. +_sksl_gypi = exec_script("gypi_to_gn.py", [ - rebase_path("../gyp/skia_sources.gypi"), + rebase_path("../gyp/sksl.gypi"), + "--replace=<(skia_include_path)=$_path_to_include", + "--replace=<(skia_src_path)=$_path_to_src", ], "scope", - [ "../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") + [ "../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 # 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 new file mode 100644 index 0000000000..6ab5cc8e79 --- /dev/null +++ b/gyp/skia_for_chromium_defines.gypi @@ -0,0 +1,22 @@ +# 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 deleted file mode 100644 index 53036527af..0000000000 --- a/gyp/skia_sources.gypi +++ /dev/null @@ -1,136 +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 -# -{ - '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 609ace9ac8..7e0a4f9ea6 100644 --- a/gyp/sksl.gyp +++ b/gyp/sksl.gyp @@ -3,16 +3,14 @@ # 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, - 'sources': [ '<@(sksl_sources)' ], - 'include_dirs': [ '<@(sksl_include_dirs)' ], + 'includes': [ + 'sksl.gypi', + ], 'defines': [ 'SKIA' ], diff --git a/gyp/sksl.gypi b/gyp/sksl.gypi new file mode 100644 index 0000000000..07e3800829 --- /dev/null +++ b/gyp/sksl.gypi @@ -0,0 +1,22 @@ +# 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 5bd6c399b8..6e234932a8 100644 --- a/gyp/skslc.gyp +++ b/gyp/skslc.gyp @@ -6,16 +6,14 @@ 'includes': [ 'apptype_console.gypi', ], - 'variables': { - 'includes': [ 'skia_sources.gypi' ], - }, 'targets': [ { 'target_name': 'skslc', 'type': 'executable', - 'include_dirs': [ '<@(sksl_include_dirs)' ], + 'includes' : [ + 'sksl.gypi', + ], 'sources': [ - '<@(sksl_sources)', '../src/sksl/SkSLMain.cpp', ], 'configurations': { diff --git a/gyp/utils.gyp b/gyp/utils.gyp index 12e7836db3..b6ce7fde1b 100644 --- a/gyp/utils.gyp +++ b/gyp/utils.gyp @@ -4,9 +4,6 @@ # found in the LICENSE file. # Gyp for utils. { - 'variables': { - 'includes': [ 'skia_sources.gypi' ], - }, 'targets': [ { 'target_name': 'utils', @@ -17,6 +14,9 @@ 'core.gyp:*', 'etc1.gyp:libetc1', ], + 'includes': [ + 'utils.gypi', + ], 'include_dirs': [ '../include/effects', '../include/gpu', @@ -33,7 +33,7 @@ '../src/utils/win', ], 'sources': [ - '<@(utils_sources)', # Makes the sources appear in IDEs (but does not modify the build). + 'utils.gypi', # Makes the gypi appear in IDEs (but does not modify the build). ], 'conditions': [ [ 'skia_os == "mac"', { diff --git a/gyp/utils.gypi b/gyp/utils.gypi new file mode 100644 index 0000000000..bf7f797b10 --- /dev/null +++ b/gyp/utils.gypi @@ -0,0 +1,120 @@ +# 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', + ], +} |