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. | |
34 gypi_chromium_skia_defines = | |
35 exec_script("//build/gypi_to_gn.py", | |
36 [ | |
37 rebase_path("//skia/chromium_skia_defines.gypi"), | |
38 "--replace=<(skia_include_path)=//third_party/skia/include", | |
39 "--replace=<(skia_src_path)=//third_party/skia/src", | |
40 ], | |
41 "scope", | |
42 [ "//skia/chromium_skia_defines.gypi" ]) | |
43 | |
44 # The list of Skia files is kept in skia_gn_files.gypi. Read it. | |
45 gypi_values = | |
46 exec_script("//build/gypi_to_gn.py", | |
47 [ | |
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 | |
55 # External-facing config for dependent code. | 33 # External-facing config for dependent code. |
56 config("skia_config") { | 34 config("skia_config") { |
57 include_dirs = [ | 35 include_dirs = [ |
58 "config", | 36 "config", |
59 "ext", | 37 "ext", |
60 "//third_party/skia/include/c", | 38 "//third_party/skia/include/c", |
61 "//third_party/skia/include/config", | 39 "//third_party/skia/include/config", |
62 "//third_party/skia/include/core", | 40 "//third_party/skia/include/core", |
63 "//third_party/skia/include/effects", | 41 "//third_party/skia/include/effects", |
64 "//third_party/skia/include/images", | 42 "//third_party/skia/include/images", |
65 "//third_party/skia/include/lazy", | 43 "//third_party/skia/include/lazy", |
66 "//third_party/skia/include/pathops", | 44 "//third_party/skia/include/pathops", |
67 "//third_party/skia/include/pdf", | 45 "//third_party/skia/include/pdf", |
68 "//third_party/skia/include/pipe", | 46 "//third_party/skia/include/pipe", |
69 "//third_party/skia/include/ports", | 47 "//third_party/skia/include/ports", |
70 "//third_party/skia/include/utils", | 48 "//third_party/skia/include/utils", |
71 ] | 49 ] |
72 | 50 |
73 defines = gypi_chromium_skia_defines.chromium_skia_defines | 51 defines = [ "SK_IGNORE_DW_GRAY_FIX" ] |
74 defines += skia_for_chromium_defines | 52 defines += skia_for_chromium_defines |
75 | 53 |
76 defines += [] | 54 defines += [] |
77 | 55 |
78 if (skia_build_no_opts) { | 56 if (skia_build_no_opts) { |
79 defines += [ "SK_BUILD_NO_OPTS" ] | 57 defines += [ "SK_BUILD_NO_OPTS" ] |
80 } | 58 } |
81 | 59 |
82 if (is_component_build) { | 60 if (is_component_build) { |
83 defines += [ | 61 defines += [ |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { | 231 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { |
254 sources += [ "ext/convolver_SSE2.cc" ] | 232 sources += [ "ext/convolver_SSE2.cc" ] |
255 } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { | 233 } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { |
256 sources += [ "ext/convolver_mips_dspr2.cc" ] | 234 sources += [ "ext/convolver_mips_dspr2.cc" ] |
257 } | 235 } |
258 | 236 |
259 # The skia gypi values are relative to the skia_dir, so we need to rebase. | 237 # The skia gypi values are relative to the skia_dir, so we need to rebase. |
260 sources += skia_core_sources | 238 sources += skia_core_sources |
261 sources += skia_effects_sources | 239 sources += skia_effects_sources |
262 sources += skia_utils_sources | 240 sources += skia_utils_sources |
263 sources += gypi_values.skia_library_sources | 241 sources += [ |
| 242 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp", |
| 243 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp", |
| 244 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", |
| 245 "//third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 246 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", |
| 247 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", |
| 248 "//third_party/skia/src/ports/SkFontHost_mac.cpp", |
| 249 "//third_party/skia/src/ports/SkFontHost_win.cpp", |
| 250 "//third_party/skia/src/ports/SkFontMgr_FontConfigInterface.cpp", |
| 251 "//third_party/skia/src/ports/SkFontMgr_FontConfigInterface_factory.cpp", |
| 252 "//third_party/skia/src/ports/SkFontMgr_android.cpp", |
| 253 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", |
| 254 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", |
| 255 "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp", |
| 256 "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp", |
| 257 "//third_party/skia/src/ports/SkImageEncoder_none.cpp", |
| 258 "//third_party/skia/src/ports/SkImageGenerator_none.cpp", |
| 259 "//third_party/skia/src/ports/SkOSFile_posix.cpp", |
| 260 "//third_party/skia/src/ports/SkOSFile_stdio.cpp", |
| 261 "//third_party/skia/src/ports/SkOSFile_win.cpp", |
| 262 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", |
| 263 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", |
| 264 "//third_party/skia/src/ports/SkTLS_pthread.cpp", |
| 265 "//third_party/skia/src/ports/SkTLS_win.cpp", |
| 266 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", |
| 267 "//third_party/skia/src/sfnt/SkOTTable_name.cpp", |
| 268 "//third_party/skia/src/sfnt/SkOTUtils.cpp", |
| 269 ] |
| 270 |
| 271 if (is_mac) { |
| 272 sources += [ "//third_party/skia/src/utils/mac/SkStream_mac.cpp" ] |
| 273 } |
264 | 274 |
265 # This and skia_opts are really the same conceptual target so share headers. | 275 # This and skia_opts are really the same conceptual target so share headers. |
266 allow_circular_includes_from = [ ":skia_opts" ] | 276 allow_circular_includes_from = [ ":skia_opts" ] |
267 | 277 |
268 if (current_cpu == "arm") { | 278 if (current_cpu == "arm") { |
269 sources += [ "//third_party/skia/src/core/SkUtilsArm.cpp" ] | 279 sources += [ "//third_party/skia/src/core/SkUtilsArm.cpp" ] |
270 } | 280 } |
271 | 281 |
272 # GPU | 282 # GPU |
273 if (skia_support_gpu) { | 283 if (skia_support_gpu) { |
274 sources += skia_gpu_sources | 284 sources += skia_gpu_sources |
275 sources += skia_null_gpu_sources | 285 sources += skia_null_gpu_sources |
276 } | 286 } |
277 | 287 |
278 # Remove unused util files include in utils.gypi | 288 # Remove unused util files include in utils.gypi |
279 sources -= [ | 289 sources -= [ |
280 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", | 290 "//third_party/skia/src/utils/SkBoundaryPatch.cpp", |
281 "//third_party/skia/src/utils/SkCamera.cpp", | 291 "//third_party/skia/src/utils/SkCamera.cpp", |
282 "//third_party/skia/src/utils/SkDumpCanvas.cpp", | 292 "//third_party/skia/src/utils/SkDumpCanvas.cpp", |
283 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", | 293 "//third_party/skia/src/utils/SkFrontBufferedStream.cpp", |
284 "//third_party/skia/src/utils/SkInterpolator.cpp", | 294 "//third_party/skia/src/utils/SkInterpolator.cpp", |
285 "//third_party/skia/src/utils/SkLayer.cpp", | 295 "//third_party/skia/src/utils/SkLayer.cpp", |
286 "//third_party/skia/src/utils/SkMeshUtils.cpp", | 296 "//third_party/skia/src/utils/SkMeshUtils.cpp", |
287 "//third_party/skia/src/utils/SkOSFile.cpp", | 297 "//third_party/skia/src/utils/SkOSFile.cpp", |
288 "//third_party/skia/src/utils/SkParsePath.cpp", | 298 "//third_party/skia/src/utils/SkParsePath.cpp", |
289 | 299 |
290 #testing | 300 # Testing. |
291 "//third_party/skia/src/fonts/SkGScalerContext.cpp", | 301 "//third_party/skia/src/fonts/SkGScalerContext.cpp", |
292 ] | 302 ] |
293 | 303 |
294 if (is_win) { | 304 if (is_win) { |
295 sources -= [ | 305 sources -= [ |
296 # Keeping _win.cpp | 306 # Keeping _win.cpp |
297 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", | 307 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", |
298 ] | 308 ] |
299 } else { | 309 } else { |
300 sources -= [ | 310 sources -= [ |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 | 706 |
697 deps = [ | 707 deps = [ |
698 ":skia", | 708 ":skia", |
699 "//base", | 709 "//base", |
700 "//base/test:test_support", | 710 "//base/test:test_support", |
701 "//build/config/sanitizers:deps", | 711 "//build/config/sanitizers:deps", |
702 "//build/win:default_exe_manifest", | 712 "//build/win:default_exe_manifest", |
703 ] | 713 ] |
704 } | 714 } |
705 } | 715 } |
OLD | NEW |