Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
| 7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
| 8 import("//third_party/skia/gn/shared_sources.gni") | 8 import("//third_party/skia/gn/shared_sources.gni") |
| 9 | 9 |
| 10 if (current_cpu == "arm") { | 10 if (current_cpu == "arm") { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 # the OWNERS of skia. | 23 # the OWNERS of skia. |
| 24 | 24 |
| 25 declare_args() { | 25 declare_args() { |
| 26 skia_whitelist_serialized_typefaces = false | 26 skia_whitelist_serialized_typefaces = false |
| 27 | 27 |
| 28 # TODO(crbug.com/607933): Once GYP is no longer supported, port iOS to use | 28 # TODO(crbug.com/607933): Once GYP is no longer supported, port iOS to use |
| 29 # optimised skia. | 29 # optimised skia. |
| 30 skia_build_no_opts = is_ios | 30 skia_build_no_opts = is_ios |
| 31 } | 31 } |
| 32 | 32 |
| 33 # The list of Skia defines that are to be set for chromium. | 33 # This is a place for defines which will hold out Skia changes. |
| 34 gypi_chromium_skia_defines = | 34 # |
| 35 exec_script("//build/gypi_to_gn.py", | 35 # When Skia needs to make a change which will affect Chromium, a define may be |
| 36 [ | 36 # added here, the Skia change made behind this define, then Skia rolled into |
| 37 rebase_path("//skia/chromium_skia_defines.gypi"), | 37 # Chromium. At this point the Chromium side change can be made while also |
| 38 "--replace=<(skia_include_path)=//third_party/skia/include", | 38 # removing the define. After this Skia can remove the code behind the now no |
| 39 "--replace=<(skia_src_path)=//third_party/skia/src", | 39 # longer needed define. |
| 40 ], | 40 # |
| 41 "scope", | 41 # Examples of these sorts of changes are Skia API changes and Skia changes |
| 42 [ "//skia/chromium_skia_defines.gypi" ]) | 42 # which will affect blink baselines. |
| 43 | 43 # |
| 44 # The list of Skia files is kept in skia_gn_files.gypi. Read it. | 44 # The intent is that the defines here are transient. Every effort should be |
| 45 gypi_values = | 45 # made to remove these defines as soon as practical. This is in contrast to |
| 46 exec_script("//build/gypi_to_gn.py", | 46 # defines in SkUserConfig.h which are normally more permanent. |
| 47 [ | 47 chromium_skia_defines = [ "SK_IGNORE_DW_GRAY_FIX" ] |
|
mtklein_C
2016/09/02 18:36:21
If you like I think we can just make line 67
de
| |
| 48 rebase_path("skia_gn_files.gypi"), | |
| 49 "--replace=<(skia_include_path)=//third_party/skia/include", | |
| 50 "--replace=<(skia_src_path)=//third_party/skia/src", | |
| 51 ], | |
| 52 "scope", | |
| 53 [ "skia_gn_files.gypi" ]) | |
| 54 | 48 |
| 55 # External-facing config for dependent code. | 49 # External-facing config for dependent code. |
| 56 config("skia_config") { | 50 config("skia_config") { |
| 57 include_dirs = [ | 51 include_dirs = [ |
| 58 "config", | 52 "config", |
| 59 "ext", | 53 "ext", |
| 60 "//third_party/skia/include/c", | 54 "//third_party/skia/include/c", |
| 61 "//third_party/skia/include/config", | 55 "//third_party/skia/include/config", |
| 62 "//third_party/skia/include/core", | 56 "//third_party/skia/include/core", |
| 63 "//third_party/skia/include/effects", | 57 "//third_party/skia/include/effects", |
| 64 "//third_party/skia/include/images", | 58 "//third_party/skia/include/images", |
| 65 "//third_party/skia/include/lazy", | 59 "//third_party/skia/include/lazy", |
| 66 "//third_party/skia/include/pathops", | 60 "//third_party/skia/include/pathops", |
| 67 "//third_party/skia/include/pdf", | 61 "//third_party/skia/include/pdf", |
| 68 "//third_party/skia/include/pipe", | 62 "//third_party/skia/include/pipe", |
| 69 "//third_party/skia/include/ports", | 63 "//third_party/skia/include/ports", |
| 70 "//third_party/skia/include/utils", | 64 "//third_party/skia/include/utils", |
| 71 ] | 65 ] |
| 72 | 66 |
| 73 defines = gypi_chromium_skia_defines.chromium_skia_defines | 67 defines = chromium_skia_defines |
| 74 defines += skia_for_chromium_defines | 68 defines += skia_for_chromium_defines |
| 75 | 69 |
| 76 defines += [] | 70 defines += [] |
| 77 | 71 |
| 78 if (skia_build_no_opts) { | 72 if (skia_build_no_opts) { |
| 79 defines += [ "SK_BUILD_NO_OPTS" ] | 73 defines += [ "SK_BUILD_NO_OPTS" ] |
| 80 } | 74 } |
| 81 | 75 |
| 82 if (is_component_build) { | 76 if (is_component_build) { |
| 83 defines += [ | 77 defines += [ |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { | 247 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { |
| 254 sources += [ "ext/convolver_SSE2.cc" ] | 248 sources += [ "ext/convolver_SSE2.cc" ] |
| 255 } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { | 249 } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { |
| 256 sources += [ "ext/convolver_mips_dspr2.cc" ] | 250 sources += [ "ext/convolver_mips_dspr2.cc" ] |
| 257 } | 251 } |
| 258 | 252 |
| 259 # The skia gypi values are relative to the skia_dir, so we need to rebase. | 253 # The skia gypi values are relative to the skia_dir, so we need to rebase. |
| 260 sources += skia_core_sources | 254 sources += skia_core_sources |
| 261 sources += skia_effects_sources | 255 sources += skia_effects_sources |
| 262 sources += skia_utils_sources | 256 sources += skia_utils_sources |
| 263 sources += gypi_values.skia_library_sources | 257 sources += [ |
| 258 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp", | |
| 259 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp", | |
| 260 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", | |
| 261 "//third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp", | |
| 262 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", | |
| 263 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", | |
| 264 "//third_party/skia/src/ports/SkFontHost_mac.cpp", | |
| 265 "//third_party/skia/src/ports/SkFontHost_win.cpp", | |
| 266 "//third_party/skia/src/ports/SkFontMgr_FontConfigInterface.cpp", | |
| 267 "//third_party/skia/src/ports/SkFontMgr_FontConfigInterface_factory.cpp", | |
| 268 "//third_party/skia/src/ports/SkFontMgr_android.cpp", | |
| 269 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", | |
| 270 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", | |
| 271 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", | |
| 272 "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp", | |
| 273 "//third_party/skia/src/ports/SkImageEncoder_none.cpp", | |
| 274 "//third_party/skia/src/ports/SkImageGenerator_none.cpp", | |
| 275 "//third_party/skia/src/ports/SkOSFile_posix.cpp", | |
| 276 "//third_party/skia/src/ports/SkOSFile_stdio.cpp", | |
| 277 "//third_party/skia/src/ports/SkOSFile_win.cpp", | |
| 278 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", | |
| 279 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", | |
| 280 "//third_party/skia/src/ports/SkTLS_pthread.cpp", | |
| 281 "//third_party/skia/src/ports/SkTLS_win.cpp", | |
| 282 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", | |
| 283 "//third_party/skia/src/sfnt/SkOTTable_name.cpp", | |
| 284 "//third_party/skia/src/sfnt/SkOTUtils.cpp", | |
| 285 ] | |
| 286 | |
| 287 if (is_mac) { | |
| 288 sources += [ "//third_party/skia/src/utils/mac/SkStream_mac.cpp" ] | |
| 289 } | |
| 264 | 290 |
| 265 # This and skia_opts are really the same conceptual target so share headers. | 291 # This and skia_opts are really the same conceptual target so share headers. |
| 266 allow_circular_includes_from = [ ":skia_opts" ] | 292 allow_circular_includes_from = [ ":skia_opts" ] |
| 267 | 293 |
| 268 if (current_cpu == "arm") { | 294 if (current_cpu == "arm") { |
| 269 sources += [ "//third_party/skia/src/core/SkUtilsArm.cpp" ] | 295 sources += [ "//third_party/skia/src/core/SkUtilsArm.cpp" ] |
| 270 } | 296 } |
| 271 | 297 |
| 272 # GPU | 298 # GPU |
| 273 if (skia_support_gpu) { | 299 if (skia_support_gpu) { |
| 274 sources += skia_gpu_sources | 300 sources += skia_gpu_sources |
| 275 sources += skia_null_gpu_sources | 301 sources += skia_null_gpu_sources |
| 276 } | 302 } |
| 277 | 303 |
| 278 # Remove unused util files include in utils.gypi | 304 # Remove unused util files include in utils.gypi |
| 279 sources -= [ | 305 sources -= [ |
| 280 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", | 306 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", |
| 281 "//third_party/skia/src/utils/SkCamera.cpp", | 307 "//third_party/skia/src/utils/SkCamera.cpp", |
| 282 "//third_party/skia/src/utils/SkDumpCanvas.cpp", | 308 "//third_party/skia/src/utils/SkDumpCanvas.cpp", |
| 283 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", | 309 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", |
| 284 "//third_party/skia/src/utils/SkInterpolator.cpp", | 310 "//third_party/skia/src/utils/SkInterpolator.cpp", |
| 285 "//third_party/skia/src/utils/SkLayer.cpp", | 311 "//third_party/skia/src/utils/SkLayer.cpp", |
| 286 "//third_party/skia/src/utils/SkMeshUtils.cpp", | 312 "//third_party/skia/src/utils/SkMeshUtils.cpp", |
| 287 "//third_party/skia/src/utils/SkOSFile.cpp", | 313 "//third_party/skia/src/utils/SkOSFile.cpp", |
| 288 "//third_party/skia/src/utils/SkParsePath.cpp", | 314 "//third_party/skia/src/utils/SkParsePath.cpp", |
| 289 | 315 |
| 290 #testing | 316 # Testing. |
| 291 "//third_party/skia/src/fonts/SkGScalerContext.cpp", | 317 "//third_party/skia/src/fonts/SkGScalerContext.cpp", |
| 292 ] | 318 ] |
| 293 | 319 |
| 294 if (is_win) { | 320 if (is_win) { |
| 295 sources -= [ | 321 sources -= [ |
| 296 # Keeping _win.cpp | 322 # Keeping _win.cpp |
| 297 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", | 323 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", |
| 298 ] | 324 ] |
| 299 } else { | 325 } else { |
| 300 sources -= [ | 326 sources -= [ |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 696 | 722 |
| 697 deps = [ | 723 deps = [ |
| 698 ":skia", | 724 ":skia", |
| 699 "//base", | 725 "//base", |
| 700 "//base/test:test_support", | 726 "//base/test:test_support", |
| 701 "//build/config/sanitizers:deps", | 727 "//build/config/sanitizers:deps", |
| 702 "//build/win:default_exe_manifest", | 728 "//build/win:default_exe_manifest", |
| 703 ] | 729 ] |
| 704 } | 730 } |
| 705 } | 731 } |
| OLD | NEW |