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

Unified Diff: skia/BUILD.gn

Issue 2865363002: Compile Skia image encoders (Closed)
Patch Set: Fix ios and win 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/BUILD.gn
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 97b0a7108a35c3d9a903ac837ac7be2e47fff379..9d39d53868cdd53ffaffc7620f9ef0cf72fbc13d 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -32,6 +32,7 @@ config("skia_config") {
"//third_party/skia/include/config",
"//third_party/skia/include/core",
"//third_party/skia/include/effects",
+ "//third_party/skia/include/encode",
"//third_party/skia/include/images",
"//third_party/skia/include/lazy",
"//third_party/skia/include/pathops",
@@ -43,6 +44,14 @@ config("skia_config") {
]
defines = skia_for_chromium_defines
+ defines += [
+ "SK_HAS_PNG_LIBRARY",
+ "SK_HAS_WEBP_LIBRARY",
+ ]
+
+ if (!is_ios) {
+ defines += [ "SK_HAS_JPEG_LIBRARY" ]
+ }
if (is_win || is_mac) {
defines += [ "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) * 0x01000000) | ((FREETYPE_MINOR) * 0x00010000) | ((FREETYPE_PATCH) * 0x00000100))" ]
@@ -89,14 +98,15 @@ config("skia_config") {
# Internal-facing config for Skia library code.
config("skia_library_config") {
# These include directories are only included for Skia code and are not
- # exported to dependents. It's not clear if this is on purpose, but this
- # matches the GYP build.
+ # exported to dependents.
include_dirs = [
"//third_party/skia/include/private",
"//third_party/skia/include/client/android",
+ "//third_party/skia/src/codec",
"//third_party/skia/src/core",
"//third_party/skia/src/effects/gradients",
"//third_party/skia/src/image",
+ "//third_party/skia/src/images",
"//third_party/skia/src/opts",
"//third_party/skia/src/pdf",
"//third_party/skia/src/ports",
@@ -218,8 +228,6 @@ component("skia") {
"ext/opacity_filter_canvas.h",
"ext/recursive_gaussian_convolution.cc",
"ext/recursive_gaussian_convolution.h",
- "ext/skia_encode_image.cc",
- "ext/skia_encode_image.h",
"ext/skia_histogram.cc",
"ext/skia_histogram.h",
"ext/skia_memory_dump_provider.cc",
@@ -262,6 +270,11 @@ component("skia") {
sources += [
"//third_party/skia/src/fonts/SkFontMgr_indirect.cpp",
"//third_party/skia/src/fonts/SkRemotableFontMgr.cpp",
+ "//third_party/skia/src/images/SkImageEncoder.cpp",
+ "//third_party/skia/src/images/SkJPEGWriteUtility.cpp",
+ "//third_party/skia/src/images/SkJpegEncoder.cpp",
+ "//third_party/skia/src/images/SkPngEncoder.cpp",
+ "//third_party/skia/src/images/SkWebpEncoder.cpp",
"//third_party/skia/src/ports/SkGlobalInitialization_default.cpp",
"//third_party/skia/src/ports/SkImageGenerator_none.cpp",
"//third_party/skia/src/ports/SkOSFile_stdio.cpp",
@@ -410,11 +423,28 @@ component("skia") {
"//base",
"//base/third_party/dynamic_annotations",
"//build/config/freetype",
+ "//third_party:jpeg",
+ "//third_party/libpng",
+ "//third_party/libwebp",
]
+ if (is_ios) {
+ sources -= [
+ "//third_party/skia/src/images/SkJPEGWriteUtility.cpp",
+ "//third_party/skia/src/images/SkJpegEncoder.cpp",
+ ]
+ deps -= [ "//third_party:jpeg" ]
+ }
+
if (is_linux) {
if (use_pango) {
- configs += [ "//build/config/linux/pangocairo" ]
+ configs += [
+ # libpng_config will be included automatically from deps. We do this
+ # to ensure that it is included before the pangocairo path (which also
+ # has a png.h).
+ "//third_party/libpng:libpng_config",
+ "//build/config/linux/pangocairo",
+ ]
}
deps += [
"//build/linux:fontconfig",
« 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