GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
# Copyright 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2017-07-13 19:50:03 +00:00
|
|
|
import("gn/flutter_defines.gni")
|
2016-09-12 23:51:58 +00:00
|
|
|
import("gn/shared_sources.gni")
|
2016-09-01 21:24:39 +00:00
|
|
|
|
2017-04-17 20:36:39 +00:00
|
|
|
if (is_fuchsia) {
|
|
|
|
import("//build/vulkan/config.gni")
|
|
|
|
}
|
|
|
|
|
2017-03-03 15:55:02 +00:00
|
|
|
if (!defined(is_skia_standalone)) {
|
|
|
|
is_skia_standalone = false
|
|
|
|
}
|
|
|
|
is_skia_dev_build = is_skia_standalone && !is_official_build
|
|
|
|
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
declare_args() {
|
2016-11-14 14:53:13 +00:00
|
|
|
skia_use_angle = false
|
2017-03-29 15:19:01 +00:00
|
|
|
skia_use_egl = false
|
2016-08-24 16:55:56 +00:00
|
|
|
skia_use_expat = true
|
2016-08-29 20:26:14 +00:00
|
|
|
skia_use_fontconfig = is_linux
|
2016-09-12 22:15:44 +00:00
|
|
|
skia_use_freetype = is_android || is_fuchsia || is_linux
|
2016-11-03 18:06:31 +00:00
|
|
|
skia_use_icu = !is_fuchsia && !is_ios && !is_win # TODO: Windows
|
2016-08-24 16:55:56 +00:00
|
|
|
skia_use_libjpeg_turbo = true
|
|
|
|
skia_use_libpng = true
|
2016-08-23 14:38:09 +00:00
|
|
|
skia_use_libwebp = !is_fuchsia
|
2018-01-08 20:49:09 +00:00
|
|
|
skia_use_lua = is_skia_dev_build && !is_ios
|
2016-11-01 15:46:10 +00:00
|
|
|
skia_use_piex = !is_win
|
2016-08-24 16:55:56 +00:00
|
|
|
skia_use_zlib = true
|
2017-07-05 20:49:36 +00:00
|
|
|
skia_use_metal = false
|
2017-10-20 16:33:53 +00:00
|
|
|
skia_use_libheif = is_skia_dev_build
|
2018-01-25 17:49:37 +00:00
|
|
|
skia_use_skcms = is_skia_dev_build
|
2017-12-08 18:35:47 +00:00
|
|
|
skia_embed_resources = false
|
2016-09-16 14:45:52 +00:00
|
|
|
|
2017-01-05 17:20:41 +00:00
|
|
|
skia_android_serial = ""
|
2016-12-28 16:19:22 +00:00
|
|
|
skia_enable_discrete_gpu = true
|
2017-02-09 17:24:07 +00:00
|
|
|
skia_enable_effects = true
|
2017-07-13 19:50:03 +00:00
|
|
|
skia_enable_flutter_defines = false
|
2016-09-20 19:28:12 +00:00
|
|
|
skia_enable_gpu = true
|
2016-12-30 18:09:03 +00:00
|
|
|
skia_enable_pdf = true
|
2017-03-16 13:56:54 +00:00
|
|
|
skia_enable_spirv_validation = is_skia_dev_build && is_debug
|
2017-03-03 15:55:02 +00:00
|
|
|
skia_enable_tools = is_skia_dev_build
|
|
|
|
skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug
|
2017-12-07 17:48:30 +00:00
|
|
|
skia_vulkan_header = ""
|
2016-10-27 14:48:48 +00:00
|
|
|
skia_vulkan_sdk = getenv("VULKAN_SDK")
|
2017-09-01 16:17:03 +00:00
|
|
|
skia_qt_path = getenv("QT_PATH")
|
2017-06-29 14:03:38 +00:00
|
|
|
skia_compile_processors = false
|
2017-09-11 20:50:14 +00:00
|
|
|
skia_lex = false
|
2017-06-28 17:21:47 +00:00
|
|
|
|
|
|
|
skia_jumper_clang = ""
|
|
|
|
skia_jumper_objdump = ""
|
|
|
|
skia_jumper_ccache = ""
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
2016-10-27 17:31:37 +00:00
|
|
|
declare_args() {
|
2017-03-20 22:09:30 +00:00
|
|
|
skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib
|
2016-11-01 15:46:10 +00:00
|
|
|
skia_use_sfntly = skia_use_icu
|
2017-11-19 18:20:13 +00:00
|
|
|
skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu
|
2016-11-01 15:46:10 +00:00
|
|
|
|
2016-10-31 17:44:49 +00:00
|
|
|
if (is_android) {
|
|
|
|
skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
|
2017-04-17 20:36:39 +00:00
|
|
|
} else if (is_fuchsia) {
|
|
|
|
skia_use_vulkan = fuchsia_use_vulkan
|
2016-10-31 17:44:49 +00:00
|
|
|
} else {
|
|
|
|
skia_use_vulkan = skia_vulkan_sdk != ""
|
|
|
|
}
|
2017-12-07 20:16:10 +00:00
|
|
|
|
|
|
|
if (is_ios) {
|
|
|
|
skia_ios_identity = ".*Google.*"
|
|
|
|
skia_ios_profile = "Google Development"
|
|
|
|
}
|
2016-10-27 17:31:37 +00:00
|
|
|
}
|
2017-04-25 17:38:26 +00:00
|
|
|
declare_args() {
|
2017-12-07 17:48:30 +00:00
|
|
|
skia_tools_vulkan_header_dir = ""
|
2017-04-25 17:38:26 +00:00
|
|
|
if (skia_use_vulkan) {
|
2017-06-14 01:43:29 +00:00
|
|
|
# When buliding on Android we get the header via the NDK so no need for any extra path.
|
2017-04-25 17:38:26 +00:00
|
|
|
if (is_fuchsia) {
|
2017-12-07 17:48:30 +00:00
|
|
|
skia_tools_vulkan_header_dir = "$fuchsia_vulkan_sdk/include"
|
2017-04-25 17:38:26 +00:00
|
|
|
} else if (is_linux || is_win) {
|
2017-12-07 17:48:30 +00:00
|
|
|
skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include"
|
2017-04-25 17:38:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-09-30 17:41:03 +00:00
|
|
|
|
2017-10-13 17:59:38 +00:00
|
|
|
if (defined(skia_settings)) {
|
|
|
|
import(skia_settings)
|
|
|
|
}
|
|
|
|
|
2016-09-21 17:11:25 +00:00
|
|
|
# Our tools require static linking (they use non-exported symbols).
|
|
|
|
skia_enable_tools = skia_enable_tools && !is_component_build
|
2016-09-20 19:28:12 +00:00
|
|
|
|
2016-08-29 22:22:10 +00:00
|
|
|
fontmgr_android_enabled = skia_use_expat && skia_use_freetype
|
|
|
|
|
2016-07-26 20:55:45 +00:00
|
|
|
skia_public_includes = [
|
2016-07-27 20:55:26 +00:00
|
|
|
"include/android",
|
2016-07-28 16:45:14 +00:00
|
|
|
"include/c",
|
2016-07-26 20:55:45 +00:00
|
|
|
"include/codec",
|
|
|
|
"include/config",
|
|
|
|
"include/core",
|
|
|
|
"include/effects",
|
2017-05-08 21:31:00 +00:00
|
|
|
"include/encode",
|
2016-07-26 20:55:45 +00:00
|
|
|
"include/gpu",
|
|
|
|
"include/gpu/gl",
|
2017-11-19 18:20:13 +00:00
|
|
|
"include/atlastext",
|
2016-07-26 20:55:45 +00:00
|
|
|
"include/pathops",
|
|
|
|
"include/ports",
|
2016-07-27 20:55:26 +00:00
|
|
|
"include/svg",
|
2016-07-26 20:55:45 +00:00
|
|
|
"include/utils",
|
|
|
|
"include/utils/mac",
|
|
|
|
]
|
|
|
|
|
2017-06-14 01:43:29 +00:00
|
|
|
if (skia_use_vulkan) {
|
|
|
|
skia_public_includes += [ "include/gpu/vk" ]
|
|
|
|
}
|
2017-11-19 18:20:13 +00:00
|
|
|
if (skia_enable_atlas_text) {
|
|
|
|
skia_public_includes += [ "include/atlastext" ]
|
|
|
|
}
|
2017-07-05 20:49:36 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
skia_public_includes += [ "include/gpu/mtl" ]
|
|
|
|
}
|
2017-06-14 01:43:29 +00:00
|
|
|
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
# Skia public API, generally provided by :skia.
|
|
|
|
config("skia_public") {
|
2016-07-26 20:55:45 +00:00
|
|
|
include_dirs = skia_public_includes
|
2017-12-07 17:48:30 +00:00
|
|
|
if (skia_tools_vulkan_header_dir != "") {
|
|
|
|
include_dirs += [ skia_tools_vulkan_header_dir ]
|
2017-04-25 17:38:26 +00:00
|
|
|
}
|
2016-10-11 21:49:33 +00:00
|
|
|
defines = []
|
|
|
|
if (is_component_build) {
|
|
|
|
defines += [ "SKIA_DLL" ]
|
|
|
|
}
|
2016-09-27 01:37:09 +00:00
|
|
|
if (is_fuchsia || is_linux) {
|
2016-08-25 16:25:11 +00:00
|
|
|
defines += [ "SK_SAMPLES_FOR_X" ]
|
|
|
|
}
|
2017-07-13 19:50:03 +00:00
|
|
|
if (skia_enable_flutter_defines) {
|
|
|
|
defines += flutter_defines
|
|
|
|
}
|
2016-09-20 19:28:12 +00:00
|
|
|
if (!skia_enable_gpu) {
|
|
|
|
defines += [ "SK_SUPPORT_GPU=0" ]
|
|
|
|
}
|
2017-11-19 18:20:13 +00:00
|
|
|
if (skia_enable_atlas_text) {
|
|
|
|
defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ]
|
|
|
|
}
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Skia internal APIs, used by Skia itself and a few test tools.
|
|
|
|
config("skia_private") {
|
|
|
|
visibility = [ ":*" ]
|
|
|
|
|
|
|
|
include_dirs = [
|
|
|
|
"include/private",
|
|
|
|
"src/c",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/codec",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/core",
|
|
|
|
"src/effects",
|
2016-07-27 20:55:26 +00:00
|
|
|
"src/fonts",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/image",
|
|
|
|
"src/images",
|
|
|
|
"src/lazy",
|
|
|
|
"src/opts",
|
|
|
|
"src/pathops",
|
2016-07-28 21:17:33 +00:00
|
|
|
"src/pdf",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports",
|
|
|
|
"src/sfnt",
|
2017-05-30 20:39:47 +00:00
|
|
|
"src/shaders",
|
|
|
|
"src/shaders/gradients",
|
2016-08-30 17:37:19 +00:00
|
|
|
"src/sksl",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/utils",
|
2016-08-04 13:19:33 +00:00
|
|
|
"src/utils/win",
|
2017-02-14 19:42:30 +00:00
|
|
|
"src/xml",
|
Add support for multiple frames in SkCodec
Add an interface to decode frames beyond the first in SkCodec, and
add an implementation for SkGifCodec.
Add getFrameData to SkCodec. This method reads ahead in the stream
to return a vector containing meta data about each frame in the image.
This is not required in order to decode frames beyond the first, but
it allows a client to learn extra information:
- how long the frame should be displayed
- whether a frame should be blended with a prior frame, allowing the
client to provide the prior frame to speed up decoding
Add a new fields to SkCodec::Options:
- fFrameIndex
- fHasPriorFrame
The API is designed so that SkCodec never caches frames. If a
client wants a frame beyond the first, they specify the frame in
Options.fFrameIndex. If the client does not have the
frame's required frame (the frame that this frame must be blended on
top of) cached, they pass false for
Options.fHasPriorFrame. Unless the frame is
independent, the codec will then recursively decode all frames
necessary to decode fFrameIndex. If the client has the required frame
cached, they can put it in the dst they pass to the codec, and the
codec will only draw fFrameIndex onto it.
Replace SkGifCodec's scanline decoding support with progressive
decoding, and update the tests accordingly.
Implement new APIs in SkGifCodec. Instead of using gif_lib, use
GIFImageReader, imported from Chromium (along with its copyright
headers) with the following changes:
- SkGifCodec is now the client
- Replace blink types
- Combine GIFColorMap::buildTable and ::getTable into a method that
creates and returns an SkColorTable
- Input comes from an SkStream, instead of a SegmentReader. Add
SkStreamBuffer, which buffers the (potentially partial) stream in
order to decode progressively.
(FIXME: This requires copying data that previously was read directly
from the SegmentReader. Does this hurt performance? If so, can we
fix it?)
- Remove UMA code
- Instead of reporting screen width and height to the client, allow the
client to query for it
- Fail earlier if the first frame AND screen have size of zero
- Compute required previous frame when adding a new one
- Move GIFParseQuery from GIFImageDecoder to GIFImageReader
- Allow parsing up to a specific frame (to skip parsing the rest of the
stream if a client only wants the first frame)
- Compute whether the first frame has alpha and supports index 8, to
create the SkImageInfo. This happens before reporting that the size
has been decoded.
Add GIFImageDecoder::haveDecodedRow to SkGifCodec, imported from
Chromium (along with its copyright header), with the following changes:
- Add support for sampling
- Use the swizzler
- Keep track of the rows decoded
- Do *not* keep track of whether we've seen alpha
Remove SkCodec::kOutOfOrder_SkScanlineOrder, which was only used by GIF
scanline decoding.
Call onRewind even if there is no stream (SkGifCodec needs to clear its
decoded state so it will decode from the beginning).
Add a method to SkSwizzler to access the offset into the dst, taking
subsetting into account.
Add a GM that animates a GIF.
Add tests for the new APIs.
*** Behavior changes:
* Previously, we reported that an image with a subset frame and no transparent
index was opaque and used the background index (if present) to fill the
background. This is necessary in order to support index 8, but it does not
match viewers/browsers I have seen. Examples:
- Chromium and Gimp render the background transparent
- Firefox, Safari, Linux Image Viewer, Safari Preview clip to the frame (for
a single frame image)
This CL matches Chromium's behavior and renders the background transparent.
This allows us to have consistent behavior across products and simplifies
the code (relative to what we would have to do to continue the old behavior
on Android). It also means that we will no longer support index 8 for some
GIFs.
* Stop checking for GIFSTAMP - all GIFs should be either 89a or 87a.
This matches Chromium. I suspect that bugs would have been reported if valid
GIFs started with "GIFVER" instead of "GIF89a" or "GIF87a" (but did not decode
in Chromium).
*** Future work not included in this CL:
* Move some checks out of haveDecodedRow, since they are the same for the
entire frame e.g.
- intersecting the frameRect with the full image size
- whether there is a color table
* Change when we write transparent pixels
- In some cases, Chromium deemed this unnecessary, but I suspect it is slower
than the fallback case. There will continue to be cases where we should
*not* write them, but for e.g. the first pass where we have already
cleared to transparent (which we may also be able to skip) writing the
transparent pixels will not make anything incorrect.
* Report color type and alpha type per frame
- Depending on alpha values, disposal methods, frame rects, etc, subsequent
frames may have different properties than the first.
* Skip copies of the encoded data
- We copy the encoded data in case the stream is one that cannot be rewound,
so we can parse and then decode (possibly not immediately). For some input
streams, this is unnecessary.
- I was concerned this cause a performance regression, but on average the
new code is faster than the old for the images I tested [1].
- It may cause a performance regression for Chromium, though, where we can
always move back in the stream, so this should be addressed.
Design doc:
https://docs.google.com/a/google.com/document/d/12Qhf9T92MWfdWujQwCIjhCO3sw6pTJB5pJBwDM1T7Kc/
[1] https://docs.google.com/a/google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2045293002
Review-Url: https://codereview.chromium.org/2045293002
2016-10-24 16:03:26 +00:00
|
|
|
"third_party/gif",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
]
|
2016-08-01 13:56:40 +00:00
|
|
|
|
2017-05-03 14:52:00 +00:00
|
|
|
defines = [ "SK_GAMMA_APPLY_TO_A8" ]
|
2016-09-09 18:07:45 +00:00
|
|
|
if (is_android) {
|
|
|
|
defines += [
|
|
|
|
"SK_GAMMA_EXPONENT=1.4",
|
|
|
|
"SK_GAMMA_CONTRAST=0.0",
|
|
|
|
]
|
|
|
|
}
|
2016-09-14 18:16:49 +00:00
|
|
|
if (is_official_build || is_android) {
|
|
|
|
# TODO(bsalomon): it'd be nice to make Android normal.
|
|
|
|
defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
|
|
|
|
}
|
2016-09-30 17:41:03 +00:00
|
|
|
libs = []
|
|
|
|
lib_dirs = []
|
2017-02-23 17:23:47 +00:00
|
|
|
if (skia_enable_gpu) {
|
|
|
|
include_dirs += [ "src/gpu" ]
|
2017-12-07 17:48:30 +00:00
|
|
|
if (is_skia_dev_build && skia_use_vulkan) {
|
|
|
|
include_dirs += [ "tools/gpu/vk" ]
|
|
|
|
}
|
2017-02-23 17:23:47 +00:00
|
|
|
}
|
2016-12-05 14:46:02 +00:00
|
|
|
if (skia_use_angle) {
|
|
|
|
defines += [ "SK_ANGLE" ]
|
|
|
|
}
|
2016-12-28 16:19:22 +00:00
|
|
|
if (skia_enable_discrete_gpu) {
|
|
|
|
defines += [ "SK_ENABLE_DISCRETE_GPU" ]
|
|
|
|
}
|
2017-07-06 14:09:38 +00:00
|
|
|
if (!is_official_build) {
|
|
|
|
defines += [ "GR_TEST_UTILS=1" ]
|
|
|
|
}
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
|
|
|
|
config("skia_library") {
|
|
|
|
visibility = [ ":*" ]
|
|
|
|
defines = [ "SKIA_IMPLEMENTATION=1" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
skia_library_configs = [
|
|
|
|
":skia_public",
|
|
|
|
":skia_private",
|
|
|
|
":skia_library",
|
|
|
|
]
|
|
|
|
|
2016-08-25 00:32:30 +00:00
|
|
|
# Use for CPU-specific Skia code that needs particular compiler flags.
|
|
|
|
template("opts") {
|
|
|
|
if (invoker.enabled) {
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker, "*")
|
|
|
|
configs += skia_library_configs
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
# If not enabled, a phony empty target that swallows all otherwise unused variables.
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
|
|
|
"sources",
|
|
|
|
"cflags",
|
|
|
|
])
|
|
|
|
}
|
|
|
|
}
|
2016-08-17 20:57:26 +00:00
|
|
|
}
|
|
|
|
|
2016-08-17 01:28:43 +00:00
|
|
|
is_x86 = current_cpu == "x64" || current_cpu == "x86"
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
|
2016-08-25 21:50:44 +00:00
|
|
|
opts("none") {
|
|
|
|
enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.none_sources
|
2016-08-25 11:55:19 +00:00
|
|
|
cflags = []
|
|
|
|
}
|
|
|
|
|
2016-08-25 21:50:44 +00:00
|
|
|
opts("armv7") {
|
2016-08-25 11:55:19 +00:00
|
|
|
enabled = current_cpu == "arm"
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.armv7_sources + skia_opts.neon_sources
|
2016-08-25 21:50:44 +00:00
|
|
|
cflags = []
|
2016-08-25 11:55:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
opts("arm64") {
|
|
|
|
enabled = current_cpu == "arm64"
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.arm64_sources
|
2016-08-25 11:55:19 +00:00
|
|
|
cflags = []
|
|
|
|
}
|
|
|
|
|
|
|
|
opts("crc32") {
|
|
|
|
enabled = current_cpu == "arm64"
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.crc32_sources
|
2016-08-25 11:55:19 +00:00
|
|
|
cflags = [ "-march=armv8-a+crc" ]
|
|
|
|
}
|
|
|
|
|
2016-08-25 00:32:30 +00:00
|
|
|
opts("sse2") {
|
|
|
|
enabled = is_x86
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.sse2_sources
|
2017-07-31 15:57:21 +00:00
|
|
|
if (!is_clang && is_win) {
|
2016-10-19 17:39:13 +00:00
|
|
|
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ]
|
|
|
|
} else {
|
2016-10-11 21:08:53 +00:00
|
|
|
cflags = [ "-msse2" ]
|
|
|
|
}
|
2016-08-25 00:32:30 +00:00
|
|
|
}
|
2016-08-08 16:06:27 +00:00
|
|
|
|
2016-08-25 00:32:30 +00:00
|
|
|
opts("ssse3") {
|
|
|
|
enabled = is_x86
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.ssse3_sources
|
2017-07-31 15:57:21 +00:00
|
|
|
if (!is_clang && is_win) {
|
2016-10-19 17:39:13 +00:00
|
|
|
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ]
|
|
|
|
} else {
|
2016-10-11 21:08:53 +00:00
|
|
|
cflags = [ "-mssse3" ]
|
|
|
|
}
|
2016-08-25 00:32:30 +00:00
|
|
|
}
|
2016-08-08 16:06:27 +00:00
|
|
|
|
2016-08-25 00:32:30 +00:00
|
|
|
opts("sse41") {
|
|
|
|
enabled = is_x86
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.sse41_sources
|
2017-07-31 15:57:21 +00:00
|
|
|
if (!is_clang && is_win) {
|
2016-10-19 17:39:13 +00:00
|
|
|
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ]
|
|
|
|
} else {
|
2016-10-11 21:08:53 +00:00
|
|
|
cflags = [ "-msse4.1" ]
|
|
|
|
}
|
2016-08-25 00:32:30 +00:00
|
|
|
}
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
|
2016-08-25 00:32:30 +00:00
|
|
|
opts("sse42") {
|
|
|
|
enabled = is_x86
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.sse42_sources
|
2017-07-31 15:57:21 +00:00
|
|
|
if (!is_clang && is_win) {
|
2016-10-19 17:39:13 +00:00
|
|
|
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ]
|
|
|
|
} else {
|
2016-10-11 21:08:53 +00:00
|
|
|
cflags = [ "-msse4.2" ]
|
|
|
|
}
|
2016-08-25 00:32:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
opts("avx") {
|
|
|
|
enabled = is_x86
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_opts.avx_sources
|
2017-07-31 15:57:21 +00:00
|
|
|
if (!is_clang && is_win) {
|
2016-11-18 22:11:41 +00:00
|
|
|
cflags = [ "/arch:AVX" ]
|
2016-10-11 21:08:53 +00:00
|
|
|
} else {
|
|
|
|
cflags = [ "-mavx" ]
|
|
|
|
}
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
# Any feature of Skia that requires third-party code should be optional and use this template.
|
2016-08-23 20:56:37 +00:00
|
|
|
template("optional") {
|
|
|
|
if (invoker.enabled) {
|
|
|
|
config(target_name + "_public") {
|
2016-08-31 11:58:19 +00:00
|
|
|
if (defined(invoker.public_defines)) {
|
|
|
|
defines = invoker.public_defines
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
|
|
|
source_set(target_name) {
|
2016-08-31 11:58:19 +00:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
|
|
|
"public_defines",
|
|
|
|
"sources_when_disabled",
|
2016-10-31 16:02:57 +00:00
|
|
|
"configs_to_remove",
|
2016-08-31 11:58:19 +00:00
|
|
|
])
|
2016-08-23 20:56:37 +00:00
|
|
|
all_dependent_configs = [ ":" + target_name + "_public" ]
|
2016-08-25 00:32:30 +00:00
|
|
|
configs += skia_library_configs
|
2016-10-31 16:02:57 +00:00
|
|
|
if (defined(invoker.configs_to_remove)) {
|
|
|
|
configs -= invoker.configs_to_remove
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
|
|
|
"public_defines",
|
|
|
|
"deps",
|
2016-09-14 13:12:09 +00:00
|
|
|
"libs",
|
2016-08-23 20:56:37 +00:00
|
|
|
"sources",
|
2016-08-31 11:58:19 +00:00
|
|
|
"sources_when_disabled",
|
2016-10-31 16:02:57 +00:00
|
|
|
"configs_to_remove",
|
2016-08-23 20:56:37 +00:00
|
|
|
])
|
2016-08-31 11:58:19 +00:00
|
|
|
if (defined(invoker.sources_when_disabled)) {
|
|
|
|
sources = invoker.sources_when_disabled
|
|
|
|
}
|
|
|
|
configs += skia_library_configs
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
2016-08-23 14:38:09 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
|
2017-02-09 17:24:07 +00:00
|
|
|
optional("effects") {
|
|
|
|
enabled = skia_enable_effects
|
2017-06-29 14:03:38 +00:00
|
|
|
deps = [
|
|
|
|
":compile_processors",
|
|
|
|
]
|
2017-02-09 17:24:07 +00:00
|
|
|
sources =
|
|
|
|
skia_effects_sources + [ "src/ports/SkGlobalInitialization_default.cpp" ]
|
|
|
|
sources_when_disabled = [ "src/ports/SkGlobalInitialization_none.cpp" ]
|
|
|
|
}
|
|
|
|
|
2016-08-29 22:22:10 +00:00
|
|
|
optional("fontmgr_android") {
|
|
|
|
enabled = fontmgr_android_enabled
|
|
|
|
|
|
|
|
deps = [
|
2017-02-24 16:15:26 +00:00
|
|
|
":typeface_freetype",
|
2016-08-29 22:22:10 +00:00
|
|
|
"//third_party/expat",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontMgr_android.cpp",
|
|
|
|
"src/ports/SkFontMgr_android_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_android_parser.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-09-07 14:52:55 +00:00
|
|
|
optional("fontmgr_custom") {
|
|
|
|
enabled = is_linux && skia_use_freetype && !skia_use_fontconfig
|
|
|
|
|
|
|
|
deps = [
|
2017-02-24 16:15:26 +00:00
|
|
|
":typeface_freetype",
|
2016-09-07 14:52:55 +00:00
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontMgr_custom.cpp",
|
2017-02-08 22:29:33 +00:00
|
|
|
"src/ports/SkFontMgr_custom.h",
|
|
|
|
"src/ports/SkFontMgr_custom_directory.cpp",
|
2016-09-07 14:52:55 +00:00
|
|
|
"src/ports/SkFontMgr_custom_directory_factory.cpp",
|
2017-02-08 22:29:33 +00:00
|
|
|
"src/ports/SkFontMgr_custom_embedded.cpp",
|
|
|
|
"src/ports/SkFontMgr_custom_empty.cpp",
|
2016-09-07 14:52:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-08-29 20:26:14 +00:00
|
|
|
optional("fontmgr_fontconfig") {
|
|
|
|
enabled = skia_use_freetype && skia_use_fontconfig
|
|
|
|
|
|
|
|
deps = [
|
2017-02-24 16:15:26 +00:00
|
|
|
":typeface_freetype",
|
2016-08-29 20:26:14 +00:00
|
|
|
"//third_party:fontconfig",
|
|
|
|
]
|
|
|
|
sources = [
|
2016-09-19 19:13:16 +00:00
|
|
|
"src/ports/SkFontConfigInterface.cpp",
|
2016-08-29 20:26:14 +00:00
|
|
|
"src/ports/SkFontConfigInterface_direct.cpp",
|
|
|
|
"src/ports/SkFontConfigInterface_direct_factory.cpp",
|
|
|
|
"src/ports/SkFontMgr_FontConfigInterface.cpp",
|
|
|
|
"src/ports/SkFontMgr_fontconfig.cpp",
|
|
|
|
"src/ports/SkFontMgr_fontconfig_factory.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-09-12 22:15:44 +00:00
|
|
|
optional("fontmgr_fuchsia") {
|
|
|
|
enabled = is_fuchsia && skia_use_freetype
|
|
|
|
|
|
|
|
deps = [
|
2017-02-24 16:15:26 +00:00
|
|
|
":typeface_freetype",
|
2016-09-12 22:15:44 +00:00
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontMgr_custom.cpp",
|
2017-02-08 22:29:33 +00:00
|
|
|
"src/ports/SkFontMgr_custom_empty.cpp",
|
2016-09-12 22:15:44 +00:00
|
|
|
"src/ports/SkFontMgr_custom_empty_factory.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-09-11 20:50:14 +00:00
|
|
|
if (skia_lex) {
|
2017-09-07 13:39:50 +00:00
|
|
|
executable("sksllex") {
|
|
|
|
sources = [
|
|
|
|
"src/sksl/lex/Main.cpp",
|
|
|
|
"src/sksl/lex/NFA.cpp",
|
|
|
|
"src/sksl/lex/RegexNode.cpp",
|
|
|
|
"src/sksl/lex/RegexParser.cpp",
|
|
|
|
]
|
|
|
|
include_dirs = [ "src/sksl/lex" ]
|
|
|
|
}
|
|
|
|
|
2017-09-11 20:50:14 +00:00
|
|
|
action("run_sksllex") {
|
|
|
|
script = "gn/run_sksllex.py"
|
2017-10-06 18:22:22 +00:00
|
|
|
deps = [
|
|
|
|
":sksllex(//gn/toolchain:$host_toolchain)",
|
|
|
|
]
|
2017-09-11 20:50:14 +00:00
|
|
|
sources = [
|
|
|
|
"src/sksl/lex/layout.lex",
|
|
|
|
"src/sksl/lex/sksl.lex",
|
|
|
|
]
|
|
|
|
|
|
|
|
# GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
|
|
|
|
# path that starts with target_out_dir and then uses ".." to back up into the src dir.
|
|
|
|
outputs = [
|
|
|
|
"$target_out_dir/" +
|
|
|
|
rebase_path("src/sksl/lex/SkSLLexer.h", target_out_dir),
|
|
|
|
# the script also modifies the corresponding .cpp file, but if we tell GN that it gets
|
|
|
|
# confused due to the same file being named by two different paths
|
|
|
|
]
|
|
|
|
sksllex_path = "$root_out_dir/"
|
|
|
|
sksllex_path += "sksllex"
|
|
|
|
if (host_os == "win") {
|
|
|
|
sksllex_path += ".exe"
|
|
|
|
}
|
|
|
|
args = [
|
|
|
|
rebase_path(sksllex_path),
|
|
|
|
rebase_path("bin/clang-format"),
|
|
|
|
rebase_path("src"),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
group("run_sksllex") {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (skia_compile_processors) {
|
2017-06-29 14:03:38 +00:00
|
|
|
executable("skslc") {
|
|
|
|
defines = [ "SKSL_STANDALONE" ]
|
|
|
|
sources = [
|
|
|
|
"src/sksl/SkSLMain.cpp",
|
|
|
|
]
|
|
|
|
sources += skia_sksl_sources
|
|
|
|
include_dirs = [
|
|
|
|
"src/gpu",
|
|
|
|
"src/sksl",
|
|
|
|
]
|
|
|
|
deps = [
|
2017-11-10 20:34:03 +00:00
|
|
|
":run_sksllex",
|
2017-06-29 14:03:38 +00:00
|
|
|
"//third_party/spirv-tools",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
skia_gpu_processor_outputs = []
|
|
|
|
foreach(src, skia_gpu_processor_sources) {
|
|
|
|
dir = get_path_info(src, "dir")
|
|
|
|
name = get_path_info(src, "name")
|
|
|
|
|
|
|
|
# GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
|
|
|
|
# path that starts with target_out_dir and then uses ".." to back up into the src dir.
|
|
|
|
skia_gpu_processor_outputs += [
|
|
|
|
"$target_out_dir/" + rebase_path("$dir/$name.h", target_out_dir),
|
|
|
|
# the script also modifies the corresponding .cpp file, but if we tell GN that it gets
|
|
|
|
# confused due to the same file being named by two different paths
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-11-10 20:34:03 +00:00
|
|
|
action("create_sksl_enums") {
|
|
|
|
script = "gn/create_sksl_enums.py"
|
|
|
|
sources = [
|
|
|
|
"include/private/GrSharedEnums.h",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"$target_out_dir/" +
|
|
|
|
rebase_path("src/sksl/sksl_enums.include", target_out_dir),
|
|
|
|
]
|
|
|
|
args = [
|
|
|
|
rebase_path(sources[0]),
|
|
|
|
rebase_path(outputs[0]),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-06-29 14:03:38 +00:00
|
|
|
action("compile_processors") {
|
|
|
|
script = "gn/compile_processors.py"
|
|
|
|
deps = [
|
2017-11-10 20:34:03 +00:00
|
|
|
":create_sksl_enums",
|
2017-06-29 14:03:38 +00:00
|
|
|
":skslc(//gn/toolchain:$host_toolchain)",
|
|
|
|
]
|
|
|
|
sources = skia_gpu_processor_sources
|
|
|
|
outputs = skia_gpu_processor_outputs
|
|
|
|
skslc_path = "$root_out_dir/"
|
|
|
|
if (host_toolchain != default_toolchain_name) {
|
|
|
|
skslc_path += "$host_toolchain/"
|
|
|
|
}
|
|
|
|
skslc_path += "skslc"
|
|
|
|
if (host_os == "win") {
|
|
|
|
skslc_path += ".exe"
|
|
|
|
}
|
2017-07-27 20:02:37 +00:00
|
|
|
args = [
|
|
|
|
rebase_path(skslc_path),
|
2017-07-28 14:00:51 +00:00
|
|
|
rebase_path("bin/clang-format"),
|
2017-07-27 20:02:37 +00:00
|
|
|
]
|
2017-06-29 14:03:38 +00:00
|
|
|
args += rebase_path(skia_gpu_processor_sources)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
skia_gpu_processor_outputs = []
|
|
|
|
group("compile_processors") {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-20 19:28:12 +00:00
|
|
|
optional("gpu") {
|
|
|
|
enabled = skia_enable_gpu
|
2017-06-29 14:03:38 +00:00
|
|
|
deps = [
|
|
|
|
":compile_processors",
|
2017-09-11 20:50:14 +00:00
|
|
|
":run_sksllex",
|
2017-06-29 14:03:38 +00:00
|
|
|
]
|
2016-09-20 22:11:46 +00:00
|
|
|
public_defines = []
|
|
|
|
|
2017-12-11 15:06:31 +00:00
|
|
|
sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs
|
2016-09-20 19:28:12 +00:00
|
|
|
|
|
|
|
# These paths need to be absolute to match the ones produced by shared_sources.gni.
|
2017-12-11 15:06:31 +00:00
|
|
|
sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ],
|
2016-09-20 19:28:12 +00:00
|
|
|
"abspath")
|
2016-10-13 21:18:04 +00:00
|
|
|
libs = []
|
2016-09-20 19:28:12 +00:00
|
|
|
if (is_android) {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp" ]
|
2017-06-27 19:37:25 +00:00
|
|
|
|
|
|
|
# this lib is required to link against AHardwareBuffer
|
|
|
|
if (defined(ndk_api) && ndk_api >= 26) {
|
|
|
|
libs += [ "android" ]
|
|
|
|
}
|
2017-03-29 15:19:01 +00:00
|
|
|
} else if (skia_use_egl) {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]
|
2017-03-29 15:19:01 +00:00
|
|
|
libs += [ "EGL" ]
|
2016-09-20 19:28:12 +00:00
|
|
|
} else if (is_linux) {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
|
2017-02-23 15:31:13 +00:00
|
|
|
libs += [
|
|
|
|
"GL",
|
|
|
|
"GLU",
|
|
|
|
]
|
2016-09-20 19:28:12 +00:00
|
|
|
} else if (is_mac) {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
|
2016-11-23 19:43:56 +00:00
|
|
|
} else if (is_ios) {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
|
2016-10-13 21:18:04 +00:00
|
|
|
} else if (is_win) {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
|
2016-10-13 21:18:04 +00:00
|
|
|
libs += [ "OpenGL32.lib" ]
|
2016-09-20 19:28:12 +00:00
|
|
|
} else {
|
2017-12-11 15:06:31 +00:00
|
|
|
sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
|
2016-09-20 19:28:12 +00:00
|
|
|
}
|
2016-09-20 22:11:46 +00:00
|
|
|
|
|
|
|
if (skia_use_vulkan) {
|
|
|
|
public_defines += [ "SK_VULKAN" ]
|
|
|
|
sources += skia_vk_sources
|
2016-09-21 14:36:14 +00:00
|
|
|
if (skia_enable_vulkan_debug_layers) {
|
|
|
|
public_defines += [ "SK_ENABLE_VK_LAYERS" ]
|
|
|
|
}
|
2017-12-07 17:48:30 +00:00
|
|
|
if (skia_vulkan_header != "") {
|
|
|
|
public_defines += [ "SK_VULKAN_HEADER=\"$skia_vulkan_header\"" ]
|
|
|
|
} else {
|
|
|
|
if (is_skia_dev_build) {
|
|
|
|
public_defines += [ "SK_VULKAN_HEADER=\"GrVulkanDefines.h\"" ]
|
|
|
|
}
|
|
|
|
}
|
2016-09-20 22:11:46 +00:00
|
|
|
}
|
2017-03-16 13:56:54 +00:00
|
|
|
if (skia_enable_spirv_validation) {
|
2017-06-29 14:03:38 +00:00
|
|
|
deps += [ "//third_party/spirv-tools" ]
|
2017-03-16 13:56:54 +00:00
|
|
|
public_defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
|
|
|
|
}
|
2017-07-05 20:49:36 +00:00
|
|
|
|
2017-07-12 20:21:09 +00:00
|
|
|
cflags_objcc = []
|
2017-07-05 20:49:36 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
public_defines += [ "SK_METAL" ]
|
|
|
|
sources += skia_metal_sources
|
|
|
|
libs += [ "Metal.framework" ]
|
2017-07-12 20:21:09 +00:00
|
|
|
cflags_objcc += [ "-fobjc-arc" ]
|
2017-07-05 20:49:36 +00:00
|
|
|
}
|
2017-11-19 18:20:13 +00:00
|
|
|
|
|
|
|
if (skia_enable_atlas_text) {
|
|
|
|
sources += skia_atlas_text_sources
|
|
|
|
}
|
2016-09-20 19:28:12 +00:00
|
|
|
}
|
|
|
|
|
2017-08-17 19:13:20 +00:00
|
|
|
optional("heif") {
|
|
|
|
enabled = skia_use_libheif
|
|
|
|
public_defines = [ "SK_HAS_HEIF_LIBRARY" ]
|
|
|
|
|
|
|
|
deps = []
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"src/codec/SkHeifCodec.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-08-24 16:55:56 +00:00
|
|
|
optional("jpeg") {
|
|
|
|
enabled = skia_use_libjpeg_turbo
|
|
|
|
public_defines = [ "SK_HAS_JPEG_LIBRARY" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/libjpeg-turbo:libjpeg",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/codec/SkJpegCodec.cpp",
|
|
|
|
"src/codec/SkJpegDecoderMgr.cpp",
|
|
|
|
"src/codec/SkJpegUtility.cpp",
|
|
|
|
"src/images/SkJPEGWriteUtility.cpp",
|
2017-05-05 18:02:13 +00:00
|
|
|
"src/images/SkJpegEncoder.cpp",
|
2016-08-24 16:55:56 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
optional("pdf") {
|
2016-12-30 18:09:03 +00:00
|
|
|
enabled = skia_use_zlib && skia_enable_pdf
|
|
|
|
public_defines = [ "SK_SUPPORT_PDF" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/zlib",
|
|
|
|
]
|
2016-09-01 21:24:39 +00:00
|
|
|
sources = skia_pdf_sources
|
2016-08-31 11:58:19 +00:00
|
|
|
sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
|
|
|
|
if (skia_use_sfntly) {
|
|
|
|
deps += [ "//third_party/sfntly" ]
|
2016-12-30 18:09:03 +00:00
|
|
|
public_defines += [ "SK_PDF_USE_SFNTLY" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
optional("png") {
|
|
|
|
enabled = skia_use_libpng
|
|
|
|
public_defines = [ "SK_HAS_PNG_LIBRARY" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/codec/SkIcoCodec.cpp",
|
|
|
|
"src/codec/SkPngCodec.cpp",
|
2017-05-05 18:02:13 +00:00
|
|
|
"src/images/SkPngEncoder.cpp",
|
2016-08-24 16:55:56 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-10-31 16:02:57 +00:00
|
|
|
optional("raw") {
|
2016-11-01 15:46:10 +00:00
|
|
|
enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo && skia_use_piex
|
2016-10-31 16:02:57 +00:00
|
|
|
public_defines = [ "SK_CODEC_DECODES_RAW" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/dng_sdk",
|
|
|
|
"//third_party/libjpeg-turbo:libjpeg",
|
|
|
|
"//third_party/piex",
|
|
|
|
]
|
|
|
|
|
|
|
|
# SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of
|
|
|
|
# Skia.
|
|
|
|
configs_to_remove = [ "//gn:no_exceptions" ]
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"src/codec/SkRawAdapterCodec.cpp",
|
|
|
|
"src/codec/SkRawCodec.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-01-25 17:49:37 +00:00
|
|
|
optional("skcms") {
|
|
|
|
enabled = skia_use_skcms
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/skcms",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
# TODO
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-08-29 20:26:14 +00:00
|
|
|
optional("typeface_freetype") {
|
|
|
|
enabled = skia_use_freetype
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/freetype2",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontHost_FreeType.cpp",
|
|
|
|
"src/ports/SkFontHost_FreeType_common.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-08-23 20:56:37 +00:00
|
|
|
optional("webp") {
|
|
|
|
enabled = skia_use_libwebp
|
|
|
|
public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/libwebp",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"src/codec/SkWebpAdapterCodec.cpp",
|
|
|
|
"src/codec/SkWebpCodec.cpp",
|
2017-05-05 18:02:13 +00:00
|
|
|
"src/images/SkWebpEncoder.cpp",
|
2016-08-23 20:56:37 +00:00
|
|
|
]
|
|
|
|
}
|
2016-08-23 14:38:09 +00:00
|
|
|
|
2016-08-24 16:55:56 +00:00
|
|
|
optional("xml") {
|
|
|
|
enabled = skia_use_expat
|
2016-11-08 16:07:52 +00:00
|
|
|
public_defines = [ "SK_XML" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
"//third_party/expat",
|
|
|
|
]
|
|
|
|
sources = [
|
2017-02-09 21:38:15 +00:00
|
|
|
"src/svg/SkSVGCanvas.cpp",
|
|
|
|
"src/svg/SkSVGDevice.cpp",
|
2016-08-24 16:55:56 +00:00
|
|
|
"src/xml/SkDOM.cpp",
|
|
|
|
"src/xml/SkXMLParser.cpp",
|
|
|
|
"src/xml/SkXMLWriter.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
component("skia") {
|
|
|
|
public_configs = [ ":skia_public" ]
|
|
|
|
configs += skia_library_configs
|
|
|
|
|
|
|
|
deps = [
|
2016-08-25 11:55:19 +00:00
|
|
|
":arm64",
|
|
|
|
":armv7",
|
2016-08-25 00:32:30 +00:00
|
|
|
":avx",
|
2016-08-25 11:55:19 +00:00
|
|
|
":crc32",
|
2017-02-09 17:24:07 +00:00
|
|
|
":effects",
|
2016-08-29 22:22:10 +00:00
|
|
|
":fontmgr_android",
|
2016-09-07 14:52:55 +00:00
|
|
|
":fontmgr_custom",
|
2016-08-29 20:26:14 +00:00
|
|
|
":fontmgr_fontconfig",
|
2016-09-12 22:15:44 +00:00
|
|
|
":fontmgr_fuchsia",
|
2016-09-20 19:28:12 +00:00
|
|
|
":gpu",
|
2017-08-17 19:13:20 +00:00
|
|
|
":heif",
|
2016-08-24 16:55:56 +00:00
|
|
|
":jpeg",
|
2016-08-25 00:32:30 +00:00
|
|
|
":none",
|
2016-08-24 16:55:56 +00:00
|
|
|
":pdf",
|
|
|
|
":png",
|
2016-10-31 16:02:57 +00:00
|
|
|
":raw",
|
2018-01-25 17:49:37 +00:00
|
|
|
":skcms",
|
2016-08-25 00:32:30 +00:00
|
|
|
":sse2",
|
|
|
|
":sse41",
|
|
|
|
":sse42",
|
|
|
|
":ssse3",
|
2016-08-23 14:38:09 +00:00
|
|
|
":webp",
|
2016-08-24 16:55:56 +00:00
|
|
|
":xml",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
]
|
|
|
|
|
2016-11-16 23:04:12 +00:00
|
|
|
# This file (and all GN files in Skia) are designed to work with an
|
|
|
|
# empty sources assignment filter; we handle all that explicitly.
|
|
|
|
# We clear the filter here for clients who may have set up a global filter.
|
|
|
|
set_sources_assignment_filter([])
|
|
|
|
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
sources = []
|
2016-09-01 21:24:39 +00:00
|
|
|
sources += skia_core_sources
|
|
|
|
sources += skia_utils_sources
|
2016-12-20 21:15:56 +00:00
|
|
|
sources += skia_xps_sources
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
sources += [
|
2017-08-02 19:36:24 +00:00
|
|
|
"src/android/SkAndroidFrameworkUtils.cpp",
|
2018-01-14 19:46:51 +00:00
|
|
|
"src/android/SkAnimatedImage.cpp",
|
2016-07-27 20:55:26 +00:00
|
|
|
"src/android/SkBitmapRegionCodec.cpp",
|
|
|
|
"src/android/SkBitmapRegionDecoder.cpp",
|
|
|
|
"src/codec/SkAndroidCodec.cpp",
|
2017-06-01 17:42:28 +00:00
|
|
|
"src/codec/SkBmpBaseCodec.cpp",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/codec/SkBmpCodec.cpp",
|
|
|
|
"src/codec/SkBmpMaskCodec.cpp",
|
|
|
|
"src/codec/SkBmpRLECodec.cpp",
|
|
|
|
"src/codec/SkBmpStandardCodec.cpp",
|
|
|
|
"src/codec/SkCodec.cpp",
|
|
|
|
"src/codec/SkCodecImageGenerator.cpp",
|
Add support for multiple frames in SkCodec
Add an interface to decode frames beyond the first in SkCodec, and
add an implementation for SkGifCodec.
Add getFrameData to SkCodec. This method reads ahead in the stream
to return a vector containing meta data about each frame in the image.
This is not required in order to decode frames beyond the first, but
it allows a client to learn extra information:
- how long the frame should be displayed
- whether a frame should be blended with a prior frame, allowing the
client to provide the prior frame to speed up decoding
Add a new fields to SkCodec::Options:
- fFrameIndex
- fHasPriorFrame
The API is designed so that SkCodec never caches frames. If a
client wants a frame beyond the first, they specify the frame in
Options.fFrameIndex. If the client does not have the
frame's required frame (the frame that this frame must be blended on
top of) cached, they pass false for
Options.fHasPriorFrame. Unless the frame is
independent, the codec will then recursively decode all frames
necessary to decode fFrameIndex. If the client has the required frame
cached, they can put it in the dst they pass to the codec, and the
codec will only draw fFrameIndex onto it.
Replace SkGifCodec's scanline decoding support with progressive
decoding, and update the tests accordingly.
Implement new APIs in SkGifCodec. Instead of using gif_lib, use
GIFImageReader, imported from Chromium (along with its copyright
headers) with the following changes:
- SkGifCodec is now the client
- Replace blink types
- Combine GIFColorMap::buildTable and ::getTable into a method that
creates and returns an SkColorTable
- Input comes from an SkStream, instead of a SegmentReader. Add
SkStreamBuffer, which buffers the (potentially partial) stream in
order to decode progressively.
(FIXME: This requires copying data that previously was read directly
from the SegmentReader. Does this hurt performance? If so, can we
fix it?)
- Remove UMA code
- Instead of reporting screen width and height to the client, allow the
client to query for it
- Fail earlier if the first frame AND screen have size of zero
- Compute required previous frame when adding a new one
- Move GIFParseQuery from GIFImageDecoder to GIFImageReader
- Allow parsing up to a specific frame (to skip parsing the rest of the
stream if a client only wants the first frame)
- Compute whether the first frame has alpha and supports index 8, to
create the SkImageInfo. This happens before reporting that the size
has been decoded.
Add GIFImageDecoder::haveDecodedRow to SkGifCodec, imported from
Chromium (along with its copyright header), with the following changes:
- Add support for sampling
- Use the swizzler
- Keep track of the rows decoded
- Do *not* keep track of whether we've seen alpha
Remove SkCodec::kOutOfOrder_SkScanlineOrder, which was only used by GIF
scanline decoding.
Call onRewind even if there is no stream (SkGifCodec needs to clear its
decoded state so it will decode from the beginning).
Add a method to SkSwizzler to access the offset into the dst, taking
subsetting into account.
Add a GM that animates a GIF.
Add tests for the new APIs.
*** Behavior changes:
* Previously, we reported that an image with a subset frame and no transparent
index was opaque and used the background index (if present) to fill the
background. This is necessary in order to support index 8, but it does not
match viewers/browsers I have seen. Examples:
- Chromium and Gimp render the background transparent
- Firefox, Safari, Linux Image Viewer, Safari Preview clip to the frame (for
a single frame image)
This CL matches Chromium's behavior and renders the background transparent.
This allows us to have consistent behavior across products and simplifies
the code (relative to what we would have to do to continue the old behavior
on Android). It also means that we will no longer support index 8 for some
GIFs.
* Stop checking for GIFSTAMP - all GIFs should be either 89a or 87a.
This matches Chromium. I suspect that bugs would have been reported if valid
GIFs started with "GIFVER" instead of "GIF89a" or "GIF87a" (but did not decode
in Chromium).
*** Future work not included in this CL:
* Move some checks out of haveDecodedRow, since they are the same for the
entire frame e.g.
- intersecting the frameRect with the full image size
- whether there is a color table
* Change when we write transparent pixels
- In some cases, Chromium deemed this unnecessary, but I suspect it is slower
than the fallback case. There will continue to be cases where we should
*not* write them, but for e.g. the first pass where we have already
cleared to transparent (which we may also be able to skip) writing the
transparent pixels will not make anything incorrect.
* Report color type and alpha type per frame
- Depending on alpha values, disposal methods, frame rects, etc, subsequent
frames may have different properties than the first.
* Skip copies of the encoded data
- We copy the encoded data in case the stream is one that cannot be rewound,
so we can parse and then decode (possibly not immediately). For some input
streams, this is unnecessary.
- I was concerned this cause a performance regression, but on average the
new code is faster than the old for the images I tested [1].
- It may cause a performance regression for Chromium, though, where we can
always move back in the stream, so this should be addressed.
Design doc:
https://docs.google.com/a/google.com/document/d/12Qhf9T92MWfdWujQwCIjhCO3sw6pTJB5pJBwDM1T7Kc/
[1] https://docs.google.com/a/google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2045293002
Review-Url: https://codereview.chromium.org/2045293002
2016-10-24 16:03:26 +00:00
|
|
|
"src/codec/SkGifCodec.cpp",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/codec/SkMaskSwizzler.cpp",
|
|
|
|
"src/codec/SkMasks.cpp",
|
2016-07-27 20:55:26 +00:00
|
|
|
"src/codec/SkSampledCodec.cpp",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/codec/SkSampler.cpp",
|
Add support for multiple frames in SkCodec
Add an interface to decode frames beyond the first in SkCodec, and
add an implementation for SkGifCodec.
Add getFrameData to SkCodec. This method reads ahead in the stream
to return a vector containing meta data about each frame in the image.
This is not required in order to decode frames beyond the first, but
it allows a client to learn extra information:
- how long the frame should be displayed
- whether a frame should be blended with a prior frame, allowing the
client to provide the prior frame to speed up decoding
Add a new fields to SkCodec::Options:
- fFrameIndex
- fHasPriorFrame
The API is designed so that SkCodec never caches frames. If a
client wants a frame beyond the first, they specify the frame in
Options.fFrameIndex. If the client does not have the
frame's required frame (the frame that this frame must be blended on
top of) cached, they pass false for
Options.fHasPriorFrame. Unless the frame is
independent, the codec will then recursively decode all frames
necessary to decode fFrameIndex. If the client has the required frame
cached, they can put it in the dst they pass to the codec, and the
codec will only draw fFrameIndex onto it.
Replace SkGifCodec's scanline decoding support with progressive
decoding, and update the tests accordingly.
Implement new APIs in SkGifCodec. Instead of using gif_lib, use
GIFImageReader, imported from Chromium (along with its copyright
headers) with the following changes:
- SkGifCodec is now the client
- Replace blink types
- Combine GIFColorMap::buildTable and ::getTable into a method that
creates and returns an SkColorTable
- Input comes from an SkStream, instead of a SegmentReader. Add
SkStreamBuffer, which buffers the (potentially partial) stream in
order to decode progressively.
(FIXME: This requires copying data that previously was read directly
from the SegmentReader. Does this hurt performance? If so, can we
fix it?)
- Remove UMA code
- Instead of reporting screen width and height to the client, allow the
client to query for it
- Fail earlier if the first frame AND screen have size of zero
- Compute required previous frame when adding a new one
- Move GIFParseQuery from GIFImageDecoder to GIFImageReader
- Allow parsing up to a specific frame (to skip parsing the rest of the
stream if a client only wants the first frame)
- Compute whether the first frame has alpha and supports index 8, to
create the SkImageInfo. This happens before reporting that the size
has been decoded.
Add GIFImageDecoder::haveDecodedRow to SkGifCodec, imported from
Chromium (along with its copyright header), with the following changes:
- Add support for sampling
- Use the swizzler
- Keep track of the rows decoded
- Do *not* keep track of whether we've seen alpha
Remove SkCodec::kOutOfOrder_SkScanlineOrder, which was only used by GIF
scanline decoding.
Call onRewind even if there is no stream (SkGifCodec needs to clear its
decoded state so it will decode from the beginning).
Add a method to SkSwizzler to access the offset into the dst, taking
subsetting into account.
Add a GM that animates a GIF.
Add tests for the new APIs.
*** Behavior changes:
* Previously, we reported that an image with a subset frame and no transparent
index was opaque and used the background index (if present) to fill the
background. This is necessary in order to support index 8, but it does not
match viewers/browsers I have seen. Examples:
- Chromium and Gimp render the background transparent
- Firefox, Safari, Linux Image Viewer, Safari Preview clip to the frame (for
a single frame image)
This CL matches Chromium's behavior and renders the background transparent.
This allows us to have consistent behavior across products and simplifies
the code (relative to what we would have to do to continue the old behavior
on Android). It also means that we will no longer support index 8 for some
GIFs.
* Stop checking for GIFSTAMP - all GIFs should be either 89a or 87a.
This matches Chromium. I suspect that bugs would have been reported if valid
GIFs started with "GIFVER" instead of "GIF89a" or "GIF87a" (but did not decode
in Chromium).
*** Future work not included in this CL:
* Move some checks out of haveDecodedRow, since they are the same for the
entire frame e.g.
- intersecting the frameRect with the full image size
- whether there is a color table
* Change when we write transparent pixels
- In some cases, Chromium deemed this unnecessary, but I suspect it is slower
than the fallback case. There will continue to be cases where we should
*not* write them, but for e.g. the first pass where we have already
cleared to transparent (which we may also be able to skip) writing the
transparent pixels will not make anything incorrect.
* Report color type and alpha type per frame
- Depending on alpha values, disposal methods, frame rects, etc, subsequent
frames may have different properties than the first.
* Skip copies of the encoded data
- We copy the encoded data in case the stream is one that cannot be rewound,
so we can parse and then decode (possibly not immediately). For some input
streams, this is unnecessary.
- I was concerned this cause a performance regression, but on average the
new code is faster than the old for the images I tested [1].
- It may cause a performance regression for Chromium, though, where we can
always move back in the stream, so this should be addressed.
Design doc:
https://docs.google.com/a/google.com/document/d/12Qhf9T92MWfdWujQwCIjhCO3sw6pTJB5pJBwDM1T7Kc/
[1] https://docs.google.com/a/google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2045293002
Review-Url: https://codereview.chromium.org/2045293002
2016-10-24 16:03:26 +00:00
|
|
|
"src/codec/SkStreamBuffer.cpp",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/codec/SkSwizzler.cpp",
|
|
|
|
"src/codec/SkWbmpCodec.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/images/SkImageEncoder.cpp",
|
|
|
|
"src/ports/SkDiscardableMemory_none.cpp",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/ports/SkImageGenerator_skia.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports/SkMemory_malloc.cpp",
|
|
|
|
"src/ports/SkOSFile_stdio.cpp",
|
|
|
|
"src/sfnt/SkOTTable_name.cpp",
|
|
|
|
"src/sfnt/SkOTUtils.cpp",
|
|
|
|
"src/utils/mac/SkStream_mac.cpp",
|
2016-10-24 19:28:30 +00:00
|
|
|
"third_party/gif/SkGifImageReader.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
]
|
2016-09-01 21:24:39 +00:00
|
|
|
|
2016-08-25 21:50:44 +00:00
|
|
|
libs = []
|
|
|
|
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
if (is_win) {
|
|
|
|
sources += [
|
2016-10-11 21:49:33 +00:00
|
|
|
"src/fonts/SkFontMgr_indirect.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports/SkDebug_win.cpp",
|
|
|
|
"src/ports/SkFontHost_win.cpp",
|
|
|
|
"src/ports/SkFontMgr_win_dw.cpp",
|
2017-11-13 17:40:46 +00:00
|
|
|
"src/ports/SkFontMgr_win_dw_factory.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports/SkImageEncoder_WIC.cpp",
|
|
|
|
"src/ports/SkImageGeneratorWIC.cpp",
|
|
|
|
"src/ports/SkOSFile_win.cpp",
|
2016-09-21 21:01:32 +00:00
|
|
|
"src/ports/SkOSLibrary_win.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports/SkScalerContext_win_dw.cpp",
|
|
|
|
"src/ports/SkTLS_win.cpp",
|
|
|
|
"src/ports/SkTypeface_win_dw.cpp",
|
|
|
|
]
|
2016-10-11 22:13:53 +00:00
|
|
|
libs += [
|
|
|
|
"FontSub.lib",
|
2017-11-13 17:40:46 +00:00
|
|
|
"Gdi32.lib",
|
2016-10-11 22:13:53 +00:00
|
|
|
"Ole32.lib",
|
|
|
|
"OleAut32.lib",
|
|
|
|
"User32.lib",
|
2017-11-13 17:40:46 +00:00
|
|
|
"Usp10.lib",
|
2016-10-11 22:13:53 +00:00
|
|
|
]
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
} else {
|
|
|
|
sources += [
|
|
|
|
"src/ports/SkOSFile_posix.cpp",
|
2016-09-21 21:01:32 +00:00
|
|
|
"src/ports/SkOSLibrary_posix.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports/SkTLS_pthread.cpp",
|
|
|
|
]
|
2017-08-31 20:45:23 +00:00
|
|
|
libs += [ "dl" ]
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
|
|
|
|
2016-08-25 21:50:44 +00:00
|
|
|
if (is_android) {
|
2017-01-13 20:27:45 +00:00
|
|
|
deps += [ "//third_party/expat" ]
|
2017-03-03 14:21:30 +00:00
|
|
|
if (defined(ndk) && ndk != "") {
|
2017-01-13 20:27:45 +00:00
|
|
|
deps += [ "//third_party/cpu-features" ]
|
|
|
|
}
|
2016-09-20 19:28:12 +00:00
|
|
|
sources += [ "src/ports/SkDebug_android.cpp" ]
|
2016-08-25 21:50:44 +00:00
|
|
|
libs += [
|
|
|
|
"EGL",
|
|
|
|
"GLESv2",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
if (is_linux) {
|
2016-09-20 19:28:12 +00:00
|
|
|
sources += [ "src/ports/SkDebug_stdio.cpp" ]
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (is_mac) {
|
|
|
|
sources += [
|
2016-08-25 21:50:44 +00:00
|
|
|
"src/ports/SkDebug_stdio.cpp",
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
"src/ports/SkFontHost_mac.cpp",
|
|
|
|
"src/ports/SkImageEncoder_CG.cpp",
|
|
|
|
"src/ports/SkImageGeneratorCG.cpp",
|
|
|
|
]
|
2016-08-23 20:35:28 +00:00
|
|
|
libs += [
|
2017-03-29 15:32:02 +00:00
|
|
|
# AppKit symbols NSFontWeightXXX may be dlsym'ed.
|
|
|
|
"AppKit.framework",
|
2016-08-23 20:35:28 +00:00
|
|
|
"ApplicationServices.framework",
|
|
|
|
"OpenGL.framework",
|
|
|
|
]
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
2016-07-15 22:15:15 +00:00
|
|
|
|
2016-11-03 18:06:31 +00:00
|
|
|
if (is_ios) {
|
|
|
|
sources += [
|
|
|
|
"src/ports/SkDebug_stdio.cpp",
|
|
|
|
"src/ports/SkFontHost_mac.cpp",
|
|
|
|
"src/ports/SkImageEncoder_CG.cpp",
|
|
|
|
"src/ports/SkImageGeneratorCG.cpp",
|
|
|
|
]
|
|
|
|
libs += [
|
|
|
|
"CoreFoundation.framework",
|
|
|
|
"CoreGraphics.framework",
|
|
|
|
"CoreText.framework",
|
|
|
|
"ImageIO.framework",
|
|
|
|
"MobileCoreServices.framework",
|
2017-03-29 15:32:02 +00:00
|
|
|
|
|
|
|
# UIKit symbols UIFontWeightXXX may be dlsym'ed.
|
|
|
|
"UIKit.framework",
|
2016-11-03 18:06:31 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-07-15 22:15:15 +00:00
|
|
|
if (is_fuchsia) {
|
2016-09-20 19:28:12 +00:00
|
|
|
sources += [ "src/ports/SkDebug_stdio.cpp" ]
|
2016-07-15 22:15:15 +00:00
|
|
|
}
|
GN
What we've got here is a little GN MVP. It's lacking any knobs and doesn't yet build anything but libskia, zlib, libpng, and libjpeg-turbo. I've been hopping back and forth between Linux at work and Mac at home. These seem to be at least partially working, enough to build and run cmake/example.cpp.
The xcode backend seems to work. From here, we can start exploring how to handle other backends (cmake,Android make, Google3). There are a couple things I want to try:
- add another backend like vs or xcode to GN directly
- intercept via a custom toolchain
- reverse from ninja -t commands
That last option seems kind of fun.
This tries to piggyback on Chrome's GN setup as much as possible. Chrome's got quite a lot figured out, and we're basically required to do this if we want to have a single GN build system shareable by Chrome, our bots, and other clients.
This pulls in some new DEPS:
- build: Chrome's GN configuration, and much more
- buildtools: hashes for gn binary, pulled via hooks
- tools/clang: hashes for Chrome's clang, pulled via hooks into third_party/llvm-build
It additionally symlinks tools/gyp to third_party/externals/gyp. GN pulls some stuff from tools/gyp on Mac.
Have not yet tried building for Windows, Android, or iOS.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087593002
Committed: https://skia.googlesource.com/skia/+/1d8de594f126b9a80bd8f8fa2005e90faf3b5b17
Review-Url: https://codereview.chromium.org/2087593002
2016-06-23 17:29:30 +00:00
|
|
|
}
|
|
|
|
|
2016-11-18 14:35:28 +00:00
|
|
|
# Targets guarded by skia_enable_tools may use //third_party freely.
|
|
|
|
if (skia_enable_tools) {
|
2016-12-06 21:03:52 +00:00
|
|
|
# Used by gn_to_bp.py to list our public include dirs.
|
|
|
|
source_set("public") {
|
|
|
|
configs += [ ":skia_public" ]
|
|
|
|
}
|
|
|
|
|
2016-11-18 14:35:28 +00:00
|
|
|
config("skia.h_config") {
|
|
|
|
include_dirs = [ "$target_gen_dir" ]
|
2017-12-07 17:48:30 +00:00
|
|
|
if (skia_use_vulkan) {
|
|
|
|
# So we can get the header which includes vulkan
|
|
|
|
include_dirs += [ "tools/gpu/vk" ]
|
|
|
|
}
|
2016-11-18 14:35:28 +00:00
|
|
|
}
|
|
|
|
action("skia.h") {
|
|
|
|
public_configs = [ ":skia.h_config" ]
|
|
|
|
skia_h = "$target_gen_dir/skia.h"
|
|
|
|
script = "gn/find_headers.py"
|
2017-04-19 20:39:45 +00:00
|
|
|
args = [ rebase_path(skia_h, root_build_dir) ] +
|
2017-06-14 01:43:29 +00:00
|
|
|
rebase_path(skia_public_includes)
|
2016-11-18 14:35:28 +00:00
|
|
|
depfile = "$skia_h.deps"
|
|
|
|
outputs = [
|
|
|
|
skia_h,
|
|
|
|
]
|
|
|
|
}
|
2016-07-26 20:55:45 +00:00
|
|
|
|
2017-12-13 17:39:19 +00:00
|
|
|
if (skia_embed_resources) {
|
|
|
|
action("binary_resources.cpp") {
|
|
|
|
script = "gn/generate_binary_asset.py"
|
|
|
|
args = [
|
|
|
|
rebase_path("resources"),
|
|
|
|
"gResources",
|
|
|
|
rebase_path("$target_gen_dir/binary_resources.cpp", root_build_dir),
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"$target_gen_dir/binary_resources.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-18 14:35:28 +00:00
|
|
|
if (skia_enable_gpu && target_cpu == "x64") {
|
|
|
|
executable("fiddle") {
|
|
|
|
libs = []
|
|
|
|
sources = [
|
|
|
|
"tools/fiddle/draw.cpp",
|
|
|
|
"tools/fiddle/fiddle_main.cpp",
|
|
|
|
]
|
2017-05-31 13:45:19 +00:00
|
|
|
|
|
|
|
if (skia_use_egl) {
|
|
|
|
sources += [ "tools/fiddle/egl_context.cpp" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "tools/fiddle/null_context.cpp" ]
|
|
|
|
}
|
2017-04-19 18:05:14 +00:00
|
|
|
testonly = true
|
2016-11-18 14:35:28 +00:00
|
|
|
deps = [
|
2017-04-19 18:05:14 +00:00
|
|
|
":flags",
|
2017-11-16 19:59:48 +00:00
|
|
|
":gpu_tool_utils",
|
2016-11-18 14:35:28 +00:00
|
|
|
":skia",
|
|
|
|
":skia.h",
|
|
|
|
]
|
|
|
|
}
|
2016-09-15 19:07:48 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2016-11-18 14:35:28 +00:00
|
|
|
if (skia_enable_gpu) {
|
|
|
|
source_set("public_headers_warnings_check") {
|
|
|
|
sources = [
|
|
|
|
"tools/public_headers_warnings_check.cpp",
|
|
|
|
]
|
|
|
|
configs -= [ "//gn:warnings_except_public_headers" ]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":skia.h",
|
|
|
|
]
|
|
|
|
}
|
2016-11-16 17:13:44 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
template("test_lib") {
|
|
|
|
config(target_name + "_config") {
|
|
|
|
include_dirs = invoker.public_include_dirs
|
2016-09-20 20:36:47 +00:00
|
|
|
if (defined(invoker.public_defines)) {
|
|
|
|
defines = invoker.public_defines
|
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
}
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker, "*", [ "public_include_dirs" ])
|
|
|
|
public_configs = [
|
|
|
|
":" + target_name + "_config",
|
|
|
|
":skia_private",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (!defined(deps)) {
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
deps += [ ":skia" ]
|
|
|
|
testonly = true
|
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
template("test_app") {
|
2017-11-28 14:45:26 +00:00
|
|
|
if (is_ios) {
|
|
|
|
app_name = target_name
|
|
|
|
gen_path = target_gen_dir
|
|
|
|
|
|
|
|
action("${app_name}_generate_info_plist") {
|
|
|
|
script = "//gn/gen_plist_ios.py"
|
|
|
|
outputs = [
|
|
|
|
"$gen_path/${app_name}_Info.plist",
|
|
|
|
]
|
|
|
|
args = [ rebase_path("$gen_path/$app_name", root_build_dir) ]
|
2017-01-05 15:54:57 +00:00
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
|
|
|
|
bundle_data("${app_name}_bundle_info_plist") {
|
|
|
|
public_deps = [
|
|
|
|
":${app_name}_generate_info_plist",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"$gen_path/${app_name}_Info.plist",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"{{bundle_root_dir}}/Info.plist",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-11-29 16:42:33 +00:00
|
|
|
bundle_ios_data =
|
|
|
|
defined(invoker.bundle_ios_data) && invoker.bundle_ios_data
|
|
|
|
|
|
|
|
if (bundle_ios_data) {
|
|
|
|
has_skps =
|
|
|
|
"True" == exec_script("//gn/checkdir.py",
|
|
|
|
[ rebase_path("skps", root_build_dir) ],
|
|
|
|
"trim string")
|
|
|
|
bundle_data("${app_name}_bundle_resources") {
|
|
|
|
sources = [
|
|
|
|
"resources",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
# iOS reserves the folders 'Resources' and 'resources' so store one level deeper
|
|
|
|
"{{bundle_resources_dir}}/data/resources",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (has_skps) {
|
|
|
|
bundle_data("${app_name}_bundle_skps") {
|
|
|
|
sources = [
|
|
|
|
"skps",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
# Store in same folder as resources
|
|
|
|
"{{bundle_resources_dir}}/data/skps",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-28 14:45:26 +00:00
|
|
|
executable("${app_name}_generate_executable") {
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
|
|
|
"output_name",
|
|
|
|
"visibility",
|
|
|
|
"is_shared_library",
|
|
|
|
])
|
2017-07-26 19:13:47 +00:00
|
|
|
configs += [ ":skia_private" ]
|
2017-01-05 15:54:57 +00:00
|
|
|
testonly = true
|
2017-11-28 14:45:26 +00:00
|
|
|
output_name = rebase_path("$gen_path/$app_name", root_build_dir)
|
2017-01-05 15:54:57 +00:00
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
|
|
|
|
bundle_data("${app_name}_bundle_executable") {
|
|
|
|
public_deps = [
|
|
|
|
":${app_name}_generate_executable",
|
2017-01-05 17:20:41 +00:00
|
|
|
]
|
2017-11-28 14:45:26 +00:00
|
|
|
sources = [
|
|
|
|
"$gen_path/$app_name",
|
2017-01-05 17:20:41 +00:00
|
|
|
]
|
2017-11-28 14:45:26 +00:00
|
|
|
outputs = [
|
|
|
|
"{{bundle_executable_dir}}/$app_name",
|
2017-01-05 17:20:41 +00:00
|
|
|
]
|
|
|
|
testonly = true
|
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
|
|
|
|
create_bundle("$app_name") {
|
|
|
|
product_type = "com.apple.product-type.application"
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
bundle_root_dir = "${root_build_dir}/${target_name}.app"
|
|
|
|
bundle_resources_dir = bundle_root_dir
|
|
|
|
bundle_executable_dir = bundle_root_dir
|
|
|
|
bundle_plugins_dir = bundle_root_dir + "/Plugins"
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":${app_name}_bundle_executable",
|
|
|
|
":${app_name}_bundle_info_plist",
|
|
|
|
]
|
2017-11-29 16:42:33 +00:00
|
|
|
if (bundle_ios_data) {
|
|
|
|
deps += [ ":${app_name}_bundle_resources" ]
|
|
|
|
if (has_skps) {
|
|
|
|
deps += [ ":${app_name}_bundle_skps" ]
|
|
|
|
}
|
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
|
|
|
|
# should only code sign when running on a device, not the simulator
|
|
|
|
if (target_cpu != "x64") {
|
|
|
|
code_signing_script = "//gn/codesign_ios.py"
|
|
|
|
code_signing_sources = [ "$target_gen_dir/$app_name" ]
|
|
|
|
code_signing_outputs = [
|
|
|
|
"$bundle_root_dir/_CodeSignature/CodeResources",
|
|
|
|
"$bundle_root_dir/embedded.mobileprovision",
|
|
|
|
]
|
2017-12-07 20:16:10 +00:00
|
|
|
code_signing_args = [
|
|
|
|
rebase_path("$bundle_root_dir", root_build_dir),
|
|
|
|
skia_ios_identity,
|
|
|
|
skia_ios_profile,
|
|
|
|
]
|
2017-11-28 14:45:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
# !is_ios
|
|
|
|
|
|
|
|
if (defined(invoker.is_shared_library) && invoker.is_shared_library) {
|
|
|
|
shared_library("lib" + target_name) {
|
|
|
|
forward_variables_from(invoker, "*", [ "is_shared_library" ])
|
|
|
|
configs += [ ":skia_private" ]
|
|
|
|
testonly = true
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
_executable = target_name
|
|
|
|
executable(_executable) {
|
|
|
|
forward_variables_from(invoker, "*", [ "is_shared_library" ])
|
|
|
|
configs += [ ":skia_private" ]
|
|
|
|
testonly = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (is_android && skia_android_serial != "" && defined(_executable)) {
|
|
|
|
action("push_" + target_name) {
|
|
|
|
script = "gn/push_to_android.py"
|
|
|
|
deps = [
|
|
|
|
":" + _executable,
|
|
|
|
]
|
|
|
|
_stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial"
|
|
|
|
outputs = [
|
|
|
|
_stamp,
|
|
|
|
]
|
|
|
|
args = [
|
|
|
|
rebase_path("$root_build_dir/$_executable"),
|
|
|
|
skia_android_serial,
|
|
|
|
rebase_path(_stamp),
|
|
|
|
]
|
|
|
|
testonly = true
|
|
|
|
}
|
|
|
|
}
|
2017-01-05 17:20:41 +00:00
|
|
|
}
|
2017-01-05 15:54:57 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("gpu_tool_utils") {
|
2016-09-21 17:11:25 +00:00
|
|
|
public_include_dirs = []
|
|
|
|
if (skia_enable_gpu) {
|
|
|
|
public_defines = []
|
|
|
|
public_include_dirs += [ "tools/gpu" ]
|
2016-09-23 20:18:41 +00:00
|
|
|
|
|
|
|
deps = []
|
2016-09-21 17:11:25 +00:00
|
|
|
sources = [
|
|
|
|
"tools/gpu/GrContextFactory.cpp",
|
|
|
|
"tools/gpu/GrTest.cpp",
|
|
|
|
"tools/gpu/TestContext.cpp",
|
2017-11-19 18:20:13 +00:00
|
|
|
"tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp",
|
2016-09-21 17:11:25 +00:00
|
|
|
"tools/gpu/gl/GLTestContext.cpp",
|
2016-09-21 21:01:32 +00:00
|
|
|
"tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
|
2016-09-21 17:11:25 +00:00
|
|
|
"tools/gpu/gl/debug/DebugGLTestContext.cpp",
|
|
|
|
"tools/gpu/gl/debug/GrBufferObj.cpp",
|
|
|
|
"tools/gpu/gl/debug/GrFrameBufferObj.cpp",
|
|
|
|
"tools/gpu/gl/debug/GrProgramObj.cpp",
|
|
|
|
"tools/gpu/gl/debug/GrShaderObj.cpp",
|
|
|
|
"tools/gpu/gl/debug/GrTextureObj.cpp",
|
|
|
|
"tools/gpu/gl/debug/GrTextureUnitObj.cpp",
|
|
|
|
"tools/gpu/gl/null/NullGLTestContext.cpp",
|
2017-07-06 20:40:18 +00:00
|
|
|
"tools/gpu/mock/MockTestContext.cpp",
|
2016-09-21 17:11:25 +00:00
|
|
|
]
|
|
|
|
libs = []
|
|
|
|
|
2017-03-29 15:19:01 +00:00
|
|
|
if (is_android || skia_use_egl) {
|
2016-09-21 17:11:25 +00:00
|
|
|
sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
|
2016-11-03 18:06:31 +00:00
|
|
|
} else if (is_ios) {
|
|
|
|
sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
|
|
|
|
libs += [ "OpenGLES.framework" ]
|
2016-09-21 17:11:25 +00:00
|
|
|
} else if (is_linux) {
|
|
|
|
sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
|
2017-02-23 15:31:13 +00:00
|
|
|
libs += [ "X11" ]
|
2016-09-21 17:11:25 +00:00
|
|
|
} else if (is_mac) {
|
|
|
|
sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
|
2016-10-11 22:13:53 +00:00
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
|
|
|
|
libs += [
|
|
|
|
"Gdi32.lib",
|
|
|
|
"OpenGL32.lib",
|
|
|
|
]
|
2016-09-21 17:11:25 +00:00
|
|
|
}
|
2016-11-11 20:35:34 +00:00
|
|
|
|
2017-07-12 20:21:09 +00:00
|
|
|
cflags_objcc = [ "-fobjc-arc" ]
|
|
|
|
|
2016-11-14 14:53:13 +00:00
|
|
|
if (skia_use_angle) {
|
|
|
|
deps += [ "//third_party/angle2" ]
|
|
|
|
sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
|
|
|
|
}
|
2016-09-23 20:18:41 +00:00
|
|
|
if (skia_use_vulkan) {
|
|
|
|
sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
|
2017-11-10 15:03:05 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
|
2016-09-23 20:18:41 +00:00
|
|
|
}
|
2017-07-13 19:07:54 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
|
|
|
|
}
|
2016-09-20 20:36:47 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("flags") {
|
|
|
|
public_include_dirs = [ "tools/flags" ]
|
|
|
|
sources = [
|
|
|
|
"tools/flags/SkCommandLineFlags.cpp",
|
2016-09-16 17:23:12 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
test_lib("common_flags") {
|
|
|
|
public_include_dirs = [ "tools/flags" ]
|
|
|
|
sources = [
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/flags/SkCommonFlags.cpp",
|
|
|
|
"tools/flags/SkCommonFlagsConfig.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
2016-09-16 17:23:12 +00:00
|
|
|
":flags",
|
2016-08-24 19:23:52 +00:00
|
|
|
":gpu_tool_utils",
|
|
|
|
]
|
2016-07-27 20:55:26 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("tool_utils") {
|
|
|
|
public_include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
|
|
|
"tools/timer",
|
2017-07-19 14:53:20 +00:00
|
|
|
"tools/trace",
|
2016-08-24 19:23:52 +00:00
|
|
|
]
|
|
|
|
sources = [
|
2016-09-09 18:07:45 +00:00
|
|
|
"tools/AndroidSkDebugToStdOut.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/CrashHandler.cpp",
|
2016-09-01 14:06:54 +00:00
|
|
|
"tools/LsanSuppressions.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/ProcStats.cpp",
|
|
|
|
"tools/Resources.cpp",
|
2017-11-10 16:33:43 +00:00
|
|
|
"tools/SkRandomScalerContext.cpp",
|
|
|
|
"tools/SkTestScalerContext.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/SkDebugCanvas.cpp",
|
|
|
|
"tools/debugger/SkDrawCommand.cpp",
|
|
|
|
"tools/debugger/SkJsonWriteBuffer.cpp",
|
|
|
|
"tools/debugger/SkObjectParser.cpp",
|
|
|
|
"tools/picture_utils.cpp",
|
|
|
|
"tools/random_parse_path.cpp",
|
|
|
|
"tools/sk_tool_utils.cpp",
|
|
|
|
"tools/sk_tool_utils_font.cpp",
|
|
|
|
"tools/timer/Timer.cpp",
|
2017-07-20 19:43:35 +00:00
|
|
|
"tools/trace/SkChromeTracingTracer.cpp",
|
|
|
|
"tools/trace/SkChromeTracingTracer.h",
|
2017-07-19 14:53:20 +00:00
|
|
|
"tools/trace/SkDebugfTracer.cpp",
|
|
|
|
"tools/trace/SkDebugfTracer.h",
|
2017-07-20 19:43:35 +00:00
|
|
|
"tools/trace/SkEventTracingPriv.cpp",
|
|
|
|
"tools/trace/SkEventTracingPriv.h",
|
2016-08-24 19:23:52 +00:00
|
|
|
]
|
2017-02-06 14:26:14 +00:00
|
|
|
libs = []
|
|
|
|
if (is_ios) {
|
|
|
|
sources += [ "tools/ios_utils.m" ]
|
|
|
|
libs += [ "Foundation.framework" ]
|
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
deps = [
|
2016-09-16 17:23:12 +00:00
|
|
|
":common_flags",
|
2016-08-24 19:23:52 +00:00
|
|
|
":flags",
|
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
public_deps = [
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
]
|
2017-12-08 18:35:47 +00:00
|
|
|
if (skia_embed_resources) {
|
|
|
|
defines = [ "SK_EMBED_RESOURCES" ]
|
|
|
|
sources += [ "$target_gen_dir/binary_resources.cpp" ]
|
|
|
|
deps += [ ":binary_resources.cpp" ]
|
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2016-10-27 16:21:40 +00:00
|
|
|
import("gn/gm.gni")
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("gm") {
|
|
|
|
public_include_dirs = [ "gm" ]
|
|
|
|
sources = gm_sources
|
|
|
|
deps = [
|
2017-12-19 17:21:02 +00:00
|
|
|
":experimental_sksg",
|
Add support for multiple frames in SkCodec
Add an interface to decode frames beyond the first in SkCodec, and
add an implementation for SkGifCodec.
Add getFrameData to SkCodec. This method reads ahead in the stream
to return a vector containing meta data about each frame in the image.
This is not required in order to decode frames beyond the first, but
it allows a client to learn extra information:
- how long the frame should be displayed
- whether a frame should be blended with a prior frame, allowing the
client to provide the prior frame to speed up decoding
Add a new fields to SkCodec::Options:
- fFrameIndex
- fHasPriorFrame
The API is designed so that SkCodec never caches frames. If a
client wants a frame beyond the first, they specify the frame in
Options.fFrameIndex. If the client does not have the
frame's required frame (the frame that this frame must be blended on
top of) cached, they pass false for
Options.fHasPriorFrame. Unless the frame is
independent, the codec will then recursively decode all frames
necessary to decode fFrameIndex. If the client has the required frame
cached, they can put it in the dst they pass to the codec, and the
codec will only draw fFrameIndex onto it.
Replace SkGifCodec's scanline decoding support with progressive
decoding, and update the tests accordingly.
Implement new APIs in SkGifCodec. Instead of using gif_lib, use
GIFImageReader, imported from Chromium (along with its copyright
headers) with the following changes:
- SkGifCodec is now the client
- Replace blink types
- Combine GIFColorMap::buildTable and ::getTable into a method that
creates and returns an SkColorTable
- Input comes from an SkStream, instead of a SegmentReader. Add
SkStreamBuffer, which buffers the (potentially partial) stream in
order to decode progressively.
(FIXME: This requires copying data that previously was read directly
from the SegmentReader. Does this hurt performance? If so, can we
fix it?)
- Remove UMA code
- Instead of reporting screen width and height to the client, allow the
client to query for it
- Fail earlier if the first frame AND screen have size of zero
- Compute required previous frame when adding a new one
- Move GIFParseQuery from GIFImageDecoder to GIFImageReader
- Allow parsing up to a specific frame (to skip parsing the rest of the
stream if a client only wants the first frame)
- Compute whether the first frame has alpha and supports index 8, to
create the SkImageInfo. This happens before reporting that the size
has been decoded.
Add GIFImageDecoder::haveDecodedRow to SkGifCodec, imported from
Chromium (along with its copyright header), with the following changes:
- Add support for sampling
- Use the swizzler
- Keep track of the rows decoded
- Do *not* keep track of whether we've seen alpha
Remove SkCodec::kOutOfOrder_SkScanlineOrder, which was only used by GIF
scanline decoding.
Call onRewind even if there is no stream (SkGifCodec needs to clear its
decoded state so it will decode from the beginning).
Add a method to SkSwizzler to access the offset into the dst, taking
subsetting into account.
Add a GM that animates a GIF.
Add tests for the new APIs.
*** Behavior changes:
* Previously, we reported that an image with a subset frame and no transparent
index was opaque and used the background index (if present) to fill the
background. This is necessary in order to support index 8, but it does not
match viewers/browsers I have seen. Examples:
- Chromium and Gimp render the background transparent
- Firefox, Safari, Linux Image Viewer, Safari Preview clip to the frame (for
a single frame image)
This CL matches Chromium's behavior and renders the background transparent.
This allows us to have consistent behavior across products and simplifies
the code (relative to what we would have to do to continue the old behavior
on Android). It also means that we will no longer support index 8 for some
GIFs.
* Stop checking for GIFSTAMP - all GIFs should be either 89a or 87a.
This matches Chromium. I suspect that bugs would have been reported if valid
GIFs started with "GIFVER" instead of "GIF89a" or "GIF87a" (but did not decode
in Chromium).
*** Future work not included in this CL:
* Move some checks out of haveDecodedRow, since they are the same for the
entire frame e.g.
- intersecting the frameRect with the full image size
- whether there is a color table
* Change when we write transparent pixels
- In some cases, Chromium deemed this unnecessary, but I suspect it is slower
than the fallback case. There will continue to be cases where we should
*not* write them, but for e.g. the first pass where we have already
cleared to transparent (which we may also be able to skip) writing the
transparent pixels will not make anything incorrect.
* Report color type and alpha type per frame
- Depending on alpha values, disposal methods, frame rects, etc, subsequent
frames may have different properties than the first.
* Skip copies of the encoded data
- We copy the encoded data in case the stream is one that cannot be rewound,
so we can parse and then decode (possibly not immediately). For some input
streams, this is unnecessary.
- I was concerned this cause a performance regression, but on average the
new code is faster than the old for the images I tested [1].
- It may cause a performance regression for Chromium, though, where we can
always move back in the stream, so this should be addressed.
Design doc:
https://docs.google.com/a/google.com/document/d/12Qhf9T92MWfdWujQwCIjhCO3sw6pTJB5pJBwDM1T7Kc/
[1] https://docs.google.com/a/google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2045293002
Review-Url: https://codereview.chromium.org/2045293002
2016-10-24 16:03:26 +00:00
|
|
|
":flags",
|
2016-08-24 19:23:52 +00:00
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2016-10-27 16:21:40 +00:00
|
|
|
import("gn/tests.gni")
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("tests") {
|
|
|
|
public_include_dirs = [ "tests" ]
|
2016-10-27 16:21:40 +00:00
|
|
|
sources = tests_sources + pathops_tests_sources
|
2016-08-29 22:22:10 +00:00
|
|
|
if (!fontmgr_android_enabled) {
|
2016-10-27 16:21:40 +00:00
|
|
|
sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ]
|
2016-08-29 22:22:10 +00:00
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
deps = [
|
2017-12-19 17:21:02 +00:00
|
|
|
":experimental_sksg",
|
2016-08-25 15:44:35 +00:00
|
|
|
":experimental_svg_model",
|
2016-08-24 19:23:52 +00:00
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
"//third_party/libpng",
|
|
|
|
"//third_party/zlib",
|
|
|
|
]
|
2017-03-27 18:16:04 +00:00
|
|
|
public_deps = [
|
|
|
|
":gpu_tool_utils", # Test.h #includes headers from this target.
|
|
|
|
]
|
2016-08-24 19:23:52 +00:00
|
|
|
}
|
2016-08-02 23:02:05 +00:00
|
|
|
|
2016-10-27 16:21:40 +00:00
|
|
|
import("gn/bench.gni")
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("bench") {
|
|
|
|
public_include_dirs = [ "bench" ]
|
|
|
|
sources = bench_sources
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
2016-07-28 21:17:33 +00:00
|
|
|
|
2018-01-16 22:04:30 +00:00
|
|
|
test_lib("experimental_skottie") {
|
|
|
|
public_include_dirs = [ "experimental/skottie" ]
|
2017-12-30 17:27:00 +00:00
|
|
|
include_dirs = [ "tools" ]
|
|
|
|
sources = [
|
2018-01-16 22:04:30 +00:00
|
|
|
"experimental/skottie/Skottie.cpp",
|
|
|
|
"experimental/skottie/SkottieAnimator.cpp",
|
2018-01-25 20:27:33 +00:00
|
|
|
"experimental/skottie/SkottieParser.cpp",
|
2018-01-16 22:04:30 +00:00
|
|
|
"experimental/skottie/SkottieProperties.cpp",
|
2017-12-30 17:27:00 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":experimental_sksg",
|
|
|
|
":skia",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("experimental_svg_model") {
|
|
|
|
public_include_dirs = [ "experimental/svg/model" ]
|
|
|
|
sources = [
|
|
|
|
"experimental/svg/model/SkSVGAttribute.cpp",
|
|
|
|
"experimental/svg/model/SkSVGAttributeParser.cpp",
|
|
|
|
"experimental/svg/model/SkSVGCircle.cpp",
|
2016-12-08 14:26:47 +00:00
|
|
|
"experimental/svg/model/SkSVGClipPath.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGContainer.cpp",
|
|
|
|
"experimental/svg/model/SkSVGDOM.cpp",
|
|
|
|
"experimental/svg/model/SkSVGEllipse.cpp",
|
2017-10-09 19:14:13 +00:00
|
|
|
"experimental/svg/model/SkSVGGradient.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGLine.cpp",
|
2016-09-13 00:06:47 +00:00
|
|
|
"experimental/svg/model/SkSVGLinearGradient.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGNode.cpp",
|
|
|
|
"experimental/svg/model/SkSVGPath.cpp",
|
2017-10-11 18:34:33 +00:00
|
|
|
"experimental/svg/model/SkSVGPattern.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGPoly.cpp",
|
2017-10-09 20:05:30 +00:00
|
|
|
"experimental/svg/model/SkSVGRadialGradient.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGRect.cpp",
|
|
|
|
"experimental/svg/model/SkSVGRenderContext.cpp",
|
|
|
|
"experimental/svg/model/SkSVGSVG.cpp",
|
|
|
|
"experimental/svg/model/SkSVGShape.cpp",
|
2016-09-13 00:06:47 +00:00
|
|
|
"experimental/svg/model/SkSVGStop.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGTransformableNode.cpp",
|
2017-10-11 18:02:11 +00:00
|
|
|
"experimental/svg/model/SkSVGUse.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"experimental/svg/model/SkSVGValue.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
2016-08-04 02:53:36 +00:00
|
|
|
|
2017-12-19 17:21:02 +00:00
|
|
|
test_lib("experimental_sksg") {
|
|
|
|
public_include_dirs = [
|
|
|
|
"experimental/sksg",
|
|
|
|
"experimental/sksg/effects",
|
|
|
|
"experimental/sksg/geometry",
|
|
|
|
"experimental/sksg/paint",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"experimental/sksg/SkSGDraw.cpp",
|
|
|
|
"experimental/sksg/SkSGEffectNode.cpp",
|
|
|
|
"experimental/sksg/SkSGGeometryNode.cpp",
|
|
|
|
"experimental/sksg/SkSGGroup.cpp",
|
2018-01-08 17:51:12 +00:00
|
|
|
"experimental/sksg/SkSGImage.cpp",
|
2017-12-19 17:21:02 +00:00
|
|
|
"experimental/sksg/SkSGInvalidationController.cpp",
|
|
|
|
"experimental/sksg/SkSGNode.cpp",
|
|
|
|
"experimental/sksg/SkSGPaintNode.cpp",
|
|
|
|
"experimental/sksg/SkSGRenderNode.cpp",
|
2018-01-22 17:57:06 +00:00
|
|
|
"experimental/sksg/SkSGScene.cpp",
|
2018-01-10 18:36:22 +00:00
|
|
|
"experimental/sksg/effects/SkSGMaskEffect.cpp",
|
2018-01-08 21:42:59 +00:00
|
|
|
"experimental/sksg/effects/SkSGOpacityEffect.cpp",
|
2017-12-19 17:21:02 +00:00
|
|
|
"experimental/sksg/effects/SkSGTransform.cpp",
|
2018-01-19 20:07:29 +00:00
|
|
|
"experimental/sksg/geometry/SkSGGeometryTransform.cpp",
|
2018-01-04 04:37:54 +00:00
|
|
|
"experimental/sksg/geometry/SkSGMerge.cpp",
|
2017-12-27 16:13:13 +00:00
|
|
|
"experimental/sksg/geometry/SkSGPath.cpp",
|
2017-12-19 17:21:02 +00:00
|
|
|
"experimental/sksg/geometry/SkSGRect.cpp",
|
2018-01-07 13:54:24 +00:00
|
|
|
"experimental/sksg/geometry/SkSGTrimEffect.cpp",
|
2017-12-19 17:21:02 +00:00
|
|
|
"experimental/sksg/paint/SkSGColor.cpp",
|
2018-01-12 17:25:09 +00:00
|
|
|
"experimental/sksg/paint/SkSGGradient.cpp",
|
2017-12-19 17:21:02 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-09-21 17:45:16 +00:00
|
|
|
if (target_cpu != "wasm") {
|
|
|
|
test_lib("views") {
|
|
|
|
public_include_dirs = [ "include/views" ]
|
|
|
|
sources = [
|
|
|
|
"src/views/SkEvent.cpp",
|
|
|
|
"src/views/SkEventSink.cpp",
|
|
|
|
"src/views/SkTouchGesture.cpp",
|
|
|
|
"src/views/SkView.cpp",
|
2016-10-18 18:42:44 +00:00
|
|
|
]
|
2016-12-05 14:46:02 +00:00
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
|
|
|
|
2016-11-11 16:39:44 +00:00
|
|
|
if (skia_use_lua) {
|
|
|
|
test_lib("lua") {
|
|
|
|
public_include_dirs = []
|
|
|
|
sources = [
|
|
|
|
"src/utils/SkLua.cpp",
|
|
|
|
"src/utils/SkLuaCanvas.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
"//third_party/lua",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("lua_app") {
|
2016-11-11 16:39:44 +00:00
|
|
|
sources = [
|
|
|
|
"tools/lua/lua_app.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":lua",
|
|
|
|
":skia",
|
|
|
|
"//third_party/lua",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("lua_pictures") {
|
2016-11-11 16:39:44 +00:00
|
|
|
sources = [
|
|
|
|
"tools/lua/lua_pictures.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":lua",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
"//third_party/lua",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-28 15:04:54 +00:00
|
|
|
test_app("bookmaker") {
|
|
|
|
sources = [
|
|
|
|
"tools/bookmaker/bookmaker.cpp",
|
2017-10-31 19:44:45 +00:00
|
|
|
"tools/bookmaker/cataloger.cpp",
|
2017-11-27 15:44:06 +00:00
|
|
|
"tools/bookmaker/definition.cpp",
|
2017-07-28 15:04:54 +00:00
|
|
|
"tools/bookmaker/fiddleParser.cpp",
|
|
|
|
"tools/bookmaker/includeParser.cpp",
|
|
|
|
"tools/bookmaker/includeWriter.cpp",
|
|
|
|
"tools/bookmaker/mdOut.cpp",
|
|
|
|
"tools/bookmaker/parserCommon.cpp",
|
2018-01-11 15:35:44 +00:00
|
|
|
"tools/bookmaker/selfCheck.cpp",
|
2017-07-28 15:04:54 +00:00
|
|
|
"tools/bookmaker/spellCheck.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
2017-12-11 21:03:17 +00:00
|
|
|
"//third_party/jsoncpp",
|
2017-07-28 15:04:54 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-09-21 17:45:16 +00:00
|
|
|
if (target_cpu != "wasm") {
|
|
|
|
import("gn/samples.gni")
|
|
|
|
test_lib("samples") {
|
|
|
|
public_include_dirs = [ "samplecode" ]
|
|
|
|
include_dirs = [ "experimental" ]
|
|
|
|
sources = samples_sources + [
|
|
|
|
# Relocating these files here, so that clients don't try to build them while they're
|
|
|
|
# still in active development. Clang's thread safety analysis gets tripped up by
|
|
|
|
# conditional locks.
|
|
|
|
"src/core/SkThreadedBMPDevice.cpp",
|
|
|
|
"src/core/SkThreadedBMPDevice.h",
|
|
|
|
]
|
|
|
|
deps = [
|
2017-12-19 17:21:02 +00:00
|
|
|
":experimental_sksg",
|
2017-09-21 17:45:16 +00:00
|
|
|
":experimental_svg_model",
|
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":tool_utils",
|
|
|
|
":views",
|
|
|
|
":xml",
|
|
|
|
]
|
2016-11-11 16:39:44 +00:00
|
|
|
|
2017-09-21 17:45:16 +00:00
|
|
|
if (skia_use_lua) {
|
|
|
|
sources += [ "samplecode/SampleLua.cpp" ]
|
|
|
|
deps += [
|
|
|
|
":lua",
|
|
|
|
"//third_party/lua",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test_app("dm") {
|
|
|
|
sources = [
|
|
|
|
"dm/DM.cpp",
|
2017-11-06 17:02:47 +00:00
|
|
|
"dm/DMFontMgr.cpp",
|
2017-10-09 20:13:02 +00:00
|
|
|
"dm/DMGpuTestProcs.cpp",
|
2017-09-21 17:45:16 +00:00
|
|
|
"dm/DMJsonWriter.cpp",
|
|
|
|
"dm/DMSrcSink.cpp",
|
|
|
|
]
|
|
|
|
include_dirs = [ "tests" ]
|
|
|
|
deps = [
|
|
|
|
":common_flags",
|
2018-01-16 22:04:30 +00:00
|
|
|
":experimental_skottie",
|
2017-12-19 17:21:02 +00:00
|
|
|
":experimental_sksg",
|
2017-09-21 17:45:16 +00:00
|
|
|
":experimental_svg_model",
|
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tests",
|
|
|
|
":tool_utils",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
"//third_party/libpng",
|
2016-11-11 16:39:44 +00:00
|
|
|
]
|
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
|
|
|
|
2018-01-09 17:34:11 +00:00
|
|
|
if (!is_win) {
|
|
|
|
test_app("remote_demo") {
|
|
|
|
sources = [
|
|
|
|
"tools/remote_demo.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-21 17:14:33 +00:00
|
|
|
test_app("ok") {
|
|
|
|
sources = [
|
2017-11-07 13:14:52 +00:00
|
|
|
"dm/DMFontMgr.cpp",
|
2017-03-21 17:14:33 +00:00
|
|
|
"tools/ok.cpp",
|
2017-03-25 15:29:41 +00:00
|
|
|
"tools/ok_dsts.cpp",
|
2017-07-26 19:13:47 +00:00
|
|
|
"tools/ok_engines.cpp",
|
2017-03-25 15:29:41 +00:00
|
|
|
"tools/ok_srcs.cpp",
|
2017-03-27 18:16:04 +00:00
|
|
|
"tools/ok_test.cpp",
|
2017-03-25 16:32:22 +00:00
|
|
|
"tools/ok_vias.cpp",
|
2017-03-21 17:14:33 +00:00
|
|
|
]
|
|
|
|
deps = [
|
ok, add a bench source
This new source acts like other sources (GMs, SKPs) for benchmarks. It
times multiple samples (controlled by samples=N, default 20), and each
of those samples uses the same strategy as monobench, growing loops
exponentially until it runs for at least 10ms.
When done it prints the fastest and the two slowest samples. In
practice the 100th percentile sample is very different from the
next slowest due to caching, and the fastest is always interesting.
Because these benchmarks run in whatever execution engine ok has
selected, on non-Windows platforms you have some real control over the
interaction between benchmarks. In its default "fork" mode each
benchmark runs independently in its own process, so the 100th
percentiles really stand out. The other modes "thread" and "serial"
work as you'd expect too.
Here's an example where you can see how the different interactions work:
out/ok bench:samples=100 8888 filter:search=text_16_AA fork
[text_16_AA_WT] 2.32µs @0 6.23µs @99 24.3ms @100
[text_16_AA_FF] 2.41µs @0 5.7µs @99 23.3ms @100
[text_16_AA_88] 2.55µs @0 5.6µs @99 24.8ms @100
[text_16_AA_BK] 1.97µs @0 5.44µs @99 23.2ms @100
out/ok bench:samples=100 8888 filter:search=text_16_AA thread
[text_16_AA_FF] 2.45µs @0 23.5µs @99 24.8ms @100
[text_16_AA_WT] 2.52µs @0 17.8µs @99 24.7ms @100
[text_16_AA_88] 2.55µs @0 19.7µs @99 25.1ms @100
[text_16_AA_BK] 1.8µs @0 14.7µs @99 25.1ms @100
out/ok bench:samples=100 8888 filter:search=text_16_AA serial
[text_16_AA_88] 2.35µs @0 3.53µs @99 16.7ms @100
[text_16_AA_FF] 2.09µs @0 2.73µs @99 2.91µs @100
[text_16_AA_BK] 1.75µs @0 2.46µs @99 2.65µs @100
[text_16_AA_WT] 2.1µs @0 3.16µs @99 3.17µs @100
In the first "fork" case all runs are independent and have roughly
the same profile. "thread" looks similar except you can see them
contending at the 99th percentile. In "serial", the first bench
warms up the rest, so their 100th percentiles are all much faster.
Change-Id: I01a9f8c54b540221a9f232b271bb8ef3fda2569c
Reviewed-on: https://skia-review.googlesource.com/33585
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 14:37:35 +00:00
|
|
|
":bench",
|
2017-03-21 17:14:33 +00:00
|
|
|
":gm",
|
|
|
|
":skia",
|
2017-03-27 18:16:04 +00:00
|
|
|
":tests",
|
2017-05-09 20:03:07 +00:00
|
|
|
":tool_utils",
|
2017-03-21 17:14:33 +00:00
|
|
|
]
|
|
|
|
}
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("nanobench") {
|
2016-07-28 21:17:33 +00:00
|
|
|
sources = [
|
|
|
|
"bench/nanobench.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":bench",
|
2016-09-16 17:23:12 +00:00
|
|
|
":common_flags",
|
2017-12-19 17:21:02 +00:00
|
|
|
":experimental_sksg",
|
2016-09-14 15:05:17 +00:00
|
|
|
":experimental_svg_model",
|
2016-07-28 21:17:33 +00:00
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
]
|
|
|
|
}
|
2016-08-03 22:08:04 +00:00
|
|
|
|
2017-01-31 14:49:18 +00:00
|
|
|
test_app("skpinfo") {
|
|
|
|
sources = [
|
|
|
|
"tools/skpinfo.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-10-31 13:52:33 +00:00
|
|
|
if (skia_enable_gpu) {
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("skpbench") {
|
2016-10-31 13:52:33 +00:00
|
|
|
sources = [
|
|
|
|
"tools/skpbench/skpbench.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
2016-10-28 14:38:08 +00:00
|
|
|
}
|
2016-09-19 18:03:58 +00:00
|
|
|
}
|
|
|
|
|
2016-11-03 18:06:31 +00:00
|
|
|
# We can't yet build ICU on iOS or Windows.
|
2017-09-21 17:45:16 +00:00
|
|
|
if (!is_ios && !is_win && target_cpu != "wasm") {
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("sktexttopdf-hb") {
|
2016-08-29 23:01:10 +00:00
|
|
|
sources = [
|
2017-08-30 17:56:19 +00:00
|
|
|
"tools/shape/SkShaper_harfbuzz.cpp",
|
|
|
|
"tools/shape/using_skia_and_harfbuzz.cpp",
|
2016-08-29 23:01:10 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
"//third_party/harfbuzz",
|
2017-08-30 17:56:19 +00:00
|
|
|
"//third_party/icu",
|
2016-08-29 23:01:10 +00:00
|
|
|
]
|
|
|
|
}
|
2016-08-03 22:08:04 +00:00
|
|
|
}
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("sktexttopdf") {
|
2016-09-10 14:01:53 +00:00
|
|
|
sources = [
|
2017-08-30 17:56:19 +00:00
|
|
|
"tools/shape/SkShaper_primitive.cpp",
|
|
|
|
"tools/shape/using_skia_and_harfbuzz.cpp",
|
2016-09-10 14:01:53 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
2016-09-16 17:23:12 +00:00
|
|
|
|
2017-05-17 14:06:32 +00:00
|
|
|
test_app("create_flutter_test_images") {
|
|
|
|
sources = [
|
|
|
|
"tools/create_flutter_test_images.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-07-17 19:32:25 +00:00
|
|
|
test_app("create_test_font") {
|
|
|
|
sources = [
|
|
|
|
"tools/create_test_font.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
assert_no_deps = [
|
|
|
|
# tool_utils requires the output of this app.
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("get_images_from_skps") {
|
2016-09-16 17:23:12 +00:00
|
|
|
sources = [
|
|
|
|
"tools/get_images_from_skps.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
]
|
|
|
|
}
|
2016-09-22 18:51:24 +00:00
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("colorspaceinfo") {
|
2016-11-11 18:59:14 +00:00
|
|
|
sources = [
|
|
|
|
"tools/colorspaceinfo.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-09-21 17:45:16 +00:00
|
|
|
if (!is_ios && target_cpu != "wasm") {
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("skiaserve") {
|
2016-11-03 18:06:31 +00:00
|
|
|
sources = [
|
|
|
|
"tools/skiaserve/Request.cpp",
|
|
|
|
"tools/skiaserve/Response.cpp",
|
|
|
|
"tools/skiaserve/skiaserve.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/BreakHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/CmdHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/DataHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/DownloadHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/ImgHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/InfoHandler.cpp",
|
2016-12-20 21:48:59 +00:00
|
|
|
"tools/skiaserve/urlhandlers/OpBoundsHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/OpsHandler.cpp",
|
2016-11-03 18:06:31 +00:00
|
|
|
"tools/skiaserve/urlhandlers/OverdrawHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/PostHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/QuitHandler.cpp",
|
|
|
|
"tools/skiaserve/urlhandlers/RootHandler.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
"//third_party/libmicrohttpd",
|
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
2016-09-22 18:51:24 +00:00
|
|
|
}
|
2016-10-03 18:49:45 +00:00
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("fuzz") {
|
2018-01-09 17:47:33 +00:00
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
|
|
|
]
|
2016-10-03 18:49:45 +00:00
|
|
|
sources = [
|
2017-02-14 18:35:14 +00:00
|
|
|
"fuzz/FuzzCanvas.cpp",
|
2016-11-22 18:57:18 +00:00
|
|
|
"fuzz/FuzzDrawFunctions.cpp",
|
2016-10-03 18:49:45 +00:00
|
|
|
"fuzz/FuzzGradients.cpp",
|
|
|
|
"fuzz/FuzzParsePath.cpp",
|
|
|
|
"fuzz/FuzzPathop.cpp",
|
|
|
|
"fuzz/FuzzScaleToSides.cpp",
|
|
|
|
"fuzz/fuzz.cpp",
|
2018-01-11 15:27:14 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
|
2018-01-09 17:47:33 +00:00
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/SkDebugCanvas.cpp",
|
|
|
|
"tools/debugger/SkDrawCommand.cpp",
|
|
|
|
"tools/debugger/SkJsonWriteBuffer.cpp",
|
|
|
|
"tools/debugger/SkObjectParser.cpp",
|
|
|
|
"tools/picture_utils.cpp",
|
2016-10-03 18:49:45 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
2017-03-15 15:39:06 +00:00
|
|
|
":gpu_tool_utils",
|
2016-10-03 18:49:45 +00:00
|
|
|
":skia",
|
2018-01-09 17:47:33 +00:00
|
|
|
"//third_party/jsoncpp",
|
|
|
|
"//third_party/libpng",
|
2016-10-03 18:49:45 +00:00
|
|
|
]
|
|
|
|
}
|
2016-10-05 19:41:01 +00:00
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("pathops_unittest") {
|
2016-10-27 16:21:40 +00:00
|
|
|
sources = pathops_tests_sources + [
|
2016-10-26 15:41:47 +00:00
|
|
|
rebase_path("tests/skia_test.cpp"),
|
|
|
|
rebase_path("tests/Test.cpp"),
|
|
|
|
]
|
2016-10-25 15:58:26 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("dump_record") {
|
2016-10-05 19:41:01 +00:00
|
|
|
sources = [
|
|
|
|
"tools/DumpRecord.cpp",
|
|
|
|
"tools/dump_record.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
2016-10-13 21:36:40 +00:00
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("skdiff") {
|
2016-10-13 21:36:40 +00:00
|
|
|
sources = [
|
|
|
|
"tools/skdiff/skdiff.cpp",
|
|
|
|
"tools/skdiff/skdiff_html.cpp",
|
|
|
|
"tools/skdiff/skdiff_main.cpp",
|
|
|
|
"tools/skdiff/skdiff_utils.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
2016-10-17 20:19:02 +00:00
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("skp_parser") {
|
2016-10-17 20:19:02 +00:00
|
|
|
sources = [
|
|
|
|
"tools/skp_parser.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
]
|
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
|
2017-12-11 22:46:26 +00:00
|
|
|
if (!is_win && skia_enable_gpu) {
|
|
|
|
test_lib("skqp_lib") {
|
|
|
|
public_include_dirs = [ "tools/skqp" ]
|
2017-10-11 20:00:31 +00:00
|
|
|
sources = [
|
2017-12-11 22:46:26 +00:00
|
|
|
"dm/DMFontMgr.cpp",
|
2017-10-11 20:00:31 +00:00
|
|
|
"dm/DMGpuTestProcs.cpp",
|
2017-12-11 22:46:26 +00:00
|
|
|
"tools/skqp/gm_knowledge.cpp",
|
|
|
|
"tools/skqp/gm_runner.cpp",
|
2017-10-11 20:00:31 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tests",
|
2017-12-11 22:46:26 +00:00
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
test_app("skqp") {
|
|
|
|
sources = [
|
|
|
|
"tools/skqp/skqp.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":skqp_lib",
|
2017-10-11 20:00:31 +00:00
|
|
|
"//third_party/googletest",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2017-12-12 14:42:14 +00:00
|
|
|
if (is_android && skia_enable_gpu) {
|
|
|
|
test_app("skqp_app") {
|
|
|
|
is_shared_library = true
|
|
|
|
sources = [
|
|
|
|
"tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":skqp_lib",
|
|
|
|
]
|
|
|
|
libs = [ "android" ]
|
|
|
|
}
|
|
|
|
}
|
2017-10-11 20:00:31 +00:00
|
|
|
|
2018-01-19 18:08:23 +00:00
|
|
|
test_app("list_gms") {
|
|
|
|
sources = [
|
|
|
|
"tools/list_gms.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":gm",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
test_app("list_gpu_unit_tests") {
|
|
|
|
sources = [
|
|
|
|
"dm/DMGpuTestProcs.cpp",
|
|
|
|
"tools/list_gpu_unit_tests.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":tests",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-09-01 15:01:51 +00:00
|
|
|
if (skia_enable_gpu) {
|
2017-11-21 18:18:02 +00:00
|
|
|
test_lib("sk_app") {
|
|
|
|
public_include_dirs = [ "tools/sk_app" ]
|
2016-10-18 18:42:44 +00:00
|
|
|
sources = [
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/CommandSet.cpp",
|
|
|
|
"tools/sk_app/GLWindowContext.cpp",
|
|
|
|
"tools/sk_app/Window.cpp",
|
2016-10-18 18:42:44 +00:00
|
|
|
]
|
2016-10-18 19:33:53 +00:00
|
|
|
libs = []
|
2016-10-18 18:42:44 +00:00
|
|
|
|
2016-10-21 14:58:52 +00:00
|
|
|
if (is_android) {
|
|
|
|
sources += [
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/android/GLWindowContext_android.cpp",
|
|
|
|
"tools/sk_app/android/RasterWindowContext_android.cpp",
|
|
|
|
"tools/sk_app/android/Window_android.cpp",
|
|
|
|
"tools/sk_app/android/main_android.cpp",
|
|
|
|
"tools/sk_app/android/surface_glue_android.cpp",
|
2016-10-21 14:58:52 +00:00
|
|
|
]
|
2017-02-09 16:22:57 +00:00
|
|
|
libs += [ "android" ]
|
2016-10-21 14:58:52 +00:00
|
|
|
} else if (is_linux) {
|
2016-10-18 19:33:53 +00:00
|
|
|
sources += [
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/unix/GLWindowContext_unix.cpp",
|
|
|
|
"tools/sk_app/unix/RasterWindowContext_unix.cpp",
|
|
|
|
"tools/sk_app/unix/Window_unix.cpp",
|
2017-12-01 14:18:20 +00:00
|
|
|
"tools/sk_app/unix/keysym2ucs.c",
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/unix/main_unix.cpp",
|
2016-10-18 19:33:53 +00:00
|
|
|
]
|
2017-12-01 14:18:20 +00:00
|
|
|
libs += [
|
|
|
|
"GL",
|
|
|
|
"X11",
|
|
|
|
]
|
2016-10-18 19:33:53 +00:00
|
|
|
} else if (is_win) {
|
2016-10-18 18:42:44 +00:00
|
|
|
sources += [
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/win/GLWindowContext_win.cpp",
|
|
|
|
"tools/sk_app/win/RasterWindowContext_win.cpp",
|
|
|
|
"tools/sk_app/win/Window_win.cpp",
|
|
|
|
"tools/sk_app/win/main_win.cpp",
|
2016-10-18 18:42:44 +00:00
|
|
|
]
|
2017-08-17 18:37:06 +00:00
|
|
|
if (skia_use_angle) {
|
2017-11-21 18:18:02 +00:00
|
|
|
sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
|
2017-08-17 18:37:06 +00:00
|
|
|
}
|
2016-10-20 14:17:47 +00:00
|
|
|
} else if (is_mac) {
|
|
|
|
sources += [
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/mac/GLWindowContext_mac.cpp",
|
|
|
|
"tools/sk_app/mac/RasterWindowContext_mac.cpp",
|
|
|
|
"tools/sk_app/mac/Window_mac.cpp",
|
|
|
|
"tools/sk_app/mac/main_mac.cpp",
|
2016-10-20 14:17:47 +00:00
|
|
|
]
|
2017-12-01 14:18:20 +00:00
|
|
|
libs += [
|
|
|
|
"QuartzCore.framework",
|
|
|
|
"Cocoa.framework",
|
|
|
|
"Foundation.framework",
|
|
|
|
]
|
2017-09-01 15:01:51 +00:00
|
|
|
} else if (is_ios) {
|
|
|
|
sources += [
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/sk_app/ios/GLWindowContext_ios.cpp",
|
|
|
|
"tools/sk_app/ios/RasterWindowContext_ios.cpp",
|
|
|
|
"tools/sk_app/ios/Window_ios.cpp",
|
|
|
|
"tools/sk_app/ios/main_ios.cpp",
|
2017-09-01 15:01:51 +00:00
|
|
|
]
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (skia_use_vulkan) {
|
2017-11-21 18:18:02 +00:00
|
|
|
sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
|
2016-10-21 14:58:52 +00:00
|
|
|
if (is_android) {
|
2017-11-21 18:18:02 +00:00
|
|
|
sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
|
2016-10-21 14:58:52 +00:00
|
|
|
} else if (is_linux) {
|
2017-11-21 18:18:02 +00:00
|
|
|
sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ]
|
2016-10-18 19:33:53 +00:00
|
|
|
libs += [ "X11-xcb" ]
|
|
|
|
} else if (is_win) {
|
2017-11-21 18:18:02 +00:00
|
|
|
sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ]
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
":views",
|
|
|
|
]
|
2016-10-21 14:58:52 +00:00
|
|
|
if (is_android) {
|
|
|
|
deps += [ "//third_party/native_app_glue" ]
|
2017-09-01 15:01:51 +00:00
|
|
|
} else if (is_mac || is_ios) {
|
2016-10-20 14:17:47 +00:00
|
|
|
deps += [ "//third_party/libsdl" ]
|
|
|
|
}
|
2017-08-17 18:37:06 +00:00
|
|
|
if (skia_use_angle) {
|
|
|
|
deps += [ "//third_party/angle2" ]
|
|
|
|
}
|
2016-12-08 14:49:39 +00:00
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
2016-11-14 16:16:37 +00:00
|
|
|
|
2017-11-21 18:18:02 +00:00
|
|
|
if (skia_enable_gpu) {
|
|
|
|
test_app("viewer") {
|
|
|
|
is_shared_library = is_android
|
2017-11-29 16:42:33 +00:00
|
|
|
if (is_ios) {
|
|
|
|
bundle_ios_data = true
|
|
|
|
}
|
2017-11-21 18:18:02 +00:00
|
|
|
sources = [
|
|
|
|
"tools/viewer/GMSlide.cpp",
|
2017-12-08 21:46:09 +00:00
|
|
|
"tools/viewer/ImGuiLayer.cpp",
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/viewer/ImageSlide.cpp",
|
|
|
|
"tools/viewer/SKPSlide.cpp",
|
|
|
|
"tools/viewer/SampleSlide.cpp",
|
2018-01-16 22:04:30 +00:00
|
|
|
"tools/viewer/SkottieSlide.cpp",
|
|
|
|
"tools/viewer/SkottieSlide2.cpp",
|
2017-12-19 16:15:16 +00:00
|
|
|
"tools/viewer/StatsLayer.cpp",
|
2017-11-21 18:18:02 +00:00
|
|
|
"tools/viewer/Viewer.cpp",
|
|
|
|
]
|
|
|
|
libs = []
|
|
|
|
|
|
|
|
include_dirs = []
|
|
|
|
deps = [
|
2018-01-16 22:04:30 +00:00
|
|
|
":experimental_skottie",
|
2017-11-21 18:18:02 +00:00
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":samples",
|
|
|
|
":sk_app",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
":views",
|
|
|
|
"//third_party/imgui",
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (skia_enable_gpu && !skia_use_angle && (is_linux || is_win || is_mac)) {
|
|
|
|
test_app("HelloWorld") {
|
|
|
|
sources = [
|
|
|
|
"example/HelloWorld.cpp",
|
|
|
|
]
|
|
|
|
libs = []
|
|
|
|
|
|
|
|
include_dirs = []
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":sk_app",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
":views",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-30 18:02:50 +00:00
|
|
|
if (skia_enable_gpu && (is_linux || is_mac || is_ios)) {
|
2017-07-11 16:03:01 +00:00
|
|
|
test_app("SkiaSDLExample") {
|
|
|
|
sources = [
|
|
|
|
"example/SkiaSDLExample.cpp",
|
|
|
|
]
|
|
|
|
libs = []
|
|
|
|
include_dirs = []
|
|
|
|
deps = [
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
"//third_party/libsdl",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-01 16:17:03 +00:00
|
|
|
if (skia_qt_path != "" && (is_win || is_linux || is_mac)) {
|
|
|
|
action_foreach("generate_mocs") {
|
|
|
|
script = "gn/call.py"
|
|
|
|
sources = [
|
|
|
|
"tools/mdbviz/MainWindow.h",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp",
|
|
|
|
]
|
|
|
|
args = [
|
|
|
|
"$skia_qt_path" + "/bin/moc",
|
|
|
|
"{{source}}",
|
|
|
|
"-o",
|
|
|
|
"gen/mdbviz/{{source_name_part}}_moc.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
action_foreach("generate_resources") {
|
|
|
|
script = "gn/call.py"
|
|
|
|
sources = [
|
|
|
|
"tools/mdbviz/resources.qrc",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp",
|
|
|
|
]
|
|
|
|
args = [
|
|
|
|
"$skia_qt_path" + "/bin/rcc",
|
|
|
|
"{{source}}",
|
|
|
|
"-o",
|
|
|
|
"gen/mdbviz/{{source_name_part}}_res.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
test_app("mdbviz") {
|
|
|
|
if (is_win) {
|
|
|
|
# on Windows we need to disable some exception handling warnings due to the Qt headers
|
|
|
|
cflags = [ "/Wv:18" ] # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017
|
|
|
|
}
|
|
|
|
sources = [
|
2017-09-05 19:10:12 +00:00
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/SkDebugCanvas.cpp",
|
|
|
|
"tools/debugger/SkDrawCommand.cpp",
|
|
|
|
"tools/debugger/SkJsonWriteBuffer.cpp",
|
|
|
|
"tools/debugger/SkObjectParser.cpp",
|
2017-09-01 16:17:03 +00:00
|
|
|
"tools/mdbviz/MainWindow.cpp",
|
2017-09-06 17:07:21 +00:00
|
|
|
"tools/mdbviz/Model.cpp",
|
2017-09-01 16:17:03 +00:00
|
|
|
"tools/mdbviz/main.cpp",
|
2017-09-05 19:10:12 +00:00
|
|
|
"tools/picture_utils.cpp",
|
2017-09-01 16:17:03 +00:00
|
|
|
|
|
|
|
# generated files
|
|
|
|
"$target_gen_dir/mdbviz/MainWindow_moc.cpp",
|
|
|
|
"$target_gen_dir/mdbviz/resources_res.cpp",
|
|
|
|
]
|
|
|
|
lib_dirs = [ "$skia_qt_path/lib" ]
|
|
|
|
libs = [
|
|
|
|
"Qt5Core.lib",
|
|
|
|
"Qt5Gui.lib",
|
|
|
|
"Qt5Widgets.lib",
|
|
|
|
]
|
|
|
|
include_dirs = [
|
|
|
|
"$skia_qt_path/include",
|
2017-09-06 21:17:44 +00:00
|
|
|
"$skia_qt_path/include/QtCore",
|
2017-09-01 16:17:03 +00:00
|
|
|
"$skia_qt_path/include/QtWidgets",
|
2017-09-05 19:10:12 +00:00
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
2017-09-01 16:17:03 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":generate_mocs",
|
|
|
|
":generate_resources",
|
|
|
|
":skia",
|
2017-09-05 19:10:12 +00:00
|
|
|
"//third_party/jsoncpp",
|
|
|
|
"//third_party/libpng",
|
2017-09-01 16:17:03 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-03 14:21:30 +00:00
|
|
|
if (is_android && defined(ndk) && ndk != "") {
|
2017-01-05 16:39:04 +00:00
|
|
|
copy("gdbserver") {
|
|
|
|
sources = [
|
|
|
|
"$ndk/$ndk_gdbserver",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"$root_out_dir/gdbserver",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
}
|
2017-06-28 17:21:47 +00:00
|
|
|
|
|
|
|
if (skia_jumper_clang != "") {
|
|
|
|
action("regen_jumper") {
|
|
|
|
script = "src/jumper/build_stages.py"
|
|
|
|
|
|
|
|
inputs = [
|
|
|
|
"src/jumper/SkJumper_stages.cpp",
|
2017-09-12 20:40:53 +00:00
|
|
|
"src/jumper/SkJumper_stages_lowp.cpp",
|
2017-06-28 17:21:47 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# GN insists its outputs should go somewhere underneath target_out_dir, so we trick it.
|
|
|
|
outputs = [
|
|
|
|
"$target_out_dir/" +
|
|
|
|
rebase_path("src/jumper/SkJumper_generated.S", target_out_dir),
|
|
|
|
"$target_out_dir/" +
|
|
|
|
rebase_path("src/jumper/SkJumper_generated_win.S", target_out_dir),
|
|
|
|
]
|
|
|
|
|
|
|
|
args = [
|
|
|
|
skia_jumper_clang,
|
|
|
|
skia_jumper_objdump,
|
|
|
|
skia_jumper_ccache,
|
|
|
|
] + rebase_path(inputs) + rebase_path(outputs)
|
|
|
|
}
|
|
|
|
}
|