Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: skia/BUILD.gn

Issue 2865363002: Compile Skia image encoders (Closed)
Patch Set: Use libpng_config only when necessary Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | skia/ext/skia_encode_image.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//build/config/sanitizers/sanitizers.gni") 7 import("//build/config/sanitizers/sanitizers.gni")
8 import("//printing/features/features.gni") 8 import("//printing/features/features.gni")
9 import("//testing/test.gni") 9 import("//testing/test.gni")
10 import("//third_party/skia/gn/shared_sources.gni") 10 import("//third_party/skia/gn/shared_sources.gni")
(...skipping 14 matching lines...) Expand all
25 25
26 # External-facing config for dependent code. 26 # External-facing config for dependent code.
27 config("skia_config") { 27 config("skia_config") {
28 include_dirs = [ 28 include_dirs = [
29 "config", 29 "config",
30 "ext", 30 "ext",
31 "//third_party/skia/include/c", 31 "//third_party/skia/include/c",
32 "//third_party/skia/include/config", 32 "//third_party/skia/include/config",
33 "//third_party/skia/include/core", 33 "//third_party/skia/include/core",
34 "//third_party/skia/include/effects", 34 "//third_party/skia/include/effects",
35 "//third_party/skia/include/encode",
35 "//third_party/skia/include/images", 36 "//third_party/skia/include/images",
36 "//third_party/skia/include/lazy", 37 "//third_party/skia/include/lazy",
37 "//third_party/skia/include/pathops", 38 "//third_party/skia/include/pathops",
38 "//third_party/skia/include/pdf", 39 "//third_party/skia/include/pdf",
39 "//third_party/skia/include/pipe", 40 "//third_party/skia/include/pipe",
40 "//third_party/skia/include/ports", 41 "//third_party/skia/include/ports",
41 "//third_party/skia/include/utils", 42 "//third_party/skia/include/utils",
42 "//third_party/skia/third_party/vulkan", 43 "//third_party/skia/third_party/vulkan",
43 ] 44 ]
44 45
45 defines = skia_for_chromium_defines 46 defines = skia_for_chromium_defines
47 defines += [
48 "SK_HAS_JPEG_LIBRARY",
49 "SK_HAS_PNG_LIBRARY",
50 "SK_HAS_WEBP_LIBRARY",
51 ]
46 52
47 if (is_win || is_mac) { 53 if (is_win || is_mac) {
48 defines += [ "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) * 0x010 00000) | ((FREETYPE_MINOR) * 0x00010000) | ((FREETYPE_PATCH) * 0x00000100))" ] 54 defines += [ "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) * 0x010 00000) | ((FREETYPE_MINOR) * 0x00010000) | ((FREETYPE_PATCH) * 0x00000100))" ]
49 } 55 }
50 56
51 if (is_component_build) { 57 if (is_component_build) {
52 defines += [ 58 defines += [
53 "SKIA_DLL", 59 "SKIA_DLL",
54 "GR_GL_IGNORE_ES3_MSAA=0", 60 "GR_GL_IGNORE_ES3_MSAA=0",
55 ] 61 ]
(...skipping 26 matching lines...) Expand all
82 } 88 }
83 89
84 if (skia_whitelist_serialized_typefaces) { 90 if (skia_whitelist_serialized_typefaces) {
85 defines += [ "SK_WHITELIST_SERIALIZED_TYPEFACES" ] 91 defines += [ "SK_WHITELIST_SERIALIZED_TYPEFACES" ]
86 } 92 }
87 } 93 }
88 94
89 # Internal-facing config for Skia library code. 95 # Internal-facing config for Skia library code.
90 config("skia_library_config") { 96 config("skia_library_config") {
91 # These include directories are only included for Skia code and are not 97 # These include directories are only included for Skia code and are not
92 # exported to dependents. It's not clear if this is on purpose, but this 98 # exported to dependents.
93 # matches the GYP build.
94 include_dirs = [ 99 include_dirs = [
95 "//third_party/skia/include/private", 100 "//third_party/skia/include/private",
96 "//third_party/skia/include/client/android", 101 "//third_party/skia/include/client/android",
102 "//third_party/skia/src/codec",
97 "//third_party/skia/src/core", 103 "//third_party/skia/src/core",
98 "//third_party/skia/src/effects/gradients", 104 "//third_party/skia/src/effects/gradients",
99 "//third_party/skia/src/image", 105 "//third_party/skia/src/image",
106 "//third_party/skia/src/images",
100 "//third_party/skia/src/opts", 107 "//third_party/skia/src/opts",
101 "//third_party/skia/src/pdf", 108 "//third_party/skia/src/pdf",
102 "//third_party/skia/src/ports", 109 "//third_party/skia/src/ports",
103 "//third_party/skia/src/sfnt", 110 "//third_party/skia/src/sfnt",
104 "//third_party/skia/src/utils", 111 "//third_party/skia/src/utils",
105 "//third_party/skia/src/lazy", 112 "//third_party/skia/src/lazy",
106 ] 113 ]
107 if (is_mac || is_ios) { 114 if (is_mac || is_ios) {
108 include_dirs += [ "//third_party/skia/include/utils/mac" ] 115 include_dirs += [ "//third_party/skia/include/utils/mac" ]
109 } 116 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 "ext/fontmgr_default_linux.h", 218 "ext/fontmgr_default_linux.h",
212 "ext/fontmgr_default_win.cc", 219 "ext/fontmgr_default_win.cc",
213 "ext/fontmgr_default_win.h", 220 "ext/fontmgr_default_win.h",
214 "ext/google_logging.cc", 221 "ext/google_logging.cc",
215 "ext/image_operations.cc", 222 "ext/image_operations.cc",
216 "ext/image_operations.h", 223 "ext/image_operations.h",
217 "ext/opacity_filter_canvas.cc", 224 "ext/opacity_filter_canvas.cc",
218 "ext/opacity_filter_canvas.h", 225 "ext/opacity_filter_canvas.h",
219 "ext/recursive_gaussian_convolution.cc", 226 "ext/recursive_gaussian_convolution.cc",
220 "ext/recursive_gaussian_convolution.h", 227 "ext/recursive_gaussian_convolution.h",
221 "ext/skia_encode_image.cc",
222 "ext/skia_encode_image.h",
223 "ext/skia_histogram.cc", 228 "ext/skia_histogram.cc",
224 "ext/skia_histogram.h", 229 "ext/skia_histogram.h",
225 "ext/skia_memory_dump_provider.cc", 230 "ext/skia_memory_dump_provider.cc",
226 "ext/skia_memory_dump_provider.h", 231 "ext/skia_memory_dump_provider.h",
227 "ext/skia_trace_memory_dump_impl.cc", 232 "ext/skia_trace_memory_dump_impl.cc",
228 "ext/skia_trace_memory_dump_impl.h", 233 "ext/skia_trace_memory_dump_impl.h",
229 "ext/skia_utils_base.cc", 234 "ext/skia_utils_base.cc",
230 "ext/skia_utils_base.h", 235 "ext/skia_utils_base.h",
231 "ext/skia_utils_ios.h", 236 "ext/skia_utils_ios.h",
232 "ext/skia_utils_ios.mm", 237 "ext/skia_utils_ios.mm",
(...skipping 22 matching lines...) Expand all
255 } 260 }
256 261
257 # The imported Skia gni source paths are made absolute by gn. 262 # The imported Skia gni source paths are made absolute by gn.
258 sources += skia_core_sources 263 sources += skia_core_sources
259 sources += skia_effects_sources 264 sources += skia_effects_sources
260 sources += skia_utils_sources 265 sources += skia_utils_sources
261 sources += skia_xps_sources 266 sources += skia_xps_sources
262 sources += [ 267 sources += [
263 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp", 268 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp",
264 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp", 269 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp",
270 "//third_party/skia/src/images/SkImageEncoder.cpp",
271 "//third_party/skia/src/images/SkJPEGWriteUtility.cpp",
272 "//third_party/skia/src/images/SkJpegEncoder.cpp",
273 "//third_party/skia/src/images/SkPngEncoder.cpp",
274 "//third_party/skia/src/images/SkWebpEncoder.cpp",
265 "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp", 275 "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp",
266 "//third_party/skia/src/ports/SkImageGenerator_none.cpp", 276 "//third_party/skia/src/ports/SkImageGenerator_none.cpp",
267 "//third_party/skia/src/ports/SkOSFile_stdio.cpp", 277 "//third_party/skia/src/ports/SkOSFile_stdio.cpp",
268 "//third_party/skia/src/sfnt/SkOTTable_name.cpp", 278 "//third_party/skia/src/sfnt/SkOTTable_name.cpp",
269 "//third_party/skia/src/sfnt/SkOTUtils.cpp", 279 "//third_party/skia/src/sfnt/SkOTUtils.cpp",
270 ] 280 ]
271 281
272 # This and skia_opts are really the same conceptual target so share headers. 282 # This and skia_opts are really the same conceptual target so share headers.
273 allow_circular_includes_from = [ ":skia_opts" ] 283 allow_circular_includes_from = [ ":skia_opts" ]
274 284
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 ] 400 ]
391 } 401 }
392 402
393 if (is_clang && !is_nacl) { 403 if (is_clang && !is_nacl) {
394 # Skia won't compile with some of the more strict clang warnings. 404 # Skia won't compile with some of the more strict clang warnings.
395 # e.g. it does: 405 # e.g. it does:
396 # SkASSERT(!"sk_out_of_memory"); 406 # SkASSERT(!"sk_out_of_memory");
397 configs -= [ "//build/config/clang:extra_warnings" ] 407 configs -= [ "//build/config/clang:extra_warnings" ]
398 } 408 }
399 409
400 configs -= [ "//build/config/compiler:chromium_code" ] 410 #configs -= [ "//build/config/compiler:chromium_code" ]
Elliot Glaysher 2017/05/11 19:40:43 just delete this; don't leave commented out code
msarett1 2017/05/11 20:01:27 Oops, that is left over from my experiments. Putt
401 configs += [ 411 configs += [
402 ":skia_config", 412 ":skia_config",
403 ":skia_library_config", 413 ":skia_library_config",
404 "//build/config/compiler:no_chromium_code", 414 "//build/config/compiler:no_chromium_code",
405 ] 415 ]
406 public_configs = [ ":skia_config" ] 416 public_configs = [ ":skia_config" ]
407 417
408 deps = [ 418 deps = [
409 ":skia_opts", 419 ":skia_opts",
410 "//base", 420 "//base",
411 "//base/third_party/dynamic_annotations", 421 "//base/third_party/dynamic_annotations",
412 "//build/config/freetype", 422 "//build/config/freetype",
423 "//third_party:jpeg",
424 "//third_party/libpng",
425 "//third_party/libwebp",
413 ] 426 ]
414 427
415 if (is_linux) { 428 if (is_linux) {
416 if (use_pango) { 429 if (use_pango) {
417 configs += [ "//build/config/linux/pangocairo" ] 430 configs += [
431 # libpng_config will be included automatically from deps. We do this to
432 # ensure that it is included before the pangocairo path (which also has a png.h).
Elliot Glaysher 2017/05/11 19:40:43 80 cols
msarett1 2017/05/11 20:01:27 Done.
433 "//third_party/libpng:libpng_config",
434 "//build/config/linux/pangocairo",
435 ]
418 } 436 }
419 deps += [ 437 deps += [
420 "//build/linux:fontconfig", 438 "//build/linux:fontconfig",
421 "//third_party/expat", 439 "//third_party/expat",
422 "//third_party/icu:icuuc", 440 "//third_party/icu:icuuc",
423 ] 441 ]
424 } 442 }
425 443
426 if (is_android) { 444 if (is_android) {
427 deps += [ 445 deps += [
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 727
710 deps = [ 728 deps = [
711 ":skia", 729 ":skia",
712 "//base", 730 "//base",
713 "//base/test:test_support", 731 "//base/test:test_support",
714 "//build/config/sanitizers:deps", 732 "//build/config/sanitizers:deps",
715 "//build/win:default_exe_manifest", 733 "//build/win:default_exe_manifest",
716 ] 734 ]
717 } 735 }
718 } 736 }
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | skia/ext/skia_encode_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698