9e8a594905
Bug: chromium:807324 Though these pngs are technically incorrect, many such PNGs exist, and they are supported in Chromium. Ensure that users of SkCodec (e.g. Android, Flutter) display them as well. Change-Id: I2f1e573b4b7039cea81f96397cc0aa4cbc9461c3 Reviewed-on: https://skia-review.googlesource.com/111082 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
declare_args() {
|
|
skia_use_system_libpng = is_official_build
|
|
}
|
|
|
|
import("../third_party.gni")
|
|
|
|
if (skia_use_system_libpng) {
|
|
system("libpng") {
|
|
libs = [ "png" ]
|
|
}
|
|
} else {
|
|
third_party("libpng") {
|
|
public_include_dirs = [
|
|
".",
|
|
"../externals/libpng",
|
|
]
|
|
|
|
defines = [ "PNG_SET_OPTION_SUPPORTED" ]
|
|
deps = [
|
|
"//third_party/zlib",
|
|
]
|
|
sources = [
|
|
"../externals/libpng/png.c",
|
|
"../externals/libpng/pngerror.c",
|
|
"../externals/libpng/pngget.c",
|
|
"../externals/libpng/pngmem.c",
|
|
"../externals/libpng/pngpread.c",
|
|
"../externals/libpng/pngread.c",
|
|
"../externals/libpng/pngrio.c",
|
|
"../externals/libpng/pngrtran.c",
|
|
"../externals/libpng/pngrutil.c",
|
|
"../externals/libpng/pngset.c",
|
|
"../externals/libpng/pngtrans.c",
|
|
"../externals/libpng/pngwio.c",
|
|
"../externals/libpng/pngwrite.c",
|
|
"../externals/libpng/pngwtran.c",
|
|
"../externals/libpng/pngwutil.c",
|
|
]
|
|
|
|
if (current_cpu == "arm" || current_cpu == "arm64") {
|
|
sources += [
|
|
"../externals/libpng/arm/arm_init.c",
|
|
"../externals/libpng/arm/filter_neon_intrinsics.c",
|
|
]
|
|
}
|
|
|
|
if (current_cpu == "x86" || current_cpu == "x64") {
|
|
defines += [ "PNG_INTEL_SSE" ]
|
|
sources += [
|
|
"../externals/libpng/intel/filter_sse2_intrinsics.c",
|
|
"../externals/libpng/intel/intel_init.c",
|
|
]
|
|
}
|
|
}
|
|
}
|