d23341bb5e
I was profiling and remembered GN hasn't turned on much CPU-specific code. I looked at zlib, then libpng, then libjpeg-turbo: - zlib was easy but not useful. No routine we use in decoding changes significantly. - libpng was easy and useful, and we were already using NEON filters on ARM. - libjpeg-turbo requires yasm and is annoying. BUG=skia:5875 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4531 Change-Id: Ie072a457da41ee6538eebacb5eb5dbe5a6eb585e Reviewed-on: https://skia-review.googlesource.com/4531 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
58 lines
1.1 KiB
Plaintext
58 lines
1.1 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 = false
|
|
}
|
|
|
|
import("../third_party.gni")
|
|
|
|
if (skia_use_system_libpng) {
|
|
system("libpng") {
|
|
libs = [ "png" ]
|
|
}
|
|
} else {
|
|
third_party("libpng") {
|
|
public_include_dirs = [ "." ]
|
|
|
|
defines = []
|
|
deps = [
|
|
"//third_party/zlib",
|
|
]
|
|
sources = [
|
|
"png.c",
|
|
"pngerror.c",
|
|
"pngget.c",
|
|
"pngmem.c",
|
|
"pngpread.c",
|
|
"pngread.c",
|
|
"pngrio.c",
|
|
"pngrtran.c",
|
|
"pngrutil.c",
|
|
"pngset.c",
|
|
"pngtrans.c",
|
|
"pngwio.c",
|
|
"pngwrite.c",
|
|
"pngwtran.c",
|
|
"pngwutil.c",
|
|
]
|
|
|
|
if (current_cpu == "arm" || current_cpu == "arm64") {
|
|
sources += [
|
|
"arm/arm_init.c",
|
|
"arm/filter_neon_intrinsics.c",
|
|
]
|
|
}
|
|
|
|
if (current_cpu == "x86" || current_cpu == "x64") {
|
|
defines += [ "PNG_INTEL_SSE" ]
|
|
sources += [
|
|
"contrib/intel/filter_sse2_intrinsics.c",
|
|
"contrib/intel/intel_init.c",
|
|
]
|
|
}
|
|
}
|
|
}
|