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

Side by Side Diff: BUILD.gn

Issue 2270693004: GN: make libwebp an optional dependency (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nicer Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 declare_args() { 6 declare_args() {
7 skia_use_libwebp = !is_fuchsia
7 } 8 }
8 9
9 skia_public_includes = [ 10 skia_public_includes = [
10 "include/android", 11 "include/android",
11 "include/c", 12 "include/c",
12 "include/codec", 13 "include/codec",
13 "include/config", 14 "include/config",
14 "include/core", 15 "include/core",
15 "include/effects", 16 "include/effects",
16 "include/gpu", 17 "include/gpu",
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 "third_party/etc1", 58 "third_party/etc1",
58 "third_party/ktx", 59 "third_party/ktx",
59 ] 60 ]
60 61
61 defines = [ 62 defines = [
62 "SK_GAMMA_APPLY_TO_A8", 63 "SK_GAMMA_APPLY_TO_A8",
63 64
64 "SK_HAS_GIF_LIBRARY", 65 "SK_HAS_GIF_LIBRARY",
65 "SK_HAS_JPEG_LIBRARY", 66 "SK_HAS_JPEG_LIBRARY",
66 "SK_HAS_PNG_LIBRARY", 67 "SK_HAS_PNG_LIBRARY",
67 "SK_HAS_WEBP_LIBRARY",
68 68
69 # TODO(halcanary): make this the default; this is the value Android uses. 69 # TODO(halcanary): make this the default; this is the value Android uses.
70 "SK_SFNTLY_SUBSETTER=\"sample/chromium/font_subsetter.h\"", 70 "SK_SFNTLY_SUBSETTER=\"sample/chromium/font_subsetter.h\"",
71 71
72 "TURBO_HAS_565", 72 "TURBO_HAS_565",
73 "TURBO_HAS_CROP", 73 "TURBO_HAS_CROP",
74 "TURBO_HAS_SKIP", 74 "TURBO_HAS_SKIP",
75 ] 75 ]
76 if (is_linux) { 76 if (is_linux) {
77 defines += [ "SK_SAMPLES_FOR_X" ] 77 defines += [ "SK_SAMPLES_FOR_X" ]
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 cflags = [ "-msse4.2" ] 176 cflags = [ "-msse4.2" ]
177 } 177 }
178 178
179 source_set("opts_avx") { 179 source_set("opts_avx") {
180 configs += skia_library_configs 180 configs += skia_library_configs
181 sources = opts_gypi.avx_sources 181 sources = opts_gypi.avx_sources
182 cflags = [ "-mavx" ] 182 cflags = [ "-mavx" ]
183 } 183 }
184 } 184 }
185 185
186 if (skia_use_libwebp) {
187 config("webp_config") {
188 defines = [ "SK_HAS_WEBP_LIBRARY" ]
189 }
190 source_set("webp") {
191 configs += skia_library_configs
192 all_dependent_configs = [ ":webp_config" ]
193 deps = [
194 "//third_party/libwebp",
195 ]
196 sources = [
197 "src/codec/SkWebpAdapterCodec.cpp",
198 "src/codec/SkWebpCodec.cpp",
199 "src/images/SkWEBPImageEncoder.cpp",
200 ]
201 }
202 } else {
203 source_set("webp") {
204 }
205 }
206
186 component("skia") { 207 component("skia") {
187 public_configs = [ ":skia_public" ] 208 public_configs = [ ":skia_public" ]
188 configs += skia_library_configs 209 configs += skia_library_configs
189 210
190 deps = [ 211 deps = [
212 ":webp",
191 "//third_party/expat", 213 "//third_party/expat",
192 "//third_party/giflib", 214 "//third_party/giflib",
193 "//third_party/libjpeg-turbo:libjpeg", 215 "//third_party/libjpeg-turbo:libjpeg",
194 "//third_party/libpng", 216 "//third_party/libpng",
195 "//third_party/libwebp",
196 "//third_party/sfntly", 217 "//third_party/sfntly",
197 "//third_party/zlib", 218 "//third_party/zlib",
198 ] 219 ]
199 if (is_x86) { 220 if (is_x86) {
200 deps += [ 221 deps += [
201 ":opts_avx", 222 ":opts_avx",
202 ":opts_sse2", 223 ":opts_sse2",
203 ":opts_sse41", 224 ":opts_sse41",
204 ":opts_sse42", 225 ":opts_sse42",
205 ":opts_ssse3", 226 ":opts_ssse3",
(...skipping 27 matching lines...) Expand all
233 "src/codec/SkJpegCodec.cpp", 254 "src/codec/SkJpegCodec.cpp",
234 "src/codec/SkJpegDecoderMgr.cpp", 255 "src/codec/SkJpegDecoderMgr.cpp",
235 "src/codec/SkJpegUtility.cpp", 256 "src/codec/SkJpegUtility.cpp",
236 "src/codec/SkMaskSwizzler.cpp", 257 "src/codec/SkMaskSwizzler.cpp",
237 "src/codec/SkMasks.cpp", 258 "src/codec/SkMasks.cpp",
238 "src/codec/SkPngCodec.cpp", 259 "src/codec/SkPngCodec.cpp",
239 "src/codec/SkSampledCodec.cpp", 260 "src/codec/SkSampledCodec.cpp",
240 "src/codec/SkSampler.cpp", 261 "src/codec/SkSampler.cpp",
241 "src/codec/SkSwizzler.cpp", 262 "src/codec/SkSwizzler.cpp",
242 "src/codec/SkWbmpCodec.cpp", 263 "src/codec/SkWbmpCodec.cpp",
243 "src/codec/SkWebpAdapterCodec.cpp",
244 "src/codec/SkWebpCodec.cpp",
245 "src/images/SkImageEncoder.cpp", 264 "src/images/SkImageEncoder.cpp",
246 "src/images/SkImageEncoder_Factory.cpp", 265 "src/images/SkImageEncoder_Factory.cpp",
247 "src/images/SkJPEGImageEncoder.cpp", 266 "src/images/SkJPEGImageEncoder.cpp",
248 "src/images/SkJPEGWriteUtility.cpp", 267 "src/images/SkJPEGWriteUtility.cpp",
249 "src/images/SkKTXImageEncoder.cpp", 268 "src/images/SkKTXImageEncoder.cpp",
250 "src/images/SkPNGImageEncoder.cpp", 269 "src/images/SkPNGImageEncoder.cpp",
251 "src/images/SkWEBPImageEncoder.cpp",
252 "src/ports/SkDiscardableMemory_none.cpp", 270 "src/ports/SkDiscardableMemory_none.cpp",
253 "src/ports/SkGlobalInitialization_default.cpp", 271 "src/ports/SkGlobalInitialization_default.cpp",
254 "src/ports/SkImageGenerator_skia.cpp", 272 "src/ports/SkImageGenerator_skia.cpp",
255 "src/ports/SkMemory_malloc.cpp", 273 "src/ports/SkMemory_malloc.cpp",
256 "src/ports/SkOSFile_stdio.cpp", 274 "src/ports/SkOSFile_stdio.cpp",
257 "src/sfnt/SkOTTable_name.cpp", 275 "src/sfnt/SkOTTable_name.cpp",
258 "src/sfnt/SkOTUtils.cpp", 276 "src/sfnt/SkOTUtils.cpp",
259 "src/svg/SkSVGCanvas.cpp", 277 "src/svg/SkSVGCanvas.cpp",
260 "src/svg/SkSVGDevice.cpp", 278 "src/svg/SkSVGDevice.cpp",
261 "src/utils/mac/SkStream_mac.cpp", 279 "src/utils/mac/SkStream_mac.cpp",
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 "tools/SkShaper_harfbuzz.cpp", 629 "tools/SkShaper_harfbuzz.cpp",
612 "tools/using_skia_and_harfbuzz.cpp", 630 "tools/using_skia_and_harfbuzz.cpp",
613 ] 631 ]
614 deps = [ 632 deps = [
615 ":skia", 633 ":skia",
616 "//third_party/harfbuzz", 634 "//third_party/harfbuzz",
617 ] 635 ]
618 testonly = true 636 testonly = true
619 } 637 }
620 } 638 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698