c13cd6479d
This is a reland of ecac712bec
Changes (best viewed comparing PS1 to latest)
- Use emsdk 3.1.3 which includes important bug fixes
- Remove unnecessary steps in compile.sh
- Fix use of various gn args.
- Avoid conflicts with Flutter's GN symbols
- Add/update docs
- Make activate-emsdk script compatible with our infra.
Original change's description:
> Build CanvasKit using GN/Ninja
>
> Build with
>
> ./bin/gn gen out/wasm_debug '--args=target_cpu="wasm"'
>
> or
>
> ./bin/gn gen out/wasm_release '--args=target_cpu="wasm" is_debug=false'
>
> Change-Id: Ib74586bf8397d57064a3899eaa6da76f9bce9049
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502036
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I601712a8953c2799fa029e782e097905b95e6b59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507717
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
60 lines
1.6 KiB
Plaintext
60 lines
1.6 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 && !is_wasm
|
|
}
|
|
|
|
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",
|
|
"../externals/libpng/arm/palette_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",
|
|
]
|
|
}
|
|
}
|
|
}
|