OLD | NEW |
1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import("gn/shared_sources.gni") | 6 import("gn/shared_sources.gni") |
7 | 7 |
8 declare_args() { | 8 declare_args() { |
9 skia_enable_tools = !is_fuchsia && !is_component_build | 9 skia_enable_tools = !is_fuchsia && !is_component_build |
10 | 10 |
11 skia_use_expat = true | 11 skia_use_expat = true |
12 skia_use_fontconfig = is_linux | 12 skia_use_fontconfig = is_linux |
13 skia_use_freetype = is_android || is_fuchsia || is_linux | 13 skia_use_freetype = is_android || is_fuchsia || is_linux |
14 skia_use_giflib = !is_fuchsia | 14 skia_use_giflib = !is_fuchsia |
15 skia_use_libjpeg_turbo = true | 15 skia_use_libjpeg_turbo = true |
16 skia_use_libpng = true | 16 skia_use_libpng = true |
17 skia_use_libwebp = !is_fuchsia | 17 skia_use_libwebp = !is_fuchsia |
18 skia_use_sfntly = !is_fuchsia | 18 skia_use_sfntly = !is_fuchsia |
19 skia_use_vulkan = false | 19 skia_use_vulkan = false |
20 skia_use_zlib = true | 20 skia_use_zlib = true |
| 21 |
| 22 skia_enable_android_framework_defines = false |
21 } | 23 } |
22 | 24 |
23 fontmgr_android_enabled = skia_use_expat && skia_use_freetype | 25 fontmgr_android_enabled = skia_use_expat && skia_use_freetype |
24 | 26 |
25 skia_public_includes = [ | 27 skia_public_includes = [ |
26 "include/android", | 28 "include/android", |
27 "include/c", | 29 "include/c", |
28 "include/codec", | 30 "include/codec", |
29 "include/config", | 31 "include/config", |
30 "include/core", | 32 "include/core", |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 "sources_when_disabled", | 217 "sources_when_disabled", |
216 ]) | 218 ]) |
217 if (defined(invoker.sources_when_disabled)) { | 219 if (defined(invoker.sources_when_disabled)) { |
218 sources = invoker.sources_when_disabled | 220 sources = invoker.sources_when_disabled |
219 } | 221 } |
220 configs += skia_library_configs | 222 configs += skia_library_configs |
221 } | 223 } |
222 } | 224 } |
223 } | 225 } |
224 | 226 |
| 227 optional("android_framework_defines") { |
| 228 enabled = skia_enable_android_framework_defines |
| 229 public_defines = skia_android_framework_defines |
| 230 } |
| 231 |
225 optional("fontmgr_android") { | 232 optional("fontmgr_android") { |
226 enabled = fontmgr_android_enabled | 233 enabled = fontmgr_android_enabled |
227 | 234 |
228 deps = [ | 235 deps = [ |
229 "//third_party/expat", | 236 "//third_party/expat", |
230 "//third_party/freetype2", | 237 "//third_party/freetype2", |
231 ] | 238 ] |
232 sources = [ | 239 sources = [ |
233 "src/ports/SkFontMgr_android.cpp", | 240 "src/ports/SkFontMgr_android.cpp", |
234 "src/ports/SkFontMgr_android_factory.cpp", | 241 "src/ports/SkFontMgr_android_factory.cpp", |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 "src/xml/SkXMLParser.cpp", | 384 "src/xml/SkXMLParser.cpp", |
378 "src/xml/SkXMLWriter.cpp", | 385 "src/xml/SkXMLWriter.cpp", |
379 ] | 386 ] |
380 } | 387 } |
381 | 388 |
382 component("skia") { | 389 component("skia") { |
383 public_configs = [ ":skia_public" ] | 390 public_configs = [ ":skia_public" ] |
384 configs += skia_library_configs | 391 configs += skia_library_configs |
385 | 392 |
386 deps = [ | 393 deps = [ |
| 394 ":android_framework_defines", |
387 ":arm64", | 395 ":arm64", |
388 ":armv7", | 396 ":armv7", |
389 ":avx", | 397 ":avx", |
390 ":crc32", | 398 ":crc32", |
391 ":dsp", | 399 ":dsp", |
392 ":fontmgr_android", | 400 ":fontmgr_android", |
393 ":fontmgr_custom", | 401 ":fontmgr_custom", |
394 ":fontmgr_fontconfig", | 402 ":fontmgr_fontconfig", |
395 ":fontmgr_fuchsia", | 403 ":fontmgr_fuchsia", |
396 ":gif", | 404 ":gif", |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 sources = [ | 847 sources = [ |
840 "tools/SkShaper_primitive.cpp", | 848 "tools/SkShaper_primitive.cpp", |
841 "tools/using_skia_and_harfbuzz.cpp", | 849 "tools/using_skia_and_harfbuzz.cpp", |
842 ] | 850 ] |
843 deps = [ | 851 deps = [ |
844 ":skia", | 852 ":skia", |
845 ] | 853 ] |
846 testonly = true | 854 testonly = true |
847 } | 855 } |
848 } | 856 } |
OLD | NEW |