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")
|
2018-11-12 14:27:05 +00:00
|
|
|
import("gn/fuchsia_defines.gni")
|
2016-09-12 23:51:58 +00:00
|
|
|
import("gn/shared_sources.gni")
|
2019-09-04 12:58:59 +00:00
|
|
|
import("gn/skia.gni")
|
2022-02-14 20:08:12 +00:00
|
|
|
import("gn/toolchain/wasm.gni")
|
2019-09-04 12:58:59 +00:00
|
|
|
|
2019-09-25 21:14:35 +00:00
|
|
|
if (is_fuchsia) {
|
|
|
|
import("//build/fuchsia/sdk.gni")
|
|
|
|
import("build/fuchsia/fuchsia_download_sdk.gni")
|
|
|
|
}
|
|
|
|
|
2019-07-10 19:51:30 +00:00
|
|
|
if (skia_use_dawn) {
|
2021-11-15 19:08:02 +00:00
|
|
|
import("//third_party/externals/dawn/scripts/dawn_features.gni")
|
2019-07-10 19:51:30 +00:00
|
|
|
}
|
|
|
|
|
2017-10-13 17:59:38 +00:00
|
|
|
if (defined(skia_settings)) {
|
|
|
|
import(skia_settings)
|
|
|
|
}
|
|
|
|
|
2019-09-16 16:53:17 +00:00
|
|
|
import("gn/ios.gni")
|
|
|
|
|
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") {
|
2019-04-29 14:46:36 +00:00
|
|
|
include_dirs = [ "." ]
|
|
|
|
|
2016-10-11 21:49:33 +00:00
|
|
|
defines = []
|
2020-03-18 21:37:23 +00:00
|
|
|
cflags_objcc = []
|
2016-10-11 21:49:33 +00:00
|
|
|
if (is_component_build) {
|
|
|
|
defines += [ "SKIA_DLL" ]
|
|
|
|
}
|
2016-09-27 01:37:09 +00:00
|
|
|
if (is_fuchsia || is_linux) {
|
2019-04-24 16:42:40 +00:00
|
|
|
defines += [ "SK_R32_SHIFT=16" ]
|
2016-08-25 16:25:11 +00:00
|
|
|
}
|
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" ]
|
|
|
|
}
|
2021-07-12 21:02:21 +00:00
|
|
|
if (skia_enable_sksl) {
|
|
|
|
defines += [ "SK_ENABLE_SKSL" ]
|
|
|
|
}
|
2018-11-12 14:27:05 +00:00
|
|
|
if (is_fuchsia) {
|
|
|
|
defines += fuchsia_defines
|
|
|
|
}
|
2022-02-14 20:08:12 +00:00
|
|
|
if (is_wasm) {
|
|
|
|
defines += wasm_defines
|
|
|
|
}
|
2019-03-21 12:13:54 +00:00
|
|
|
if (skia_gl_standard == "gles") {
|
|
|
|
defines += [ "SK_ASSUME_GL_ES=1" ]
|
|
|
|
} else if (skia_gl_standard == "gl") {
|
|
|
|
defines += [ "SK_ASSUME_GL=1" ]
|
2019-03-28 16:46:40 +00:00
|
|
|
} else if (skia_gl_standard == "webgl") {
|
2020-08-20 14:33:39 +00:00
|
|
|
defines += [
|
|
|
|
"SK_ASSUME_WEBGL=1",
|
|
|
|
"SK_USE_WEBGL",
|
|
|
|
]
|
2019-03-21 12:13:54 +00:00
|
|
|
}
|
2021-07-01 16:12:52 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
2021-07-01 17:21:37 +00:00
|
|
|
defines += [ "SK_GPU_V1=0" ]
|
2021-05-03 15:42:40 +00:00
|
|
|
}
|
2020-03-18 21:37:23 +00:00
|
|
|
|
|
|
|
# Some older versions of the Clang toolchain change the visibility of
|
|
|
|
# symbols decorated with API_AVAILABLE macro to be visible. Users of such
|
|
|
|
# toolchains suppress the use of this macro till toolchain updates are made.
|
|
|
|
if (is_mac || is_ios) {
|
|
|
|
if (skia_enable_api_available_macro) {
|
|
|
|
defines += [ "SK_ENABLE_API_AVAILABLE" ]
|
|
|
|
} else {
|
|
|
|
cflags_objcc += [ "-Wno-unguarded-availability" ]
|
|
|
|
}
|
|
|
|
}
|
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") {
|
2021-01-15 13:20:33 +00:00
|
|
|
visibility = [ "./*" ]
|
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
|
|
|
|
2017-05-03 14:52:00 +00:00
|
|
|
defines = [ "SK_GAMMA_APPLY_TO_A8" ]
|
2018-11-15 20:54:59 +00:00
|
|
|
if (skia_use_fixed_gamma_text) {
|
2016-09-09 18:07:45 +00:00
|
|
|
defines += [
|
|
|
|
"SK_GAMMA_EXPONENT=1.4",
|
|
|
|
"SK_GAMMA_CONTRAST=0.0",
|
|
|
|
]
|
|
|
|
}
|
2022-02-14 20:08:12 +00:00
|
|
|
if (is_skia_dev_build && !is_wasm) {
|
2019-04-24 19:04:01 +00:00
|
|
|
defines += [
|
|
|
|
"SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1",
|
|
|
|
"GR_TEST_UTILS=1",
|
|
|
|
]
|
2021-10-18 16:15:47 +00:00
|
|
|
if (skia_enable_graphite) {
|
|
|
|
defines += [ "GRAPHITE_TEST_UTILS=1" ]
|
|
|
|
}
|
2016-09-14 18:16:49 +00:00
|
|
|
}
|
Reland "Reland "Adding a trace to nanobench for RP/VM comparison""
This reverts commit 0e48516aae7e63dc50f16e9fb0080039f4f06d88.
Reason for revert: Again trying to land this CL
Original change's description:
> Revert "Reland "Adding a trace to nanobench for RP/VM comparison""
>
> This reverts commit 94b8dd67108d105f13d0fcd60e8c427e92355a64.
>
> Reason for revert: https://ci.chromium.org/p/chromium/builders/try/android-marshmallow-x86-rel appears to either not support this instruction or it is disabled.
>
> Original change's description:
> > Reland "Adding a trace to nanobench for RP/VM comparison"
> >
> > This reverts commit 39728eb9804cced26933f38d6bcf5652dd8d24bc.
> >
> > Reason for revert: Need to reland after I figure out what happened
> >
> > Original change's description:
> > > Revert "Adding a trace to nanobench for RP/VM comparison"
> > >
> > > This reverts commit e855b1273fee6a2b3505ea27aec56e8fc82749e3.
> > >
> > > Reason for revert: breaking the tree
> > >
> > > Original change's description:
> > > > Adding a trace to nanobench for RP/VM comparison
> > > >
> > > > Run nanobench with --compare key and collect data for comparison:
> > > > ./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
> > > > ./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
> > > > awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11; vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1 {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv
> > > >
> > > > You can see an example of comparison table here:
> > > > https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636
> > > >
> > > > Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
> > > > Reviewed-by: Herb Derby <herb@google.com>
> > > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> > >
> > > Change-Id: I6799b90ffd8bc05c65d1185bfc07a06af05e2038
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507182
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> >
> > Change-Id: I3668b5a40f310598e23c922b1eb6f93db4dac13c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507183
> > Reviewed-by: Herb Derby <herb@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I5d0174fca1aeaa0f3e75a8e1f643265701068f42
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508396
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: Ibf7c8957427dc8a1cdc133774608b48ab6715c7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508536
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-14 14:20:50 +00:00
|
|
|
if (skia_compare_vm_vs_rp) {
|
|
|
|
defines += [ "SKIA_COMPARE_VM_VS_RP" ]
|
|
|
|
}
|
2016-09-30 17:41:03 +00:00
|
|
|
libs = []
|
|
|
|
lib_dirs = []
|
2020-03-19 19:54:28 +00:00
|
|
|
if (skia_use_gl && skia_use_angle) {
|
2016-12-05 14:46:02 +00:00
|
|
|
defines += [ "SK_ANGLE" ]
|
|
|
|
}
|
2020-04-27 14:26:21 +00:00
|
|
|
if (skia_use_vma) {
|
|
|
|
defines += [ "SK_USE_VMA" ]
|
|
|
|
}
|
2021-02-09 14:22:41 +00:00
|
|
|
if (skia_enable_winuwp) {
|
2021-02-19 03:54:42 +00:00
|
|
|
defines += [ "SK_WINUWP" ]
|
2021-02-09 14:22:41 +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
|
|
|
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
|
|
|
|
config("skia_library") {
|
2021-01-15 13:20:33 +00:00
|
|
|
visibility = [ "./*" ]
|
2019-04-29 15:45:14 +00:00
|
|
|
defines = [ "SKIA_IMPLEMENTATION=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_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) {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name) {
|
|
|
|
visibility = [ ":*" ]
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = skia_library_configs
|
2016-08-25 00:32:30 +00:00
|
|
|
forward_variables_from(invoker, "*")
|
2021-03-16 18:29:20 +00:00
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
2016-08-25 00:32:30 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
# If not enabled, a phony empty target that swallows all otherwise unused variables.
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name) {
|
|
|
|
visibility = [ ":*" ]
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2016-08-25 00:32:30 +00:00
|
|
|
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
|
2018-03-21 17:07:35 +00:00
|
|
|
if (is_win) {
|
2016-11-18 22:11:41 +00:00
|
|
|
cflags = [ "/arch:AVX" ]
|
2016-10-11 21:08:53 +00:00
|
|
|
} else {
|
|
|
|
cflags = [ "-mavx" ]
|
2019-12-13 18:02:22 +00:00
|
|
|
if (is_mac && is_debug) {
|
refine __chkstk_darwin() workaround
Apple's Clang has a bug rooted in these three conflicting constraints:
A) before we save a large amount of state to the stack, call
__chkstk_darwin() to um, do something to make that safe. It's
some sort of debug feature that involves marking various pages
as writable and unwritable to catch stack overflows.
B) before calling any function that doesn't use AVX, which includes
__chkstk_darwin(), call vzeroupper as a performance enhancement
C) we must save a large amount of state to the stack before it's
sound to call vzeroupper, so it can be restored after the
function call. Otherwise the upper 128 bits of all ymm registers
will be lost, zeroed.
There's no way to order A,B, and C to make them all happy.
Saving registers before zeroing them (C) is a correctness issue, so it's
got to take precedence. Zeroing the upper bits of ymm registers before
calling into code that's not ymm-aware (B) is a performance issue only,
and not actually even needed for __chkstk_darwin(). The whole
__chkstk_darwin() thing (A) is nice a safety feature we'll have to live
without.
The best fix would be to make it so that Clang doesn't issue vzeroupper
before __chkstk_darwin(), but we can't do that here. The next best
thing, since mucking with correctness isn't really viable, is to turn of
the stack checking.
Until now we've been using -O1 to reduce the stack usage down low enough
that the stack check calls are not generated. Maybe there's a known
safe single page, and the call's only needed when going above that?
Anyway, let's try focusing our workaround on -fstack-check itself.
Bug: skia:9709
Change-Id: Ie236101d2d464526b33e327db1f94574a7a86948
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294326
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-04 16:53:56 +00:00
|
|
|
cflags += [ "-fno-stack-check" ] # Work around skia:9709
|
2019-12-13 18:02:22 +00:00
|
|
|
}
|
2016-10-11 21:08: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
|
|
|
}
|
|
|
|
|
Reland "Reland "make SkJumper stages normal Skia code""
This is a reland of 78cb579f33943421afc8423a39867fcfd69fed44
This time, lowp stages are controlled by !defined(JUMPER_IS_SCALAR), not
by defined(__clang__). The two are usually the same, except when we opt
Clang builds into JUMPER_IS_SCALAR artificially.
Some Google3 builds use compilers old enough that they barf when
compiling our NEON code. It's conceivably also possible to define
JUMPER_IS_SCALAR yourself, but I don't think anyone does that.
Original change's description:
> Reland "make SkJumper stages normal Skia code"
>
> This is a reland of 22e536e3a1a09405d1c0e6f071717a726d86e8d4
>
> Now with fixed #include paths in SkRasterPipeline_opts.h,
> and -ffp-contract=fast for the :hsw target to minimize
> diffs on non-Windows Clang AVX2/AVX-512 bots.
>
> Original change's description:
> > make SkJumper stages normal Skia code
> >
> > Enough clients are using Clang now that we can say, use Clang to build
> > if you want these software pipeline stages to go fast.
> >
> > This lets us drop the offline build aspect of SkJumper stages, instead
> > building as part of Skia using the SkOpts framework.
> >
> > I think everything should work, except I've (temporarily) removed
> > AVX-512 support. I will put this back in a follow up.
> >
> > I have had to drop Windows down to __vectorcall and our narrower
> > stage calling convention that keeps the d-registers on the stack.
> > I tried forcing sysv_abi, but that crashed Clang. :/
> >
> > Added a TODO to up the same narrower stage calling convention
> > for lowp stages... we just *don't* today, for no good reason.
> >
> > Change-Id: Iaaa792ffe4deab3508d2dc5d0008c163c24b3383
> > Reviewed-on: https://skia-review.googlesource.com/110641
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Herb Derby <herb@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
>
> Change-Id: I44f2c03d33958e3807747e40904b6351957dd448
> Reviewed-on: https://skia-review.googlesource.com/112742
> Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I3d71197d4bbb19ca4a94961a97fa2e54d5cbfb0d
Reviewed-on: https://skia-review.googlesource.com/112744
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-02-27 15:37:40 +00:00
|
|
|
opts("hsw") {
|
|
|
|
enabled = is_x86
|
|
|
|
sources = skia_opts.hsw_sources
|
2018-03-21 17:07:35 +00:00
|
|
|
if (is_win) {
|
Reland "Reland "make SkJumper stages normal Skia code""
This is a reland of 78cb579f33943421afc8423a39867fcfd69fed44
This time, lowp stages are controlled by !defined(JUMPER_IS_SCALAR), not
by defined(__clang__). The two are usually the same, except when we opt
Clang builds into JUMPER_IS_SCALAR artificially.
Some Google3 builds use compilers old enough that they barf when
compiling our NEON code. It's conceivably also possible to define
JUMPER_IS_SCALAR yourself, but I don't think anyone does that.
Original change's description:
> Reland "make SkJumper stages normal Skia code"
>
> This is a reland of 22e536e3a1a09405d1c0e6f071717a726d86e8d4
>
> Now with fixed #include paths in SkRasterPipeline_opts.h,
> and -ffp-contract=fast for the :hsw target to minimize
> diffs on non-Windows Clang AVX2/AVX-512 bots.
>
> Original change's description:
> > make SkJumper stages normal Skia code
> >
> > Enough clients are using Clang now that we can say, use Clang to build
> > if you want these software pipeline stages to go fast.
> >
> > This lets us drop the offline build aspect of SkJumper stages, instead
> > building as part of Skia using the SkOpts framework.
> >
> > I think everything should work, except I've (temporarily) removed
> > AVX-512 support. I will put this back in a follow up.
> >
> > I have had to drop Windows down to __vectorcall and our narrower
> > stage calling convention that keeps the d-registers on the stack.
> > I tried forcing sysv_abi, but that crashed Clang. :/
> >
> > Added a TODO to up the same narrower stage calling convention
> > for lowp stages... we just *don't* today, for no good reason.
> >
> > Change-Id: Iaaa792ffe4deab3508d2dc5d0008c163c24b3383
> > Reviewed-on: https://skia-review.googlesource.com/110641
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Herb Derby <herb@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
>
> Change-Id: I44f2c03d33958e3807747e40904b6351957dd448
> Reviewed-on: https://skia-review.googlesource.com/112742
> Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I3d71197d4bbb19ca4a94961a97fa2e54d5cbfb0d
Reviewed-on: https://skia-review.googlesource.com/112744
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-02-27 15:37:40 +00:00
|
|
|
cflags = [ "/arch:AVX2" ]
|
|
|
|
} else {
|
2018-03-23 00:13:58 +00:00
|
|
|
cflags = [ "-march=haswell" ]
|
2020-01-22 19:53:18 +00:00
|
|
|
if (is_mac && is_debug) {
|
refine __chkstk_darwin() workaround
Apple's Clang has a bug rooted in these three conflicting constraints:
A) before we save a large amount of state to the stack, call
__chkstk_darwin() to um, do something to make that safe. It's
some sort of debug feature that involves marking various pages
as writable and unwritable to catch stack overflows.
B) before calling any function that doesn't use AVX, which includes
__chkstk_darwin(), call vzeroupper as a performance enhancement
C) we must save a large amount of state to the stack before it's
sound to call vzeroupper, so it can be restored after the
function call. Otherwise the upper 128 bits of all ymm registers
will be lost, zeroed.
There's no way to order A,B, and C to make them all happy.
Saving registers before zeroing them (C) is a correctness issue, so it's
got to take precedence. Zeroing the upper bits of ymm registers before
calling into code that's not ymm-aware (B) is a performance issue only,
and not actually even needed for __chkstk_darwin(). The whole
__chkstk_darwin() thing (A) is nice a safety feature we'll have to live
without.
The best fix would be to make it so that Clang doesn't issue vzeroupper
before __chkstk_darwin(), but we can't do that here. The next best
thing, since mucking with correctness isn't really viable, is to turn of
the stack checking.
Until now we've been using -O1 to reduce the stack usage down low enough
that the stack check calls are not generated. Maybe there's a known
safe single page, and the call's only needed when going above that?
Anyway, let's try focusing our workaround on -fstack-check itself.
Bug: skia:9709
Change-Id: Ie236101d2d464526b33e327db1f94574a7a86948
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294326
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-04 16:53:56 +00:00
|
|
|
cflags += [ "-fno-stack-check" ] # Work around skia:9709
|
2020-01-22 19:53:18 +00:00
|
|
|
}
|
Reland "Reland "make SkJumper stages normal Skia code""
This is a reland of 78cb579f33943421afc8423a39867fcfd69fed44
This time, lowp stages are controlled by !defined(JUMPER_IS_SCALAR), not
by defined(__clang__). The two are usually the same, except when we opt
Clang builds into JUMPER_IS_SCALAR artificially.
Some Google3 builds use compilers old enough that they barf when
compiling our NEON code. It's conceivably also possible to define
JUMPER_IS_SCALAR yourself, but I don't think anyone does that.
Original change's description:
> Reland "make SkJumper stages normal Skia code"
>
> This is a reland of 22e536e3a1a09405d1c0e6f071717a726d86e8d4
>
> Now with fixed #include paths in SkRasterPipeline_opts.h,
> and -ffp-contract=fast for the :hsw target to minimize
> diffs on non-Windows Clang AVX2/AVX-512 bots.
>
> Original change's description:
> > make SkJumper stages normal Skia code
> >
> > Enough clients are using Clang now that we can say, use Clang to build
> > if you want these software pipeline stages to go fast.
> >
> > This lets us drop the offline build aspect of SkJumper stages, instead
> > building as part of Skia using the SkOpts framework.
> >
> > I think everything should work, except I've (temporarily) removed
> > AVX-512 support. I will put this back in a follow up.
> >
> > I have had to drop Windows down to __vectorcall and our narrower
> > stage calling convention that keeps the d-registers on the stack.
> > I tried forcing sysv_abi, but that crashed Clang. :/
> >
> > Added a TODO to up the same narrower stage calling convention
> > for lowp stages... we just *don't* today, for no good reason.
> >
> > Change-Id: Iaaa792ffe4deab3508d2dc5d0008c163c24b3383
> > Reviewed-on: https://skia-review.googlesource.com/110641
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Herb Derby <herb@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
>
> Change-Id: I44f2c03d33958e3807747e40904b6351957dd448
> Reviewed-on: https://skia-review.googlesource.com/112742
> Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I3d71197d4bbb19ca4a94961a97fa2e54d5cbfb0d
Reviewed-on: https://skia-review.googlesource.com/112744
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-02-27 15:37:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-05 11:57:30 +00:00
|
|
|
opts("skx") {
|
|
|
|
enabled = is_x86
|
|
|
|
sources = skia_opts.skx_sources
|
|
|
|
if (is_win) {
|
|
|
|
cflags = [ "/arch:AVX512" ]
|
|
|
|
} else {
|
|
|
|
cflags = [ "-march=skylake-avx512" ]
|
|
|
|
if (is_mac && is_debug) {
|
|
|
|
cflags += [ "-fno-stack-check" ] # Work around skia:9709
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|
2018-05-03 15:30:29 +00:00
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
configs = invoker.public_configs
|
|
|
|
}
|
2019-11-20 21:01:31 +00:00
|
|
|
if (defined(invoker.public_include_dirs)) {
|
|
|
|
include_dirs = invoker.public_include_dirs
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name) {
|
|
|
|
visibility = [ ":*" ]
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = skia_library_configs
|
|
|
|
|
|
|
|
# "*" clobbers the current scope; append to existing configs
|
2016-08-31 11:58:19 +00:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
2021-03-16 18:29:20 +00:00
|
|
|
"configs",
|
2016-08-31 11:58:19 +00:00
|
|
|
"public_defines",
|
2021-02-18 03:18:34 +00:00
|
|
|
"sources_for_tests",
|
2016-08-31 11:58:19 +00:00
|
|
|
"sources_when_disabled",
|
|
|
|
])
|
2021-03-16 18:29:20 +00:00
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
2016-10-31 16:02:57 +00:00
|
|
|
}
|
2021-03-16 18:29:20 +00:00
|
|
|
all_dependent_configs = [ ":" + target_name + "_public" ]
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
2021-02-18 03:18:34 +00:00
|
|
|
if (defined(invoker.sources_for_tests) && skia_enable_tools) {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name + "_tests") {
|
|
|
|
visibility = [ ":*" ]
|
2021-02-18 03:18:34 +00:00
|
|
|
check_includes = false
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = skia_library_configs
|
|
|
|
|
|
|
|
# "*" clobbers the current scope; append to existing configs
|
2021-02-18 03:18:34 +00:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
2021-03-16 18:29:20 +00:00
|
|
|
"configs",
|
2021-02-18 03:18:34 +00:00
|
|
|
"public_defines",
|
|
|
|
"sources",
|
|
|
|
"sources_for_tests",
|
|
|
|
"sources_when_disabled",
|
|
|
|
])
|
2021-03-16 18:29:20 +00:00
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
2021-02-18 03:18:34 +00:00
|
|
|
testonly = true
|
|
|
|
sources = invoker.sources_for_tests
|
|
|
|
if (!defined(deps)) {
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
deps += [ ":test" ]
|
|
|
|
all_dependent_configs = [ ":" + target_name + "_public" ]
|
|
|
|
}
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
} else {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name) {
|
|
|
|
visibility = [ ":*" ]
|
|
|
|
configs = skia_library_configs
|
|
|
|
|
|
|
|
# "*" clobbers the current scope; append to existing configs
|
2016-08-23 20:56:37 +00:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
2021-03-16 18:29:20 +00:00
|
|
|
"configs",
|
2020-06-05 17:42:30 +00:00
|
|
|
"public",
|
2016-08-23 20:56:37 +00:00
|
|
|
"public_defines",
|
2018-05-22 17:25:15 +00:00
|
|
|
"public_deps",
|
2016-08-23 20:56:37 +00:00
|
|
|
"deps",
|
2016-09-14 13:12:09 +00:00
|
|
|
"libs",
|
2020-08-12 14:45:00 +00:00
|
|
|
"frameworks",
|
2016-08-23 20:56:37 +00:00
|
|
|
"sources",
|
2021-02-18 03:18:34 +00:00
|
|
|
"sources_for_tests",
|
2016-08-31 11:58:19 +00:00
|
|
|
"sources_when_disabled",
|
2016-08-23 20:56:37 +00:00
|
|
|
])
|
2021-03-16 18:29:20 +00:00
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
2016-08-31 11:58:19 +00:00
|
|
|
if (defined(invoker.sources_when_disabled)) {
|
|
|
|
sources = invoker.sources_when_disabled
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
2021-02-18 03:18:34 +00:00
|
|
|
if (defined(invoker.sources_for_tests)) {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name + "_tests") {
|
|
|
|
visibility = [ ":*" ]
|
2021-02-18 03:18:34 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-23 14:38:09 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-23 20:56:37 +00:00
|
|
|
|
2020-04-24 17:00:48 +00:00
|
|
|
optional("android_utils") {
|
|
|
|
enabled = skia_enable_android_utils
|
|
|
|
|
2020-05-04 14:02:45 +00:00
|
|
|
public = [
|
|
|
|
"client_utils/android/BRDAllocator.h",
|
|
|
|
"client_utils/android/BitmapRegionDecoder.h",
|
|
|
|
"client_utils/android/FrontBufferedStream.h",
|
|
|
|
]
|
2020-04-24 17:00:48 +00:00
|
|
|
public_defines = [ "SK_ENABLE_ANDROID_UTILS" ]
|
2020-05-04 14:02:45 +00:00
|
|
|
sources = [
|
|
|
|
"client_utils/android/BitmapRegionDecoder.cpp",
|
|
|
|
"client_utils/android/FrontBufferedStream.cpp",
|
|
|
|
]
|
2020-04-24 17:00:48 +00:00
|
|
|
}
|
|
|
|
|
2020-06-29 15:59:10 +00:00
|
|
|
group("fontmgr_factory") {
|
|
|
|
public_deps = [ skia_fontmgr_factory ]
|
|
|
|
}
|
|
|
|
|
|
|
|
optional("fontmgr_empty_factory") {
|
|
|
|
enabled = true
|
|
|
|
sources = [ "src/ports/SkFontMgr_empty_factory.cpp" ]
|
2020-06-03 17:20:37 +00:00
|
|
|
}
|
|
|
|
|
2016-08-29 22:22:10 +00:00
|
|
|
optional("fontmgr_android") {
|
2018-11-13 18:50:12 +00:00
|
|
|
enabled = skia_enable_fontmgr_android
|
2016-08-29 22:22:10 +00:00
|
|
|
|
|
|
|
deps = [
|
2017-02-24 16:15:26 +00:00
|
|
|
":typeface_freetype",
|
2016-08-29 22:22:10 +00:00
|
|
|
"//third_party/expat",
|
|
|
|
]
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "include/ports/SkFontMgr_android.h" ]
|
2016-08-29 22:22:10 +00:00
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontMgr_android.cpp",
|
|
|
|
"src/ports/SkFontMgr_android_parser.cpp",
|
2020-06-03 17:20:37 +00:00
|
|
|
"src/ports/SkFontMgr_android_parser.h",
|
2016-08-29 22:22:10 +00:00
|
|
|
]
|
2021-02-18 03:18:34 +00:00
|
|
|
sources_for_tests = [ "tests/FontMgrAndroidParserTest.cpp" ]
|
2016-08-29 22:22:10 +00:00
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_android_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_android
|
|
|
|
deps = [ ":fontmgr_android" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_android_factory.cpp" ]
|
|
|
|
}
|
2016-08-29 22:22:10 +00:00
|
|
|
|
2016-09-07 14:52:55 +00:00
|
|
|
optional("fontmgr_custom") {
|
2020-06-03 17:20:37 +00:00
|
|
|
enabled =
|
|
|
|
skia_enable_fontmgr_custom_directory ||
|
|
|
|
skia_enable_fontmgr_custom_embedded || skia_enable_fontmgr_custom_empty
|
2016-09-07 14:52:55 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":typeface_freetype" ]
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "src/ports/SkFontMgr_custom.h" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_custom.cpp" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
optional("fontmgr_custom_directory") {
|
|
|
|
enabled = skia_enable_fontmgr_custom_directory
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":fontmgr_custom",
|
|
|
|
":typeface_freetype",
|
|
|
|
]
|
|
|
|
public = [ "include/ports/SkFontMgr_directory.h" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_custom_directory.cpp" ]
|
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_custom_directory_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_custom_directory
|
|
|
|
deps = [ ":fontmgr_custom_directory" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_custom_directory_factory.cpp" ]
|
|
|
|
}
|
2020-06-03 17:20:37 +00:00
|
|
|
|
|
|
|
optional("fontmgr_custom_embedded") {
|
|
|
|
enabled = skia_enable_fontmgr_custom_embedded
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":fontmgr_custom",
|
|
|
|
":typeface_freetype",
|
2016-09-07 14:52:55 +00:00
|
|
|
]
|
2020-06-03 17:20:37 +00:00
|
|
|
sources = [ "src/ports/SkFontMgr_custom_embedded.cpp" ]
|
2016-09-07 14:52:55 +00:00
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_custom_embedded_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_custom_embedded
|
|
|
|
deps = [ ":fontmgr_custom_embedded" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_custom_embedded_factory.cpp" ]
|
|
|
|
}
|
2016-09-07 14:52:55 +00:00
|
|
|
|
2019-03-04 18:54:02 +00:00
|
|
|
optional("fontmgr_custom_empty") {
|
|
|
|
enabled = skia_enable_fontmgr_custom_empty
|
2018-12-12 15:35:13 +00:00
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
deps = [
|
|
|
|
":fontmgr_custom",
|
|
|
|
":typeface_freetype",
|
2018-12-01 01:42:00 +00:00
|
|
|
]
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "include/ports/SkFontMgr_empty.h" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_custom_empty.cpp" ]
|
2018-12-01 01:42:00 +00:00
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_custom_empty_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_custom_empty
|
|
|
|
deps = [ ":fontmgr_custom_empty" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_custom_empty_factory.cpp" ]
|
|
|
|
}
|
2018-12-01 01:42:00 +00:00
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
optional("fontmgr_fontconfig") {
|
|
|
|
enabled = skia_enable_fontmgr_fontconfig
|
|
|
|
|
2020-06-29 15:59:10 +00:00
|
|
|
# The public header includes fontconfig.h and uses FcConfig*
|
|
|
|
public_deps = [ "//third_party:fontconfig" ]
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "include/ports/SkFontMgr_fontconfig.h" ]
|
2020-06-29 15:59:10 +00:00
|
|
|
deps = [ ":typeface_freetype" ]
|
2020-06-03 17:20:37 +00:00
|
|
|
sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ]
|
2021-02-18 03:18:34 +00:00
|
|
|
sources_for_tests = [ "tests/FontMgrFontConfigTest.cpp" ]
|
2018-01-30 16:35:47 +00:00
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_fontconfig_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_fontconfig
|
|
|
|
deps = [ ":fontmgr_fontconfig" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_fontconfig_factory.cpp" ]
|
|
|
|
}
|
2018-01-30 16:35:47 +00:00
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
optional("fontmgr_FontConfigInterface") {
|
|
|
|
enabled = skia_enable_fontmgr_FontConfigInterface
|
2016-08-29 20:26:14 +00:00
|
|
|
|
|
|
|
deps = [
|
2017-02-24 16:15:26 +00:00
|
|
|
":typeface_freetype",
|
2016-08-29 20:26:14 +00:00
|
|
|
"//third_party:fontconfig",
|
|
|
|
]
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [
|
|
|
|
"include/ports/SkFontConfigInterface.h",
|
|
|
|
"include/ports/SkFontMgr_FontConfigInterface.h",
|
|
|
|
]
|
2016-08-29 20:26:14 +00:00
|
|
|
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",
|
2020-06-03 17:20:37 +00:00
|
|
|
"src/ports/SkFontConfigTypeface.h",
|
2016-08-29 20:26:14 +00:00
|
|
|
"src/ports/SkFontMgr_FontConfigInterface.cpp",
|
|
|
|
]
|
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_FontConfigInterface_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_FontConfigInterface
|
|
|
|
deps = [ ":fontmgr_FontConfigInterface" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_FontConfigInterface_factory.cpp" ]
|
|
|
|
}
|
2016-08-29 20:26:14 +00:00
|
|
|
|
2019-03-04 18:54:02 +00:00
|
|
|
optional("fontmgr_fuchsia") {
|
|
|
|
enabled = skia_enable_fontmgr_fuchsia
|
|
|
|
|
2019-05-06 23:44:06 +00:00
|
|
|
deps = []
|
|
|
|
|
|
|
|
if (is_fuchsia && using_fuchsia_sdk) {
|
2019-09-25 21:14:35 +00:00
|
|
|
deps += [ "//build/fuchsia/fidl:fuchsia.fonts" ]
|
2019-05-06 23:44:06 +00:00
|
|
|
} else {
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//sdk/fidl/fuchsia.fonts" ]
|
2019-05-06 23:44:06 +00:00
|
|
|
}
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "src/ports/SkFontMgr_fuchsia.h" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_fuchsia.cpp" ]
|
2019-03-04 18:54:02 +00:00
|
|
|
}
|
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
optional("fontmgr_mac_ct") {
|
2020-06-04 03:29:43 +00:00
|
|
|
enabled = skia_use_fonthost_mac
|
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [
|
|
|
|
"include/ports/SkFontMgr_mac_ct.h",
|
|
|
|
"include/ports/SkTypeface_mac.h",
|
|
|
|
]
|
2020-06-05 15:25:42 +00:00
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontMgr_mac_ct.cpp",
|
|
|
|
"src/ports/SkScalerContext_mac_ct.cpp",
|
|
|
|
"src/ports/SkScalerContext_mac_ct.h",
|
|
|
|
"src/ports/SkTypeface_mac_ct.cpp",
|
|
|
|
"src/ports/SkTypeface_mac_ct.h",
|
|
|
|
]
|
2021-02-22 15:37:33 +00:00
|
|
|
sources_for_tests = [ "tests/TypefaceMacTest.cpp" ]
|
2020-06-04 03:29:43 +00:00
|
|
|
|
|
|
|
if (is_mac) {
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = [
|
2020-06-04 03:29:43 +00:00
|
|
|
# AppKit symbols NSFontWeightXXX may be dlsym'ed.
|
|
|
|
"AppKit.framework",
|
|
|
|
"ApplicationServices.framework",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_ios) {
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = [
|
2020-06-04 03:29:43 +00:00
|
|
|
"CoreFoundation.framework",
|
|
|
|
"CoreGraphics.framework",
|
|
|
|
"CoreText.framework",
|
|
|
|
|
|
|
|
# UIKit symbols UIFontWeightXXX may be dlsym'ed.
|
|
|
|
"UIKit.framework",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_mac_ct_factory") {
|
|
|
|
enabled = skia_use_fonthost_mac
|
|
|
|
deps = [ ":fontmgr_mac_ct" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_mac_ct_factory.cpp" ]
|
|
|
|
}
|
2020-06-04 03:29:43 +00:00
|
|
|
|
2019-03-04 18:54:02 +00:00
|
|
|
optional("fontmgr_win") {
|
|
|
|
enabled = skia_enable_fontmgr_win
|
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "include/ports/SkTypeface_win.h" ]
|
2019-03-04 18:54:02 +00:00
|
|
|
sources = [
|
|
|
|
"src/fonts/SkFontMgr_indirect.cpp",
|
|
|
|
"src/ports/SkFontMgr_win_dw.cpp",
|
|
|
|
"src/ports/SkScalerContext_win_dw.cpp",
|
2021-12-01 22:27:08 +00:00
|
|
|
"src/ports/SkScalerContext_win_dw.h",
|
2019-03-04 18:54:02 +00:00
|
|
|
"src/ports/SkTypeface_win_dw.cpp",
|
2021-12-01 22:27:08 +00:00
|
|
|
"src/ports/SkTypeface_win_dw.h",
|
2019-03-04 18:54:02 +00:00
|
|
|
]
|
|
|
|
}
|
2020-06-29 15:59:10 +00:00
|
|
|
optional("fontmgr_win_factory") {
|
|
|
|
enabled = skia_enable_fontmgr_win
|
|
|
|
deps = [ ":fontmgr_win" ]
|
|
|
|
sources = [ "src/ports/SkFontMgr_win_dw_factory.cpp" ]
|
|
|
|
}
|
2019-03-04 18:54:02 +00:00
|
|
|
|
|
|
|
optional("fontmgr_win_gdi") {
|
|
|
|
enabled = skia_enable_fontmgr_win_gdi
|
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
public = [ "include/ports/SkTypeface_win.h" ]
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "src/ports/SkFontHost_win.cpp" ]
|
2019-03-04 18:54:02 +00:00
|
|
|
libs = [ "Gdi32.lib" ]
|
2016-09-12 22:15:44 +00:00
|
|
|
}
|
|
|
|
|
2017-09-11 20:50:14 +00:00
|
|
|
if (skia_lex) {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable("sksllex") {
|
2017-09-07 13:39:50 +00:00
|
|
|
sources = [
|
2021-10-20 16:40:03 +00:00
|
|
|
"src/sksl/lex/DFA.h",
|
|
|
|
"src/sksl/lex/DFAState.h",
|
|
|
|
"src/sksl/lex/LexUtil.h",
|
2017-09-07 13:39:50 +00:00
|
|
|
"src/sksl/lex/Main.cpp",
|
|
|
|
"src/sksl/lex/NFA.cpp",
|
2021-10-20 16:40:03 +00:00
|
|
|
"src/sksl/lex/NFA.h",
|
|
|
|
"src/sksl/lex/NFAState.h",
|
|
|
|
"src/sksl/lex/NFAtoDFA.h",
|
2017-09-07 13:39:50 +00:00
|
|
|
"src/sksl/lex/RegexNode.cpp",
|
2021-10-20 16:40:03 +00:00
|
|
|
"src/sksl/lex/RegexNode.h",
|
2017-09-07 13:39:50 +00:00
|
|
|
"src/sksl/lex/RegexParser.cpp",
|
2021-10-20 16:40:03 +00:00
|
|
|
"src/sksl/lex/RegexParser.h",
|
|
|
|
"src/sksl/lex/TransitionTable.cpp",
|
|
|
|
"src/sksl/lex/TransitionTable.h",
|
2017-09-07 13:39:50 +00:00
|
|
|
]
|
2019-04-23 17:05:21 +00:00
|
|
|
include_dirs = [ "." ]
|
2017-09-07 13:39:50 +00:00
|
|
|
}
|
|
|
|
|
2017-09-11 20:50:14 +00:00
|
|
|
action("run_sksllex") {
|
|
|
|
script = "gn/run_sksllex.py"
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":sksllex(//gn/toolchain:$host_toolchain)" ]
|
|
|
|
sources = [ "src/sksl/lex/sksl.lex" ]
|
2017-09-11 20:50:14 +00:00
|
|
|
|
|
|
|
# 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 = [
|
2021-02-18 19:37:29 +00:00
|
|
|
"$target_out_dir/" + rebase_path("src/sksl/SkSLLexer.h", target_out_dir),
|
2017-09-11 20:50:14 +00:00
|
|
|
# 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"),
|
2020-06-11 23:57:22 +00:00
|
|
|
rebase_path("bin/fetch-clang-format"),
|
2017-09-11 20:50:14 +00:00
|
|
|
rebase_path("src"),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
group("run_sksllex") {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-06 21:18:14 +00:00
|
|
|
if (skia_compile_modules || skia_compile_sksl_tests) {
|
|
|
|
# Copy the module source files into the out directory.
|
|
|
|
copy("sksl_pre_includes") {
|
|
|
|
sources = [
|
|
|
|
"src/sksl/sksl_frag.sksl",
|
|
|
|
"src/sksl/sksl_gpu.sksl",
|
2022-04-21 19:18:24 +00:00
|
|
|
"src/sksl/sksl_graphite_frag.sksl",
|
|
|
|
"src/sksl/sksl_graphite_vert.sksl",
|
2022-04-06 21:18:14 +00:00
|
|
|
"src/sksl/sksl_public.sksl",
|
|
|
|
"src/sksl/sksl_rt_shader.sksl",
|
|
|
|
"src/sksl/sksl_vert.sksl",
|
|
|
|
]
|
|
|
|
outputs = [ "$root_out_dir/{{source_file_part}}" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-06 15:40:35 +00:00
|
|
|
if (skia_compile_modules) {
|
2022-04-06 21:18:14 +00:00
|
|
|
# Generate the sksl-precompile binary.
|
2022-04-06 15:40:35 +00:00
|
|
|
skia_executable("sksl-precompile") {
|
|
|
|
defines = [
|
|
|
|
"SKSL_STANDALONE",
|
|
|
|
"SK_DISABLE_TRACING",
|
|
|
|
]
|
|
|
|
sources = skslc_deps
|
|
|
|
sources += [ "tools/sksl-precompile/SkSLPrecompile.cpp" ]
|
|
|
|
libs = []
|
|
|
|
if (is_win) {
|
|
|
|
sources += [ "src/ports/SkOSFile_win.cpp" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "src/ports/SkOSFile_posix.cpp" ]
|
|
|
|
libs += [ "dl" ]
|
|
|
|
}
|
|
|
|
sources += skia_sksl_sources
|
|
|
|
sources += skia_sksl_gpu_sources
|
|
|
|
include_dirs = [ "." ]
|
|
|
|
deps = [ ":run_sksllex" ]
|
|
|
|
}
|
2022-04-06 21:18:14 +00:00
|
|
|
|
|
|
|
sksl_precompile_path = "$root_out_dir/"
|
|
|
|
if (host_toolchain != default_toolchain_name) {
|
|
|
|
sksl_precompile_path += "$host_toolchain/"
|
|
|
|
}
|
|
|
|
sksl_precompile_path += "sksl-precompile"
|
|
|
|
if (host_os == "win") {
|
|
|
|
sksl_precompile_path += ".exe"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Use dehydrate_sksl.py to precompile all of the modules.
|
|
|
|
dehydrate_sksl_sources = get_target_outputs(":sksl_pre_includes")
|
|
|
|
|
|
|
|
dehydrate_sksl_outputs = []
|
|
|
|
foreach(src, dehydrate_sksl_sources) {
|
|
|
|
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.
|
|
|
|
dehydrate_sksl_outputs += [ "$target_out_dir/" + rebase_path(
|
|
|
|
"src/sksl/generated/$name.dehydrated.sksl",
|
|
|
|
target_out_dir) ]
|
|
|
|
}
|
|
|
|
|
|
|
|
action("dehydrate_sksl") {
|
|
|
|
script = "gn/dehydrate_sksl.py"
|
|
|
|
deps = [
|
|
|
|
":sksl-precompile(//gn/toolchain:$host_toolchain)",
|
|
|
|
":sksl_pre_includes",
|
|
|
|
]
|
|
|
|
sources = dehydrate_sksl_sources
|
|
|
|
outputs = dehydrate_sksl_outputs
|
|
|
|
args = [
|
|
|
|
rebase_path(sksl_precompile_path),
|
|
|
|
rebase_path("src/sksl/generated"),
|
|
|
|
]
|
|
|
|
args += rebase_path(dehydrate_sksl_sources)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
group("dehydrate_sksl") {
|
|
|
|
}
|
2022-04-06 15:40:35 +00:00
|
|
|
}
|
|
|
|
|
2022-04-06 21:18:14 +00:00
|
|
|
# `Compile SkSL Tests` relies on skslc and the precompiled modules.
|
2021-07-01 17:54:20 +00:00
|
|
|
if (skia_compile_sksl_tests) {
|
2022-04-06 21:18:14 +00:00
|
|
|
# Build skslc.
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable("skslc") {
|
2020-11-24 20:51:06 +00:00
|
|
|
defines = [
|
2022-04-12 12:23:07 +00:00
|
|
|
"SKSL_ENABLE_TRACING",
|
2020-11-24 20:51:06 +00:00
|
|
|
"SKSL_STANDALONE",
|
2021-02-24 18:59:39 +00:00
|
|
|
"SK_DISABLE_TRACING",
|
2021-12-09 20:24:51 +00:00
|
|
|
"SK_ENABLE_SPIRV_CROSS",
|
2020-11-24 20:51:06 +00:00
|
|
|
"SK_ENABLE_SPIRV_VALIDATION",
|
|
|
|
]
|
2022-03-30 18:20:13 +00:00
|
|
|
sources = skslc_deps
|
2022-04-05 19:38:49 +00:00
|
|
|
sources += [ "tools/skslc/Main.cpp" ]
|
2021-12-21 14:33:35 +00:00
|
|
|
libs = []
|
2020-12-17 21:02:08 +00:00
|
|
|
if (is_win) {
|
|
|
|
sources += [ "src/ports/SkOSFile_win.cpp" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "src/ports/SkOSFile_posix.cpp" ]
|
2021-12-21 14:33:35 +00:00
|
|
|
libs += [ "dl" ]
|
2020-12-17 21:02:08 +00:00
|
|
|
}
|
2017-06-29 14:03:38 +00:00
|
|
|
sources += skia_sksl_sources
|
2019-06-18 14:14:20 +00:00
|
|
|
sources += skia_sksl_gpu_sources
|
2022-04-12 12:23:07 +00:00
|
|
|
sources += skia_sksl_tracing_sources
|
2019-04-23 17:05:21 +00:00
|
|
|
include_dirs = [ "." ]
|
2017-06-29 14:03:38 +00:00
|
|
|
deps = [
|
2017-11-10 20:34:03 +00:00
|
|
|
":run_sksllex",
|
2021-12-21 14:33:35 +00:00
|
|
|
":skvm_jit",
|
2021-03-08 14:25:34 +00:00
|
|
|
"//third_party/externals/spirv-tools:spvtools",
|
|
|
|
"//third_party/externals/spirv-tools:spvtools_val",
|
2021-12-09 20:24:51 +00:00
|
|
|
"//third_party/spirv-cross:spirv_cross",
|
2017-06-29 14:03:38 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
Reland "Untangle dependency cycle in sksl dehydration"
Explanation: The sksl standalone compiler is used to convert the raw
(text) SkSL pre-includes into a "dehydrated" binary format. It also
(previously) depended on those files, as they were #included and used,
unless a special #define was changed. This created a dependency cycle
that we hid from GN (by lying about the outputs of the dehydrate step).
As a result, builds would never reach steady-state, because the compiler
would be rebuilt (due to the newer dehydrated files), and then the
dehydrated files would be rebuilt (due to the newer compiler).
This CL changes the logic so that the standalone compiler always uses
the textual pre-includes, and no longer depends on the dehydrated binary
files. Thus, to make any kind of change to the dehydrated files (whether
due to pre-include changes, or the encoding format itself), you just
need skia_compile_processors enabled. The dependencies are now honestly
communicated to GN, and we reach steady state after one build.
The NOTE above is because GN/ninja cache the dependencies of each
target, and will still think that the SkSLCompiler.obj linked into the
standalone compiler depends on the dehydrated files, at least until one
successful build, when it will realize that's no longer true.
Reland notes:
The bots originally rejected this CL, because SkSLCompiler was
hard-coded to load the text files from a relative path that assumed the
executable was in "<skia_checkout>/out/<some_dir>". That's not true for
bots, and it was fragile, even for users. Now, we use GN to directly
generate sksl_fp.sksl, and copy all of the other pre-includes to the
root out dir (working directory when running skslc). This means we
no longer need to generate the sksl_fp.sksl file into the src tree, and
the compiler can more safely assume that the files will be in the
working directory.
Bug: skia:10571
Change-Id: Id7837a9aba7ee0c3f7fa82eb84f7761e24b9c705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308896
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-08 12:17:18 +00:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2022-04-06 21:18:14 +00:00
|
|
|
# Build the test files using skslc.
|
2020-09-14 14:21:44 +00:00
|
|
|
import("gn/sksl_tests.gni")
|
2020-09-24 20:42:09 +00:00
|
|
|
template("compile_sksl") {
|
|
|
|
# Compile the passed-in `sources` into `outputs` using skslc, with the given language/settings.
|
|
|
|
action("compile_sksl_${target_name}") {
|
|
|
|
script = "gn/compile_sksl_tests.py"
|
|
|
|
deps = [
|
|
|
|
":sksl_pre_includes",
|
|
|
|
":skslc(//gn/toolchain:$host_toolchain)",
|
|
|
|
]
|
2021-01-22 16:54:30 +00:00
|
|
|
sources = []
|
2020-09-24 20:42:09 +00:00
|
|
|
outputs = []
|
2021-01-27 19:05:15 +00:00
|
|
|
response_file_contents = []
|
2021-01-22 16:54:30 +00:00
|
|
|
args = [
|
|
|
|
rebase_path(skslc_path),
|
|
|
|
invoker.lang,
|
|
|
|
invoker.settings,
|
2021-01-27 19:05:15 +00:00
|
|
|
"{{response_file_name}}",
|
2021-01-22 16:54:30 +00:00
|
|
|
]
|
|
|
|
|
2021-01-22 16:55:48 +00:00
|
|
|
testsDir = get_path_info("tests", "abspath")
|
|
|
|
resourcesDir = get_path_info("resources", "abspath")
|
|
|
|
|
|
|
|
foreach(partialPath, invoker.sources) {
|
|
|
|
dst = testsDir + partialPath
|
|
|
|
src = resourcesDir + partialPath
|
|
|
|
|
|
|
|
dir = get_path_info(dst, "dir")
|
2022-03-30 21:58:28 +00:00
|
|
|
name = get_path_info(dst, "name")
|
|
|
|
ext = get_path_info(dst, "extension")
|
2021-01-27 19:05:15 +00:00
|
|
|
response_file_contents += rebase_path([
|
|
|
|
src,
|
|
|
|
dir,
|
|
|
|
])
|
2021-01-22 16:54:30 +00:00
|
|
|
sources += [ src ]
|
2020-12-08 20:07:00 +00:00
|
|
|
|
2021-01-22 16:54:30 +00:00
|
|
|
foreach(outExtension, invoker.outExtensions) {
|
2021-08-27 15:21:12 +00:00
|
|
|
# SPIR-V uses separate extensions for .vert shaders.
|
2021-04-13 21:13:03 +00:00
|
|
|
if (ext == "vert" && outExtension == ".asm.frag") {
|
2020-12-08 20:07:00 +00:00
|
|
|
outExtension = ".asm.vert"
|
|
|
|
}
|
2021-01-22 16:55:48 +00:00
|
|
|
outputs +=
|
|
|
|
[ target_out_dir + "/" +
|
|
|
|
rebase_path(dir + "/" + name + outExtension, target_out_dir) ]
|
2020-09-24 20:42:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-09-16 21:46:37 +00:00
|
|
|
}
|
2020-09-24 20:42:09 +00:00
|
|
|
compile_sksl("glsl_tests") {
|
|
|
|
sources = sksl_glsl_tests_sources + sksl_glsl_settings_tests_sources
|
2021-01-22 16:54:30 +00:00
|
|
|
outExtensions = [ ".glsl" ]
|
2020-09-24 20:42:09 +00:00
|
|
|
lang = "--glsl"
|
|
|
|
settings = "--settings"
|
|
|
|
}
|
|
|
|
compile_sksl("glsl_nosettings_tests") {
|
2020-09-16 21:46:37 +00:00
|
|
|
sources = sksl_glsl_settings_tests_sources
|
2021-01-22 16:54:30 +00:00
|
|
|
outExtensions = [ "StandaloneSettings.glsl" ]
|
2020-09-24 20:42:09 +00:00
|
|
|
lang = "--glsl"
|
|
|
|
settings = "--nosettings"
|
2020-09-14 14:21:44 +00:00
|
|
|
}
|
2020-09-25 17:35:58 +00:00
|
|
|
compile_sksl("metal_tests") {
|
|
|
|
sources = sksl_metal_tests_sources
|
2021-01-22 16:54:30 +00:00
|
|
|
outExtensions = [ ".metal" ]
|
2020-09-25 17:35:58 +00:00
|
|
|
lang = "--metal"
|
|
|
|
settings = "--settings"
|
|
|
|
}
|
2020-12-22 16:28:59 +00:00
|
|
|
compile_sksl("skvm_tests") {
|
|
|
|
sources = sksl_skvm_tests_sources
|
2021-01-22 16:54:30 +00:00
|
|
|
outExtensions = [ ".skvm" ]
|
2020-12-22 16:28:59 +00:00
|
|
|
lang = "--skvm"
|
|
|
|
settings = "--settings"
|
|
|
|
}
|
2021-02-08 18:49:53 +00:00
|
|
|
compile_sksl("stage_tests") {
|
|
|
|
sources = sksl_stage_tests_sources
|
|
|
|
outExtensions = [ ".stage" ]
|
|
|
|
lang = "--stage"
|
|
|
|
settings = "--settings"
|
|
|
|
}
|
2020-11-20 21:28:50 +00:00
|
|
|
compile_sksl("spirv_tests") {
|
|
|
|
sources = sksl_spirv_tests_sources
|
2021-01-22 16:54:30 +00:00
|
|
|
outExtensions = [ ".asm.frag" ]
|
2020-11-20 21:28:50 +00:00
|
|
|
lang = "--spirv"
|
|
|
|
settings = "--settings"
|
|
|
|
}
|
2022-04-02 03:04:51 +00:00
|
|
|
compile_sksl("wgsl_tests") {
|
|
|
|
sources = sksl_wgsl_tests_sources
|
|
|
|
outExtensions = [ ".wgsl" ]
|
|
|
|
lang = "--wgsl"
|
|
|
|
settings = "--settings"
|
|
|
|
}
|
2020-09-14 14:21:44 +00:00
|
|
|
} else {
|
2020-09-24 20:42:09 +00:00
|
|
|
group("compile_sksl_glsl_tests") {
|
2020-07-28 18:46:53 +00:00
|
|
|
}
|
2020-09-24 20:42:09 +00:00
|
|
|
group("compile_sksl_glsl_nosettings_tests") {
|
2020-09-16 21:46:37 +00:00
|
|
|
}
|
2020-09-25 17:35:58 +00:00
|
|
|
group("compile_sksl_metal_tests") {
|
|
|
|
}
|
2020-12-22 16:28:59 +00:00
|
|
|
group("compile_sksl_skvm_tests") {
|
|
|
|
}
|
2020-11-20 21:28:50 +00:00
|
|
|
group("compile_sksl_spirv_tests") {
|
|
|
|
}
|
2022-04-02 03:04:51 +00:00
|
|
|
group("compile_sksl_wgsl_tests") {
|
|
|
|
}
|
2017-06-29 14:03:38 +00:00
|
|
|
}
|
|
|
|
|
2021-11-03 20:25:41 +00:00
|
|
|
optional("gpu_shared") {
|
|
|
|
enabled = skia_enable_gpu || skia_enable_graphite
|
|
|
|
|
Fix Graphite + SkSL build when SK_SUPPORT_GPU is not defined
See first build failure at https://logs.chromium.org/logs/skia/59b76a7ac5344811/+/steps/ninja/0/stdout
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite
Change-Id: Ic1dcde745b1f41acc8cef3e01493a3fca5a873bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522978
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-22 01:52:53 +00:00
|
|
|
deps = []
|
|
|
|
public_defines = []
|
|
|
|
|
|
|
|
if (skia_use_direct3d) {
|
|
|
|
# Must be defined when 'skia_sksl_gpu_sources' is built, even if the rest of skia_use_direct3d
|
|
|
|
# is handled only in the 'gpu' component.
|
|
|
|
public_defines += [ "SK_ENABLE_SPIRV_CROSS" ]
|
|
|
|
deps += [ "//third_party/spirv-cross:spirv_cross" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
sources = skia_shared_gpu_sources + skia_sksl_gpu_sources
|
2021-11-03 20:25:41 +00:00
|
|
|
}
|
|
|
|
|
2019-02-15 19:59:30 +00:00
|
|
|
optional("gpu") {
|
2016-09-20 19:28:12 +00:00
|
|
|
enabled = skia_enable_gpu
|
2017-06-29 14:03:38 +00:00
|
|
|
deps = [
|
2020-09-24 20:42:09 +00:00
|
|
|
":compile_sksl_glsl_nosettings_tests",
|
|
|
|
":compile_sksl_glsl_tests",
|
2020-09-25 17:35:58 +00:00
|
|
|
":compile_sksl_metal_tests",
|
2020-12-22 16:28:59 +00:00
|
|
|
":compile_sksl_skvm_tests",
|
2020-11-20 21:28:50 +00:00
|
|
|
":compile_sksl_spirv_tests",
|
2020-07-28 18:46:53 +00:00
|
|
|
":dehydrate_sksl",
|
2021-11-03 20:25:41 +00:00
|
|
|
":gpu_shared",
|
2017-09-11 20:50:14 +00:00
|
|
|
":run_sksllex",
|
2017-06-29 14:03:38 +00:00
|
|
|
]
|
2018-04-18 20:46:25 +00:00
|
|
|
if (skia_generate_workarounds) {
|
|
|
|
deps += [ ":workaround_list" ]
|
|
|
|
}
|
2019-11-08 21:18:15 +00:00
|
|
|
public_defines = []
|
2018-05-03 15:30:29 +00:00
|
|
|
public_configs = []
|
2018-05-22 17:25:15 +00:00
|
|
|
public_deps = []
|
2016-09-20 22:11:46 +00:00
|
|
|
|
Fix Graphite + SkSL build when SK_SUPPORT_GPU is not defined
See first build failure at https://logs.chromium.org/logs/skia/59b76a7ac5344811/+/steps/ninja/0/stdout
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite
Change-Id: Ic1dcde745b1f41acc8cef3e01493a3fca5a873bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522978
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-22 01:52:53 +00:00
|
|
|
sources = skia_gpu_sources
|
2021-07-01 16:12:52 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
|
|
|
sources -= skia_skgpu_v1_sources
|
2021-06-09 18:04:05 +00:00
|
|
|
}
|
2021-05-03 15:42:40 +00:00
|
|
|
|
2016-10-13 21:18:04 +00:00
|
|
|
libs = []
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = []
|
2016-09-20 22:11:46 +00:00
|
|
|
|
2019-11-08 21:18:15 +00:00
|
|
|
if (skia_use_gl) {
|
|
|
|
public_defines += [ "SK_GL" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_android) {
|
2021-02-18 21:23:41 +00:00
|
|
|
sources += [
|
2022-04-07 15:20:24 +00:00
|
|
|
"src/gpu/ganesh/gl/egl/GrGLMakeEGLInterface.cpp",
|
|
|
|
"src/gpu/ganesh/gl/egl/GrGLMakeNativeInterface_egl.cpp",
|
2021-02-18 21:23:41 +00:00
|
|
|
]
|
2020-03-19 19:54:28 +00:00
|
|
|
|
|
|
|
# this lib is required to link against AHardwareBuffer
|
|
|
|
if (defined(ndk_api) && ndk_api >= 26) {
|
|
|
|
libs += [ "android" ]
|
|
|
|
}
|
|
|
|
} else if (skia_use_egl) {
|
2021-02-18 21:23:41 +00:00
|
|
|
sources += [
|
2022-04-07 15:20:24 +00:00
|
|
|
"src/gpu/ganesh/gl/egl/GrGLMakeEGLInterface.cpp",
|
|
|
|
"src/gpu/ganesh/gl/egl/GrGLMakeNativeInterface_egl.cpp",
|
2021-02-18 21:23:41 +00:00
|
|
|
]
|
2020-03-19 19:54:28 +00:00
|
|
|
libs += [ "EGL" ]
|
2020-08-19 18:30:58 +00:00
|
|
|
} else if (skia_use_webgl) {
|
2022-04-07 15:20:24 +00:00
|
|
|
sources += [ "src/gpu/ganesh/gl/webgl/GrGLMakeNativeInterface_webgl.cpp" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
} else if (is_linux && skia_use_x11) {
|
2021-02-18 21:23:41 +00:00
|
|
|
sources += [
|
2022-04-07 15:20:24 +00:00
|
|
|
"src/gpu/ganesh/gl/glx/GrGLMakeGLXInterface.cpp",
|
|
|
|
"src/gpu/ganesh/gl/glx/GrGLMakeNativeInterface_glx.cpp",
|
2021-02-18 21:23:41 +00:00
|
|
|
]
|
2020-03-19 19:54:28 +00:00
|
|
|
libs += [ "GL" ]
|
|
|
|
} else if (is_mac) {
|
2022-04-07 15:20:24 +00:00
|
|
|
sources += [ "src/gpu/ganesh/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
} else if (is_ios) {
|
2022-04-07 15:20:24 +00:00
|
|
|
sources += [ "src/gpu/ganesh/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
|
2021-02-09 14:22:41 +00:00
|
|
|
} else if (is_win && !skia_enable_winuwp) {
|
2022-04-07 15:20:24 +00:00
|
|
|
sources += [ "src/gpu/ganesh/gl/win/GrGLMakeNativeInterface_win.cpp" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
if (target_cpu != "arm64") {
|
|
|
|
libs += [ "OpenGL32.lib" ]
|
|
|
|
}
|
|
|
|
} else {
|
2022-04-07 15:20:24 +00:00
|
|
|
sources += [ "src/gpu/ganesh/gl/GrGLMakeNativeInterface_none.cpp" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
}
|
2019-11-08 21:18:15 +00:00
|
|
|
sources += skia_gl_gpu_sources
|
|
|
|
}
|
2020-03-19 19:54:28 +00:00
|
|
|
|
2016-09-20 22:11:46 +00:00
|
|
|
if (skia_use_vulkan) {
|
2018-08-01 13:23:57 +00:00
|
|
|
public_defines += [ "SK_VULKAN" ]
|
2020-04-27 14:26:21 +00:00
|
|
|
if (skia_use_vma) {
|
|
|
|
deps += [ "third_party/vulkanmemoryallocator" ]
|
|
|
|
}
|
2016-09-20 22:11:46 +00:00
|
|
|
sources += skia_vk_sources
|
2016-09-21 14:36:14 +00:00
|
|
|
if (skia_enable_vulkan_debug_layers) {
|
|
|
|
public_defines += [ "SK_ENABLE_VK_LAYERS" ]
|
|
|
|
}
|
2018-12-13 18:20:07 +00:00
|
|
|
if (is_fuchsia) {
|
2019-11-13 22:30:45 +00:00
|
|
|
if (using_fuchsia_sdk) {
|
2019-05-06 23:44:06 +00:00
|
|
|
public_deps += [ "$fuchsia_sdk_root/pkg:vulkan" ]
|
|
|
|
} else {
|
2019-07-09 14:48:28 +00:00
|
|
|
public_deps += [ "//src/graphics/lib/vulkan" ]
|
2019-05-06 23:44:06 +00:00
|
|
|
}
|
2018-12-13 18:20:07 +00:00
|
|
|
}
|
2016-09-20 22:11:46 +00:00
|
|
|
}
|
2018-05-22 17:25:15 +00:00
|
|
|
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_android && (skia_use_gl || skia_use_vulkan)) {
|
|
|
|
# this lib is required to link against AHardwareBuffer
|
|
|
|
if (defined(ndk_api) && ndk_api >= 26) {
|
|
|
|
libs += [ "android" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-10 19:51:30 +00:00
|
|
|
if (skia_use_dawn) {
|
|
|
|
public_defines += [ "SK_DAWN" ]
|
2019-07-18 15:43:45 +00:00
|
|
|
sources += skia_dawn_sources
|
2022-03-21 13:22:25 +00:00
|
|
|
public_deps += [ "//third_party/externals/dawn/include/dawn:cpp_headers" ]
|
2019-10-17 14:32:40 +00:00
|
|
|
deps += [
|
2022-03-21 13:22:25 +00:00
|
|
|
"//third_party/externals/dawn/src/dawn:cpp",
|
|
|
|
"//third_party/externals/dawn/src/dawn:proc",
|
2019-07-10 19:51:30 +00:00
|
|
|
]
|
2021-11-15 19:08:02 +00:00
|
|
|
if (dawn_enable_d3d12 || dawn_enable_desktop_gl || dawn_enable_metal ||
|
|
|
|
dawn_enable_opengles || dawn_enable_vulkan) {
|
2022-03-21 13:22:25 +00:00
|
|
|
deps += [ "//third_party/externals/dawn/src/dawn/native" ]
|
2021-11-15 19:08:02 +00:00
|
|
|
}
|
2019-07-10 19:51:30 +00:00
|
|
|
if (dawn_enable_d3d12) {
|
|
|
|
libs += [
|
|
|
|
"d3d12.lib",
|
|
|
|
"dxgi.lib",
|
|
|
|
"d3dcompiler.lib",
|
|
|
|
]
|
|
|
|
} else if (dawn_enable_metal) {
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [ "Metal.framework" ]
|
2019-07-10 19:51:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-18 19:34:38 +00:00
|
|
|
if (skia_use_direct3d) {
|
Fix Graphite + SkSL build when SK_SUPPORT_GPU is not defined
See first build failure at https://logs.chromium.org/logs/skia/59b76a7ac5344811/+/steps/ninja/0/stdout
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-ASAN_Graphite,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite
Change-Id: Ic1dcde745b1f41acc8cef3e01493a3fca5a873bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522978
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-22 01:52:53 +00:00
|
|
|
public_defines += [ "SK_DIRECT3D" ]
|
|
|
|
deps += [ "//third_party/d3d12allocator" ]
|
2020-02-18 19:34:38 +00:00
|
|
|
sources += skia_direct3d_sources
|
2020-02-24 16:36:15 +00:00
|
|
|
if (skia_enable_direct3d_debug_layer) {
|
|
|
|
public_defines += [ "SK_ENABLE_D3D_DEBUG_LAYER" ]
|
|
|
|
}
|
2020-02-18 19:34:38 +00:00
|
|
|
libs += [
|
|
|
|
"d3d12.lib",
|
|
|
|
"dxgi.lib",
|
|
|
|
"d3dcompiler.lib",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
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
|
2021-07-07 16:02:10 +00:00
|
|
|
if (skia_enable_metal_debug_info) {
|
|
|
|
public_defines += [ "SK_ENABLE_MTL_DEBUG_INFO" ]
|
|
|
|
}
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [ "Metal.framework" ]
|
|
|
|
frameworks += [ "Foundation.framework" ]
|
2021-11-04 13:22:22 +00:00
|
|
|
if (is_ios) {
|
|
|
|
frameworks += [ "UIKit.framework" ]
|
|
|
|
}
|
2020-08-24 17:16:46 +00:00
|
|
|
cflags_objcc += [ "-fobjc-arc" ]
|
2017-07-05 20:49:36 +00:00
|
|
|
}
|
2017-11-19 18:20:13 +00:00
|
|
|
|
2022-04-07 19:16:14 +00:00
|
|
|
if (is_debug || skia_build_for_debugger) {
|
2018-10-04 16:52:50 +00:00
|
|
|
public_defines += [ "SK_ENABLE_DUMP_GPU" ]
|
|
|
|
}
|
2016-09-20 19:28:12 +00:00
|
|
|
}
|
|
|
|
|
2019-01-29 14:29:57 +00:00
|
|
|
optional("gif") {
|
2019-11-20 21:01:31 +00:00
|
|
|
enabled = !skia_use_wuffs && skia_use_libgifcodec
|
2019-11-21 15:15:50 +00:00
|
|
|
_libgifcodec_gni_path = "third_party/externals/libgifcodec/libgifcodec.gni"
|
|
|
|
if ("True" ==
|
|
|
|
exec_script("gn/checkpath.py",
|
|
|
|
[ rebase_path(_libgifcodec_gni_path, root_build_dir) ],
|
|
|
|
"trim string")) {
|
|
|
|
public_defines = [ "SK_USE_LIBGIFCODEC" ]
|
|
|
|
public_include_dirs = [
|
|
|
|
".",
|
|
|
|
skia_libgifcodec_path,
|
|
|
|
]
|
|
|
|
include_dirs = public_include_dirs
|
|
|
|
import(_libgifcodec_gni_path)
|
|
|
|
sources = rebase_path(libgifcodec_sources + libgifcodec_public,
|
|
|
|
".",
|
|
|
|
skia_libgifcodec_path)
|
|
|
|
}
|
2019-01-29 14:29:57 +00:00
|
|
|
}
|
|
|
|
|
2017-08-17 19:13:20 +00:00
|
|
|
optional("heif") {
|
|
|
|
enabled = skia_use_libheif
|
|
|
|
public_defines = [ "SK_HAS_HEIF_LIBRARY" ]
|
|
|
|
|
2021-11-11 17:50:02 +00:00
|
|
|
# This HEIF decoding functionality is a part of the Android Framework.
|
|
|
|
# https://android.googlesource.com/platform/frameworks/av/+/master/media/libheif/include/HeifDecoderAPI.h
|
|
|
|
# There isn't a way to compile that library outside of it, so we just link against
|
|
|
|
# the library. This feature is not supported on other platforms (and we haven't
|
|
|
|
# yet tried something like https://github.com/strukturag/libheif/tree/master/libheif).
|
|
|
|
# The dependency for Android is set in gn_to_bp.py.
|
2017-08-17 19:13:20 +00:00
|
|
|
deps = []
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "src/codec/SkHeifCodec.cpp" ]
|
2017-08-17 19:13:20 +00:00
|
|
|
}
|
|
|
|
|
2020-03-09 18:23:30 +00:00
|
|
|
optional("jpeg_decode") {
|
|
|
|
enabled = skia_use_libjpeg_turbo_decode
|
|
|
|
public_defines = [ "SK_CODEC_DECODES_JPEG" ]
|
2020-03-06 18:14:42 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
|
2020-03-06 18:14:42 +00:00
|
|
|
sources = [
|
2020-03-06 21:39:05 +00:00
|
|
|
"src/codec/SkJpegCodec.cpp",
|
|
|
|
"src/codec/SkJpegDecoderMgr.cpp",
|
|
|
|
"src/codec/SkJpegUtility.cpp",
|
2020-03-09 18:23:30 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
optional("jpeg_encode") {
|
|
|
|
enabled = skia_use_libjpeg_turbo_encode
|
|
|
|
public_defines = [ "SK_ENCODE_JPEG" ]
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
|
|
|
|
public = [ "include/encode/SkJpegEncoder.h" ]
|
2020-03-09 18:23:30 +00:00
|
|
|
sources = [
|
2016-08-24 16:55:56 +00:00
|
|
|
"src/images/SkJPEGWriteUtility.cpp",
|
2017-05-05 18:02:13 +00:00
|
|
|
"src/images/SkJpegEncoder.cpp",
|
2016-08-24 16:55:56 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-02-02 13:45:33 +00:00
|
|
|
optional("jpegxl_decode") {
|
|
|
|
enabled = skia_use_libjxl_decode
|
|
|
|
public_defines = [ "SK_CODEC_DECODES_JPEGXL" ]
|
|
|
|
|
|
|
|
deps = [ "//third_party/libjxl" ]
|
|
|
|
sources = [ "src/codec/SkJpegxlCodec.cpp" ]
|
|
|
|
}
|
|
|
|
|
2020-08-05 20:51:10 +00:00
|
|
|
optional("ndk_images") {
|
|
|
|
enabled = skia_use_ndk_images
|
|
|
|
public_defines = [ "SK_ENABLE_NDK_IMAGES" ]
|
|
|
|
sources = [
|
|
|
|
"src/ports/SkImageEncoder_NDK.cpp",
|
|
|
|
"src/ports/SkImageGeneratorNDK.cpp",
|
|
|
|
"src/ports/SkNDKConversions.cpp",
|
|
|
|
]
|
2020-08-05 14:44:17 +00:00
|
|
|
libs = [ "jnigraphics" ]
|
|
|
|
}
|
|
|
|
|
2021-09-21 15:59:57 +00:00
|
|
|
optional("graphite") {
|
2021-09-24 20:46:36 +00:00
|
|
|
libs = []
|
|
|
|
frameworks = []
|
|
|
|
|
2021-09-21 15:59:57 +00:00
|
|
|
enabled = skia_enable_graphite
|
2021-11-03 20:25:41 +00:00
|
|
|
deps = [ ":gpu_shared" ]
|
2021-09-21 15:59:57 +00:00
|
|
|
public_defines = [ "SK_GRAPHITE_ENABLED" ]
|
|
|
|
public = skia_graphite_public
|
2021-11-04 12:37:59 +00:00
|
|
|
sources = skia_graphite_sources
|
2021-09-24 20:46:36 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
public_defines += [ "SK_METAL" ]
|
|
|
|
sources += skia_graphite_mtl_sources
|
|
|
|
if (skia_enable_metal_debug_info) {
|
|
|
|
public_defines += [ "SK_ENABLE_MTL_DEBUG_INFO" ]
|
|
|
|
}
|
|
|
|
frameworks += [ "Metal.framework" ]
|
|
|
|
frameworks += [ "Foundation.framework" ]
|
2021-12-16 15:50:01 +00:00
|
|
|
if (is_ios) {
|
|
|
|
frameworks += [ "UIKit.framework" ]
|
|
|
|
}
|
2021-09-24 20:46:36 +00:00
|
|
|
}
|
2021-09-21 13:57:43 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/zlib" ]
|
2020-03-09 18:23:30 +00:00
|
|
|
if (skia_use_libjpeg_turbo_decode) {
|
|
|
|
deps += [ ":jpeg_decode" ]
|
|
|
|
}
|
|
|
|
if (skia_use_libjpeg_turbo_encode) {
|
|
|
|
deps += [ ":jpeg_encode" ]
|
2018-04-05 20:58:41 +00:00
|
|
|
}
|
2020-03-24 16:29:44 +00:00
|
|
|
public = skia_pdf_public
|
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" ]
|
2019-02-20 16:25:45 +00:00
|
|
|
if (skia_use_icu && skia_use_harfbuzz && skia_pdf_subset_harfbuzz) {
|
|
|
|
deps += [ "//third_party/harfbuzz" ]
|
|
|
|
defines = [ "SK_PDF_USE_HARFBUZZ_SUBSET" ]
|
|
|
|
} else if (skia_use_icu && skia_use_sfntly) {
|
2016-08-24 16:55:56 +00:00
|
|
|
deps += [ "//third_party/sfntly" ]
|
2019-02-04 20:36:31 +00:00
|
|
|
defines = [ "SK_PDF_USE_SFNTLY" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-24 16:29:44 +00:00
|
|
|
optional("xps") {
|
|
|
|
enabled = skia_use_xps && is_win
|
|
|
|
public_defines = [ "SK_SUPPORT_XPS" ]
|
|
|
|
public = skia_xps_public
|
|
|
|
sources = skia_xps_sources
|
|
|
|
}
|
|
|
|
|
2020-03-09 18:23:30 +00:00
|
|
|
optional("png_decode") {
|
|
|
|
enabled = skia_use_libpng_decode
|
|
|
|
public_defines = [ "SK_CODEC_DECODES_PNG" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/libpng" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
sources = [
|
|
|
|
"src/codec/SkIcoCodec.cpp",
|
|
|
|
"src/codec/SkPngCodec.cpp",
|
2020-03-09 18:23:30 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
optional("png_encode") {
|
|
|
|
enabled = skia_use_libpng_encode
|
|
|
|
public_defines = [ "SK_ENCODE_PNG" ]
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/libpng" ]
|
|
|
|
sources = [ "src/images/SkPngEncoder.cpp" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
}
|
|
|
|
|
2016-10-31 16:02:57 +00:00
|
|
|
optional("raw") {
|
2020-03-09 18:23:30 +00:00
|
|
|
enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo_decode && 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.
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = [ "gn/portable:add_exceptions" ]
|
2016-10-31 16:02:57 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "src/codec/SkRawCodec.cpp" ]
|
2016-10-31 16:02:57 +00:00
|
|
|
}
|
|
|
|
|
2018-05-15 14:46:58 +00:00
|
|
|
import("third_party/skcms/skcms.gni")
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("skcms") {
|
2018-05-15 14:46:58 +00:00
|
|
|
cflags = []
|
|
|
|
if (!is_win || is_clang) {
|
|
|
|
cflags += [
|
|
|
|
"-w",
|
|
|
|
"-std=c11",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
public = [ "include/third_party/skcms/skcms.h" ]
|
2019-04-29 14:28:22 +00:00
|
|
|
include_dirs = [ "include/third_party/skcms" ]
|
2018-05-15 14:46:58 +00:00
|
|
|
sources = rebase_path(skcms_sources, ".", "third_party/skcms")
|
|
|
|
}
|
|
|
|
|
2016-08-29 20:26:14 +00:00
|
|
|
optional("typeface_freetype") {
|
|
|
|
enabled = skia_use_freetype
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/freetype2" ]
|
2016-08-29 20:26:14 +00:00
|
|
|
sources = [
|
|
|
|
"src/ports/SkFontHost_FreeType.cpp",
|
|
|
|
"src/ports/SkFontHost_FreeType_common.cpp",
|
2020-06-27 16:52:14 +00:00
|
|
|
"src/ports/SkFontHost_FreeType_common.h",
|
2016-08-29 20:26:14 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2020-03-09 18:23:30 +00:00
|
|
|
optional("webp_decode") {
|
|
|
|
enabled = skia_use_libwebp_decode
|
|
|
|
public_defines = [ "SK_CODEC_DECODES_WEBP" ]
|
2016-08-23 20:56:37 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/libwebp" ]
|
|
|
|
sources = [ "src/codec/SkWebpCodec.cpp" ]
|
2020-03-09 18:23:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
optional("webp_encode") {
|
|
|
|
enabled = skia_use_libwebp_encode
|
|
|
|
public_defines = [ "SK_ENCODE_WEBP" ]
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/libwebp" ]
|
|
|
|
sources = [ "src/images/SkWebpEncoder.cpp" ]
|
2016-08-23 20:56:37 +00:00
|
|
|
}
|
2016-08-23 14:38:09 +00:00
|
|
|
|
2018-10-26 13:25:51 +00:00
|
|
|
optional("wuffs") {
|
|
|
|
enabled = skia_use_wuffs
|
2020-08-17 11:14:13 +00:00
|
|
|
public_defines = [ "SK_HAS_WUFFS_LIBRARY" ]
|
2018-10-26 13:25:51 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/wuffs" ]
|
|
|
|
sources = [ "src/codec/SkWuffsCodec.cpp" ]
|
2018-10-26 13:25:51 +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
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//third_party/expat" ]
|
2016-08-24 16:55:56 +00:00
|
|
|
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",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-06-06 16:42:02 +00:00
|
|
|
optional("skvm_jit") {
|
2020-08-14 12:36:54 +00:00
|
|
|
enabled = skia_enable_skvm_jit_when_possible
|
|
|
|
public_defines = [ "SKVM_JIT_WHEN_POSSIBLE" ]
|
2020-07-10 17:56:07 +00:00
|
|
|
if (skia_vtune_path != "") {
|
|
|
|
public_defines += [ "SKVM_JIT_VTUNE" ]
|
|
|
|
public_include_dirs = [ "$skia_vtune_path/include" ]
|
|
|
|
libs = [ "$skia_vtune_path/lib64/jitprofiling.lib" ]
|
|
|
|
}
|
2019-06-06 16:42:02 +00:00
|
|
|
}
|
|
|
|
|
2018-04-18 20:46:25 +00:00
|
|
|
if (skia_enable_gpu && skia_generate_workarounds) {
|
|
|
|
action("workaround_list") {
|
|
|
|
script = "tools/build_workaround_header.py"
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
inputs = [ "src/gpu/gpu_workaround_list.txt" ]
|
2018-04-18 20:46:25 +00:00
|
|
|
|
2021-07-01 17:54:20 +00:00
|
|
|
# GN insists its outputs should go somewhere underneath root_out_dir, so we trick it with a
|
|
|
|
# path that starts with root_out_dir and then uses ".." to back up into the src dir.
|
2018-04-18 20:46:25 +00:00
|
|
|
output_file =
|
2018-05-14 21:02:03 +00:00
|
|
|
rebase_path("include/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir)
|
2018-04-18 20:46:25 +00:00
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
outputs = [ "$root_out_dir/$output_file" ]
|
2018-04-18 20:46:25 +00:00
|
|
|
args = [
|
|
|
|
"--output-file",
|
|
|
|
"$output_file",
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach(file, inputs) {
|
|
|
|
args += [ rebase_path(file, root_build_dir) ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_component("skia") {
|
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
|
|
|
public_configs = [ ":skia_public" ]
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = skia_library_configs
|
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
|
|
|
|
2018-11-07 21:17:34 +00:00
|
|
|
public_deps = [
|
2020-06-11 18:41:47 +00:00
|
|
|
":fontmgr_FontConfigInterface",
|
|
|
|
":fontmgr_android",
|
|
|
|
":fontmgr_custom_directory",
|
|
|
|
":fontmgr_custom_embedded",
|
|
|
|
":fontmgr_custom_empty",
|
|
|
|
":fontmgr_fontconfig",
|
|
|
|
":fontmgr_fuchsia",
|
|
|
|
":fontmgr_mac_ct",
|
|
|
|
":fontmgr_win",
|
|
|
|
":fontmgr_win_gdi",
|
2019-02-15 19:59:30 +00:00
|
|
|
":gpu",
|
2021-09-21 15:59:57 +00:00
|
|
|
":graphite",
|
2018-11-07 21:17:34 +00:00
|
|
|
":pdf",
|
|
|
|
":skcms",
|
2020-03-24 16:29:44 +00:00
|
|
|
":xps",
|
2018-11-07 21:17:34 +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
|
|
|
deps = [
|
2020-04-24 17:00:48 +00:00
|
|
|
":android_utils",
|
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",
|
2020-06-03 17:20:37 +00:00
|
|
|
":fontmgr_factory",
|
2019-01-29 14:29:57 +00:00
|
|
|
":gif",
|
2017-08-17 19:13:20 +00:00
|
|
|
":heif",
|
Reland "Reland "make SkJumper stages normal Skia code""
This is a reland of 78cb579f33943421afc8423a39867fcfd69fed44
This time, lowp stages are controlled by !defined(JUMPER_IS_SCALAR), not
by defined(__clang__). The two are usually the same, except when we opt
Clang builds into JUMPER_IS_SCALAR artificially.
Some Google3 builds use compilers old enough that they barf when
compiling our NEON code. It's conceivably also possible to define
JUMPER_IS_SCALAR yourself, but I don't think anyone does that.
Original change's description:
> Reland "make SkJumper stages normal Skia code"
>
> This is a reland of 22e536e3a1a09405d1c0e6f071717a726d86e8d4
>
> Now with fixed #include paths in SkRasterPipeline_opts.h,
> and -ffp-contract=fast for the :hsw target to minimize
> diffs on non-Windows Clang AVX2/AVX-512 bots.
>
> Original change's description:
> > make SkJumper stages normal Skia code
> >
> > Enough clients are using Clang now that we can say, use Clang to build
> > if you want these software pipeline stages to go fast.
> >
> > This lets us drop the offline build aspect of SkJumper stages, instead
> > building as part of Skia using the SkOpts framework.
> >
> > I think everything should work, except I've (temporarily) removed
> > AVX-512 support. I will put this back in a follow up.
> >
> > I have had to drop Windows down to __vectorcall and our narrower
> > stage calling convention that keeps the d-registers on the stack.
> > I tried forcing sysv_abi, but that crashed Clang. :/
> >
> > Added a TODO to up the same narrower stage calling convention
> > for lowp stages... we just *don't* today, for no good reason.
> >
> > Change-Id: Iaaa792ffe4deab3508d2dc5d0008c163c24b3383
> > Reviewed-on: https://skia-review.googlesource.com/110641
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Herb Derby <herb@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
>
> Change-Id: I44f2c03d33958e3807747e40904b6351957dd448
> Reviewed-on: https://skia-review.googlesource.com/112742
> Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I3d71197d4bbb19ca4a94961a97fa2e54d5cbfb0d
Reviewed-on: https://skia-review.googlesource.com/112744
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-02-27 15:37:40 +00:00
|
|
|
":hsw",
|
2020-03-09 18:23:30 +00:00
|
|
|
":jpeg_decode",
|
|
|
|
":jpeg_encode",
|
2022-02-02 13:45:33 +00:00
|
|
|
":jpegxl_decode",
|
2020-08-05 20:51:10 +00:00
|
|
|
":ndk_images",
|
2016-08-25 00:32:30 +00:00
|
|
|
":none",
|
2020-03-09 18:23:30 +00:00
|
|
|
":png_decode",
|
|
|
|
":png_encode",
|
2016-10-31 16:02:57 +00:00
|
|
|
":raw",
|
2019-06-06 16:42:02 +00:00
|
|
|
":skvm_jit",
|
2020-06-05 13:57:05 +00:00
|
|
|
":skx",
|
2016-08-25 00:32:30 +00:00
|
|
|
":sse2",
|
|
|
|
":sse41",
|
|
|
|
":sse42",
|
|
|
|
":ssse3",
|
2020-03-09 18:23:30 +00:00
|
|
|
":webp_decode",
|
|
|
|
":webp_encode",
|
2018-10-26 13:25:51 +00:00
|
|
|
":wuffs",
|
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
|
|
|
]
|
|
|
|
|
2019-02-26 16:54:25 +00:00
|
|
|
public = skia_core_public
|
|
|
|
public += skia_utils_public
|
|
|
|
public += skia_effects_public
|
|
|
|
public += skia_effects_imagefilter_public
|
|
|
|
|
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
|
2018-11-08 12:08:05 +00:00
|
|
|
sources += skia_effects_sources
|
|
|
|
sources += skia_effects_imagefilter_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/codec/SkAndroidCodec.cpp",
|
2018-11-08 23:10:31 +00:00
|
|
|
"src/codec/SkAndroidCodecAdapter.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",
|
2018-05-30 19:33:46 +00:00
|
|
|
"src/codec/SkColorTable.cpp",
|
2018-08-27 15:55:46 +00:00
|
|
|
"src/codec/SkEncodedInfo.cpp",
|
2016-07-26 20:55:45 +00:00
|
|
|
"src/codec/SkMaskSwizzler.cpp",
|
|
|
|
"src/codec/SkMasks.cpp",
|
2019-09-24 16:40:11 +00:00
|
|
|
"src/codec/SkParseEncodedOrigin.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",
|
2018-11-08 12:08:05 +00:00
|
|
|
"src/ports/SkGlobalInitialization_default.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",
|
|
|
|
]
|
2016-09-01 21:24:39 +00:00
|
|
|
|
Reland "SkAndroidCodec: Support decoding all frames"
This is a reland of fc4fdc5b25f448dd9c2cd4e445561a840ce8514b
Original change's description:
> SkAndroidCodec: Support decoding all frames
>
> Bug: b/160984428
> Bug: b/163595585
>
> Add support to SkAndroidCodec for decoding all frames with an
> fSampleSize, so that an entire animation can be decoded to a smaller
> size.
>
> dm/:
> - Test scaled + animated decodes
>
> SkAndroidCodec:
> - Make AndroidOptions inherit from SkCodec::Options. This allows
> SkAndroidCodec to use fFrameIndex. (It also combines the two versions
> of fSubset, which is now const for both.)
> - Respect fFrameIndex, and call SkCodec::handleFrameIndex to decode
> the required frame.
> - Disallow decoding with kRespect + fFrameIndex > 0 if there is a
> non-default orientation. As currently written (except without
> disabling this combination), SkPixmapPriv::Orient would draw the new
> portion of the frame on top of uninitialized pixels, instead of the
> prior frame. This could be fixed by
> - If SkAndroidCodec needs to decode the required frame, it could do so
> without applying the orientation, then decode fFrameIndex, and then
> apply the orientation.
> - If the client provided the required frame, SkAndroidCodec would need
> to un-apply the orientation to get the proper starting state, then
> decode and apply.
> I think it is simpler to force the client to handle the orientation
> externally.
>
> SkCodec:
> - Allow SkAndroidCodec to call its private method handleFrameIndex. This
> method handles decoding a required frame, if necessary. When called by
> SkAndroidCodec, it now uses the SkAndroidCodec to check for/decode the
> required frame, so that it will scale properly.
> - Call rewindIfNeeded inside handleFrameIndex. handleFrameIndex calls a
> virtual method which may set some state (e.g. in SkJpegCodec). Without
> this change, that state would be reset by rewindIfNeeded.
> - Simplify handling a kRestoreBGColor frame. Whether provided or not,
> take the same path to calling zero_rect.
> - Updates to zero_rect:
> - Intersect after scaling, which will also check for empty.
> - Round out instead of in - this ensures we don't under-erase
> - Use kFill_ScaleToFit, which better matches the intent.
>
> Change-Id: Ibe1951980a0dca8f5b7b1f20192432d395681683
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333225
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
Bug: b/160984428
Bug: b/163595585
Change-Id: I7c1e79e0f92c75b4840eef65c8fc2b8497189e81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334842
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-11-09 19:18:12 +00:00
|
|
|
defines = [ "SK_HAS_ANDROID_CODEC" ]
|
2016-08-25 21:50:44 +00:00
|
|
|
libs = []
|
|
|
|
|
2021-07-12 21:02:21 +00:00
|
|
|
if (skia_enable_sksl) {
|
|
|
|
deps += [ ":dehydrate_sksl" ]
|
|
|
|
sources += skia_sksl_sources
|
2022-04-12 12:23:07 +00:00
|
|
|
|
|
|
|
if (skia_enable_sksl_tracing) {
|
|
|
|
defines += [ "SKSL_ENABLE_TRACING" ]
|
|
|
|
sources += skia_sksl_tracing_sources
|
|
|
|
}
|
2021-07-12 21:02:21 +00:00
|
|
|
}
|
|
|
|
|
2022-04-07 19:16:14 +00:00
|
|
|
if (skia_build_for_debugger) {
|
|
|
|
defines += [ "SK_BUILD_FOR_DEBUGGER" ]
|
|
|
|
}
|
|
|
|
|
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 += [
|
|
|
|
"src/ports/SkDebug_win.cpp",
|
|
|
|
"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
|
|
|
]
|
2016-10-11 22:13:53 +00:00
|
|
|
libs += [
|
|
|
|
"Ole32.lib",
|
|
|
|
"OleAut32.lib",
|
|
|
|
]
|
2021-02-09 14:22:41 +00:00
|
|
|
|
|
|
|
if (!skia_enable_winuwp) {
|
|
|
|
libs += [
|
|
|
|
"FontSub.lib",
|
|
|
|
"User32.lib",
|
|
|
|
"Usp10.lib",
|
|
|
|
]
|
|
|
|
}
|
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
|
|
|
]
|
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",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-04-16 00:00:35 +00:00
|
|
|
if (is_linux || is_wasm) {
|
2016-09-20 19:28:12 +00:00
|
|
|
sources += [ "src/ports/SkDebug_stdio.cpp" ]
|
2018-03-14 19:16:56 +00:00
|
|
|
if (skia_use_egl) {
|
|
|
|
libs += [ "GLESv2" ]
|
|
|
|
}
|
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) {
|
2021-10-05 18:22:02 +00:00
|
|
|
public += [ "include/ports/SkCFObject.h" ]
|
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-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/SkImageEncoder_CG.cpp",
|
|
|
|
"src/ports/SkImageGeneratorCG.cpp",
|
|
|
|
]
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = [
|
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) {
|
2021-10-05 18:22:02 +00:00
|
|
|
public += [ "include/ports/SkCFObject.h" ]
|
2016-11-03 18:06:31 +00:00
|
|
|
sources += [
|
|
|
|
"src/ports/SkDebug_stdio.cpp",
|
|
|
|
"src/ports/SkImageEncoder_CG.cpp",
|
|
|
|
"src/ports/SkImageGeneratorCG.cpp",
|
|
|
|
]
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = [
|
2016-11-03 18:06:31 +00:00
|
|
|
"CoreFoundation.framework",
|
|
|
|
"ImageIO.framework",
|
|
|
|
"MobileCoreServices.framework",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
2019-06-18 14:14:20 +00:00
|
|
|
|
|
|
|
if (skia_enable_spirv_validation) {
|
2021-03-08 14:25:34 +00:00
|
|
|
deps += [ "//third_party/externals/spirv-tools:spvtools_val" ]
|
2019-06-18 14:14:20 +00:00
|
|
|
defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
|
|
|
|
}
|
2019-06-25 19:48:47 +00:00
|
|
|
|
|
|
|
if (skia_include_multiframe_procs) {
|
|
|
|
sources += [ "tools/SkSharingProc.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
|
|
|
}
|
|
|
|
|
2019-03-05 15:45:40 +00:00
|
|
|
# DebugCanvas used in experimental/wasm-skp-debugger
|
2022-04-16 00:00:35 +00:00
|
|
|
if (is_wasm) {
|
2021-03-22 18:07:15 +00:00
|
|
|
skia_static_library("debugcanvas") {
|
2019-03-05 15:45:40 +00:00
|
|
|
public_configs = [ ":skia_public" ]
|
|
|
|
|
|
|
|
sources = [
|
2019-06-21 15:09:19 +00:00
|
|
|
"tools/SkSharingProc.cpp",
|
2019-03-05 15:45:40 +00:00
|
|
|
"tools/UrlDataManager.cpp",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
2019-12-12 16:05:10 +00:00
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
2019-03-05 15:45:40 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-22 18:07:15 +00:00
|
|
|
skia_static_library("pathkit") {
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2018-10-02 13:02:18 +00:00
|
|
|
public_configs = [ ":skia_public" ]
|
2021-03-22 18:07:15 +00:00
|
|
|
configs = skia_library_configs
|
2018-10-02 13:02:18 +00:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":arm64",
|
|
|
|
":armv7",
|
|
|
|
":avx",
|
|
|
|
":crc32",
|
|
|
|
":hsw",
|
|
|
|
":none",
|
|
|
|
":sse2",
|
|
|
|
":sse41",
|
|
|
|
":sse42",
|
|
|
|
":ssse3",
|
|
|
|
]
|
|
|
|
|
|
|
|
sources = []
|
|
|
|
sources += skia_pathops_sources
|
2019-02-26 16:54:25 +00:00
|
|
|
sources += skia_pathops_public
|
2018-10-02 13:02:18 +00:00
|
|
|
sources += [
|
|
|
|
"src/core/SkAnalyticEdge.cpp",
|
|
|
|
"src/core/SkArenaAlloc.cpp",
|
2019-02-06 16:40:27 +00:00
|
|
|
"src/core/SkContourMeasure.cpp",
|
2018-10-02 13:02:18 +00:00
|
|
|
"src/core/SkCubicMap.cpp",
|
|
|
|
"src/core/SkEdge.cpp",
|
|
|
|
"src/core/SkEdgeBuilder.cpp",
|
|
|
|
"src/core/SkEdgeClipper.cpp",
|
|
|
|
"src/core/SkGeometry.cpp",
|
2020-03-02 21:59:40 +00:00
|
|
|
"src/core/SkIDChangeListener.cpp",
|
2018-10-02 13:02:18 +00:00
|
|
|
"src/core/SkLineClipper.cpp",
|
2019-10-30 21:26:45 +00:00
|
|
|
"src/core/SkMalloc.cpp",
|
2018-10-02 13:02:18 +00:00
|
|
|
"src/core/SkMallocPixelRef.cpp",
|
|
|
|
"src/core/SkMath.cpp",
|
|
|
|
"src/core/SkMatrix.cpp",
|
|
|
|
"src/core/SkOpts.cpp",
|
|
|
|
"src/core/SkPaint.cpp",
|
2021-07-13 17:22:19 +00:00
|
|
|
"src/core/SkPaintPriv.cpp",
|
2018-10-02 13:02:18 +00:00
|
|
|
"src/core/SkPath.cpp",
|
2020-08-26 16:56:51 +00:00
|
|
|
"src/core/SkPathBuilder.cpp",
|
2018-10-02 13:02:18 +00:00
|
|
|
"src/core/SkPathEffect.cpp",
|
|
|
|
"src/core/SkPathMeasure.cpp",
|
|
|
|
"src/core/SkPathRef.cpp",
|
|
|
|
"src/core/SkPoint.cpp",
|
|
|
|
"src/core/SkRRect.cpp",
|
ignore SK_DISABLE_READBUFFER
Its effect is small and we want to rely on SkReadBuffer being available.
Size changes:
- canvaskit uncompressed: 6,864,481 --> 6,864,481 ( no change )
- canvaskit compressed: 2,667,117 --> 2,667,117 ( no change )
- pathkit uncompressed: 329,187 --> 330,679 (+ 1.5K, +0.5%)
- pathkit compressed: 134,158 --> 134,672 (+ 0.5K, +0.4%)
- flutter : 1,302,108 --> 1,322,568 (+20.0K, +1.6%)
The Flutter change is the biggest mystery, as bloaty only pegs
SkReadBuffer as 3.9K. The rest must come from other files including
SkReadBuffer.h not being able to see and inline away SkReadBuffer
routines? Feels like SK_DISABLE_EFFECT_DESERIALIZATION isn't trimming
enough?
PS 4-6 have an idea to push SK_DISABLE_EFFECT_DESERIALIZATION further.
Change-Id: Ifda3ccb82dd0636cfed6bb826fb185a7bca2cbe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295061
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-08 19:10:29 +00:00
|
|
|
"src/core/SkReadBuffer.cpp",
|
2018-10-02 13:02:18 +00:00
|
|
|
"src/core/SkRect.cpp",
|
|
|
|
"src/core/SkSemaphore.cpp",
|
|
|
|
"src/core/SkStream.cpp",
|
|
|
|
"src/core/SkString.cpp",
|
|
|
|
"src/core/SkStringUtils.cpp",
|
|
|
|
"src/core/SkStroke.cpp",
|
|
|
|
"src/core/SkStrokeRec.cpp",
|
|
|
|
"src/core/SkStrokerPriv.cpp",
|
|
|
|
"src/core/SkThreadID.cpp",
|
|
|
|
"src/core/SkUtils.cpp",
|
|
|
|
"src/effects/SkDashPathEffect.cpp",
|
|
|
|
"src/effects/SkTrimPathEffect.cpp",
|
|
|
|
"src/ports/SkDebug_stdio.cpp",
|
|
|
|
"src/ports/SkMemory_malloc.cpp",
|
|
|
|
"src/utils/SkDashPath.cpp",
|
|
|
|
"src/utils/SkParse.cpp",
|
|
|
|
"src/utils/SkParsePath.cpp",
|
|
|
|
"src/utils/SkUTF.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-02-22 15:04:06 +00:00
|
|
|
group("modules") {
|
|
|
|
deps = [
|
2019-03-05 19:09:24 +00:00
|
|
|
"modules/particles",
|
2019-02-22 15:04:06 +00:00
|
|
|
"modules/skottie",
|
2020-06-02 15:34:24 +00:00
|
|
|
"modules/skparagraph",
|
2019-02-22 15:04:06 +00:00
|
|
|
"modules/skshaper",
|
2021-03-18 17:48:52 +00:00
|
|
|
"modules/svg",
|
2019-02-22 15:04:06 +00:00
|
|
|
]
|
2022-02-14 20:08:12 +00:00
|
|
|
|
|
|
|
if (is_wasm) {
|
|
|
|
deps += [ "modules/canvaskit" ]
|
|
|
|
}
|
2019-02-22 15:04:06 +00:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:19:02 +00:00
|
|
|
group("experimental") {
|
|
|
|
deps = [ "experimental/sktext" ]
|
|
|
|
}
|
|
|
|
|
2020-07-07 20:01:26 +00:00
|
|
|
config("our_vulkan_headers") {
|
|
|
|
include_dirs = [ "include/third_party/vulkan" ]
|
|
|
|
}
|
|
|
|
|
2016-11-18 14:35:28 +00:00
|
|
|
# Targets guarded by skia_enable_tools may use //third_party freely.
|
|
|
|
if (skia_enable_tools) {
|
2019-04-23 17:05:21 +00:00
|
|
|
skia_public_includes = [
|
2020-04-24 17:00:48 +00:00
|
|
|
"client_utils/android",
|
2019-04-23 17:05:21 +00:00
|
|
|
"include/android",
|
|
|
|
"include/c",
|
|
|
|
"include/codec",
|
|
|
|
"include/config",
|
|
|
|
"include/core",
|
|
|
|
"include/docs",
|
|
|
|
"include/effects",
|
|
|
|
"include/encode",
|
|
|
|
"include/gpu",
|
|
|
|
"include/pathops",
|
|
|
|
"include/ports",
|
|
|
|
"include/svg",
|
|
|
|
"include/utils",
|
|
|
|
"include/utils/mac",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/particles/include",
|
|
|
|
"modules/skottie/include",
|
2020-07-15 15:28:57 +00:00
|
|
|
"modules/skparagraph/include",
|
2019-04-23 17:05:21 +00:00
|
|
|
"modules/skshaper/include",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/svg/include",
|
2019-04-23 17:05:21 +00:00
|
|
|
]
|
|
|
|
|
2016-12-06 21:03:52 +00:00
|
|
|
# Used by gn_to_bp.py to list our public include dirs.
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("public") {
|
|
|
|
configs = [ ":skia_public" ]
|
2019-04-23 17:05:21 +00:00
|
|
|
include_dirs = skia_public_includes
|
2016-12-06 21:03:52 +00:00
|
|
|
}
|
|
|
|
|
2016-11-18 14:35:28 +00:00
|
|
|
config("skia.h_config") {
|
|
|
|
include_dirs = [ "$target_gen_dir" ]
|
|
|
|
}
|
|
|
|
action("skia.h") {
|
|
|
|
public_configs = [ ":skia.h_config" ]
|
|
|
|
skia_h = "$target_gen_dir/skia.h"
|
|
|
|
script = "gn/find_headers.py"
|
2018-05-30 13:27:32 +00:00
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] +
|
|
|
|
[ rebase_path(skia_h, root_build_dir) ] +
|
|
|
|
rebase_path(skia_public_includes)
|
2016-11-18 14:35:28 +00:00
|
|
|
depfile = "$skia_h.deps"
|
2020-04-01 18:47:34 +00:00
|
|
|
outputs = [ skia_h ]
|
2016-11-18 14:35:28 +00:00
|
|
|
}
|
2016-07-26 20:55:45 +00:00
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
if (target_cpu == "x64") {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable("fiddle") {
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2016-11-18 14:35:28 +00:00
|
|
|
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",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/particles",
|
2018-05-30 13:27:32 +00:00
|
|
|
"modules/skottie",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/skparagraph",
|
2019-03-25 21:38:43 +00:00
|
|
|
"modules/skshaper",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/svg",
|
2016-11-18 14:35:28 +00:00
|
|
|
]
|
|
|
|
}
|
2016-09-15 19:07:48 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2022-01-27 02:36:51 +00:00
|
|
|
config("cpp17") {
|
2020-06-11 18:53:53 +00:00
|
|
|
if (is_win) {
|
2022-01-27 02:36:51 +00:00
|
|
|
cflags_cc = [ "/std:c++17" ]
|
2020-06-11 18:53:53 +00:00
|
|
|
} else {
|
2022-01-27 02:36:51 +00:00
|
|
|
cflags_cc = [ "-std=c++17" ]
|
2020-06-11 18:53:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set("public_headers_warnings_check") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/public_headers_warnings_check.cpp" ]
|
2021-03-16 18:29:20 +00:00
|
|
|
configs = [
|
2020-06-11 18:53:53 +00:00
|
|
|
":our_vulkan_headers",
|
2022-01-27 02:36:51 +00:00
|
|
|
":cpp17",
|
2020-06-11 18:53:53 +00:00
|
|
|
]
|
2021-03-16 18:29:20 +00:00
|
|
|
if (defined(skia_header_target_default_configs)) {
|
|
|
|
configs += skia_header_target_default_configs
|
|
|
|
}
|
2018-05-31 17:17:12 +00:00
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":skia.h",
|
|
|
|
"modules/skottie",
|
2019-03-25 21:38:43 +00:00
|
|
|
"modules/skshaper",
|
2018-05-31 17:17:12 +00:00
|
|
|
]
|
2019-07-10 19:51:30 +00:00
|
|
|
|
|
|
|
if (skia_use_dawn) {
|
2020-04-13 22:26:17 +00:00
|
|
|
deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
|
2019-07-10 19:51:30 +00:00
|
|
|
}
|
2016-11-16 17:13:44 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
template("test_lib") {
|
|
|
|
config(target_name + "_config") {
|
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
|
|
|
}
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_source_set(target_name) {
|
2019-04-23 17:05:21 +00:00
|
|
|
forward_variables_from(invoker, "*", [])
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2016-08-24 19:23:52 +00:00
|
|
|
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) {
|
2019-09-16 16:53:17 +00:00
|
|
|
ios_app_bundle(target_name) {
|
2017-11-28 14:45:26 +00:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
"*",
|
|
|
|
[
|
|
|
|
"output_name",
|
|
|
|
"visibility",
|
|
|
|
"is_shared_library",
|
|
|
|
])
|
2017-01-05 15:54:57 +00:00
|
|
|
testonly = true
|
2019-09-16 16:53:17 +00:00
|
|
|
extra_configs = [ ":skia_private" ]
|
|
|
|
launchscreen = "platform_tools/ios/app/LaunchScreen.storyboard"
|
|
|
|
data_sources = [ "resources" ]
|
|
|
|
if ("True" == exec_script("//gn/checkdir.py",
|
|
|
|
[ rebase_path("skps", root_build_dir) ],
|
|
|
|
"trim string")) {
|
|
|
|
data_sources += [ "skps" ]
|
2017-11-28 14:45:26 +00:00
|
|
|
}
|
2021-04-29 18:10:23 +00:00
|
|
|
if ("True" == exec_script("//gn/checkdir.py",
|
|
|
|
[ rebase_path("mskps", root_build_dir) ],
|
|
|
|
"trim string")) {
|
|
|
|
data_sources += [ "mskps" ]
|
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
# !is_ios
|
|
|
|
|
|
|
|
if (defined(invoker.is_shared_library) && invoker.is_shared_library) {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_shared_library("lib" + target_name) {
|
|
|
|
output_dir = root_build_dir
|
2017-11-28 14:45:26 +00:00
|
|
|
forward_variables_from(invoker, "*", [ "is_shared_library" ])
|
2021-03-16 18:29:20 +00:00
|
|
|
if (!defined(configs)) {
|
|
|
|
configs = []
|
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
configs += [ ":skia_private" ]
|
|
|
|
testonly = true
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
_executable = target_name
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable(_executable) {
|
2019-02-26 16:54:25 +00:00
|
|
|
check_includes = false
|
2021-03-16 18:29:20 +00:00
|
|
|
output_dir = root_build_dir
|
2017-11-28 14:45:26 +00:00
|
|
|
forward_variables_from(invoker, "*", [ "is_shared_library" ])
|
2021-03-16 18:29:20 +00:00
|
|
|
if (!defined(configs)) {
|
|
|
|
configs = []
|
|
|
|
}
|
2017-11-28 14:45:26 +00:00
|
|
|
configs += [ ":skia_private" ]
|
|
|
|
testonly = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (is_android && skia_android_serial != "" && defined(_executable)) {
|
|
|
|
action("push_" + target_name) {
|
2021-03-16 18:29:20 +00:00
|
|
|
output_dir = root_build_dir
|
2017-11-28 14:45:26 +00:00
|
|
|
script = "gn/push_to_android.py"
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":" + _executable ]
|
2017-11-28 14:45:26 +00:00
|
|
|
_stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial"
|
2020-04-01 18:47:34 +00:00
|
|
|
outputs = [ _stamp ]
|
2017-11-28 14:45:26 +00:00
|
|
|
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") {
|
2018-05-31 17:17:12 +00:00
|
|
|
public_defines = []
|
2016-09-23 20:18:41 +00:00
|
|
|
|
2019-04-29 14:46:36 +00:00
|
|
|
# Bots and even devs may not have Vulkan headers, so put
|
|
|
|
# include/third_party/vulkan on our path so they're always available.
|
|
|
|
all_dependent_configs = [ ":our_vulkan_headers" ]
|
|
|
|
|
2019-04-24 13:48:11 +00:00
|
|
|
defines = []
|
|
|
|
if (skia_enable_discrete_gpu) {
|
|
|
|
defines += [ "SK_ENABLE_DISCRETE_GPU" ]
|
|
|
|
}
|
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
deps = []
|
2018-08-01 13:23:57 +00:00
|
|
|
public_deps = []
|
2018-05-31 17:17:12 +00:00
|
|
|
sources = [
|
2020-10-06 14:07:38 +00:00
|
|
|
"tools/gpu/BackendSurfaceFactory.cpp",
|
|
|
|
"tools/gpu/BackendSurfaceFactory.h",
|
2020-06-26 17:32:09 +00:00
|
|
|
"tools/gpu/BackendTextureImageFactory.cpp",
|
|
|
|
"tools/gpu/BackendTextureImageFactory.h",
|
2020-07-01 20:09:43 +00:00
|
|
|
"tools/gpu/FlushFinishTracker.cpp",
|
|
|
|
"tools/gpu/FlushFinishTracker.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/gpu/GrContextFactory.cpp",
|
|
|
|
"tools/gpu/GrTest.cpp",
|
2020-10-08 20:00:14 +00:00
|
|
|
"tools/gpu/ManagedBackendTexture.cpp",
|
|
|
|
"tools/gpu/ManagedBackendTexture.h",
|
2018-07-11 19:32:05 +00:00
|
|
|
"tools/gpu/MemoryCache.cpp",
|
|
|
|
"tools/gpu/MemoryCache.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/gpu/ProxyUtils.cpp",
|
|
|
|
"tools/gpu/TestContext.cpp",
|
2019-11-22 21:56:36 +00:00
|
|
|
"tools/gpu/TestOps.cpp",
|
|
|
|
"tools/gpu/TestOps.h",
|
2019-03-21 17:08:36 +00:00
|
|
|
"tools/gpu/YUVUtils.cpp",
|
|
|
|
"tools/gpu/YUVUtils.h",
|
2020-04-01 18:47:34 +00:00
|
|
|
"tools/gpu/gl/GLTestContext.cpp", # See comment below about
|
|
|
|
# GrContextFactory workaround.
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/gpu/mock/MockTestContext.cpp",
|
|
|
|
]
|
2020-03-19 19:54:28 +00:00
|
|
|
|
|
|
|
libs = []
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = []
|
2020-03-19 19:54:28 +00:00
|
|
|
|
2019-09-25 21:14:35 +00:00
|
|
|
if (skia_use_gl) {
|
2020-06-03 16:14:55 +00:00
|
|
|
sources +=
|
|
|
|
[ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_ios) {
|
|
|
|
sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [ "OpenGLES.framework" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
} else if (is_mac) {
|
|
|
|
sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
|
|
|
|
}
|
|
|
|
if (skia_use_angle) {
|
|
|
|
deps += [ "//third_party/angle2" ]
|
|
|
|
sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
|
2018-12-10 15:27:26 +00:00
|
|
|
}
|
2020-03-19 12:47:44 +00:00
|
|
|
}
|
|
|
|
|
2022-02-03 15:54:07 +00:00
|
|
|
if (skia_use_gl && target_cpu != "wasm") {
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_android || skia_use_egl) {
|
|
|
|
sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
|
|
|
|
libs += [ "EGL" ]
|
|
|
|
} else if (is_linux) {
|
|
|
|
sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
|
|
|
|
libs += [
|
|
|
|
"GLU",
|
|
|
|
"GL",
|
|
|
|
"X11",
|
|
|
|
]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
|
|
|
|
libs += [ "Gdi32.lib" ]
|
|
|
|
if (target_cpu != "arm64") {
|
|
|
|
libs += [ "OpenGL32.lib" ]
|
|
|
|
}
|
|
|
|
}
|
2018-05-31 17:17:12 +00:00
|
|
|
}
|
2018-12-11 22:03:39 +00:00
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
if (skia_use_vulkan) {
|
2020-06-10 15:04:51 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkTestContext.h" ]
|
2018-05-31 17:17:12 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
|
2020-06-11 12:51:50 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkTestHelper.h" ]
|
|
|
|
sources += [ "tools/gpu/vk/VkTestHelper.cpp" ]
|
2020-06-10 15:04:51 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkTestUtils.h" ]
|
2018-05-31 17:17:12 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
|
2020-06-10 15:04:51 +00:00
|
|
|
sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.h" ]
|
|
|
|
sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.cpp" ]
|
2018-05-31 17:17:12 +00:00
|
|
|
}
|
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
|
2016-09-20 20:36:47 +00:00
|
|
|
}
|
2020-02-18 19:34:38 +00:00
|
|
|
if (skia_use_direct3d) {
|
|
|
|
sources += [ "tools/gpu/d3d/D3DTestContext.cpp" ]
|
2020-02-24 16:36:15 +00:00
|
|
|
sources += [ "tools/gpu/d3d/D3DTestUtils.cpp" ]
|
2020-02-18 19:34:38 +00:00
|
|
|
}
|
2019-07-18 15:43:45 +00:00
|
|
|
if (skia_use_dawn) {
|
2020-04-13 22:26:17 +00:00
|
|
|
public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
|
2019-07-18 15:43:45 +00:00
|
|
|
sources += [ "tools/gpu/dawn/DawnTestContext.cpp" ]
|
2020-06-01 19:45:56 +00:00
|
|
|
if (is_clang) {
|
|
|
|
cflags_cc = [ "-Wno-microsoft-cast" ]
|
|
|
|
}
|
2019-07-18 15:43:45 +00:00
|
|
|
}
|
2021-07-06 17:43:56 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
|
|
|
sources -= [ "tools/gpu/GrTest.cpp" ]
|
|
|
|
sources -= [ "tools/gpu/TestOps.cpp" ]
|
|
|
|
sources -= [ "tools/gpu/TestOps.h" ]
|
|
|
|
}
|
2021-09-29 18:29:32 +00:00
|
|
|
if (skia_enable_graphite) {
|
2021-09-30 15:41:16 +00:00
|
|
|
sources += [ "tools/graphite/ContextFactory.h" ]
|
|
|
|
sources += [ "tools/graphite/ContextFactory.cpp" ]
|
2021-09-29 18:29:32 +00:00
|
|
|
sources += [ "tools/graphite/GraphiteTestContext.h" ]
|
|
|
|
sources += [ "tools/graphite/GraphiteTestContext.cpp" ]
|
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += [ "tools/graphite/mtl/GraphiteMtlTestContext.h" ]
|
|
|
|
sources += [ "tools/graphite/mtl/MtlTestContext.mm" ]
|
|
|
|
}
|
|
|
|
}
|
2020-03-19 19:54:28 +00:00
|
|
|
|
|
|
|
if (is_fuchsia && using_fuchsia_sdk) {
|
|
|
|
libs +=
|
|
|
|
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
|
|
|
|
}
|
2019-09-25 21:14:35 +00:00
|
|
|
} # test_lib("gpu_tool_utils")
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("flags") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/flags/CommandLineFlags.cpp" ]
|
2016-09-16 17:23:12 +00:00
|
|
|
}
|
2019-03-25 15:54:59 +00:00
|
|
|
|
|
|
|
test_lib("common_flags_config") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/flags/CommonFlagsConfig.cpp" ]
|
|
|
|
deps = [ ":flags" ]
|
|
|
|
public_deps = [ ":gpu_tool_utils" ]
|
2016-07-27 20:55:26 +00:00
|
|
|
}
|
2019-03-25 15:54:59 +00:00
|
|
|
test_lib("common_flags_gpu") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/flags/CommonFlagsGpu.cpp" ]
|
|
|
|
deps = [ ":flags" ]
|
|
|
|
public_deps = [ ":gpu_tool_utils" ]
|
2019-03-25 15:54:59 +00:00
|
|
|
}
|
|
|
|
test_lib("common_flags_images") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/flags/CommonFlagsImages.cpp" ]
|
|
|
|
deps = [ ":flags" ]
|
2019-03-25 15:54:59 +00:00
|
|
|
}
|
2021-10-14 12:24:22 +00:00
|
|
|
test_lib("common_flags_fontmgr") {
|
|
|
|
sources = [ "tools/flags/CommonFlagsFontMgr.cpp" ]
|
|
|
|
deps = [ ":flags" ]
|
|
|
|
}
|
2019-03-25 15:54:59 +00:00
|
|
|
test_lib("common_flags_aa") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/flags/CommonFlagsAA.cpp" ]
|
|
|
|
deps = [ ":flags" ]
|
2019-03-25 15:54:59 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2019-03-25 18:00:12 +00:00
|
|
|
test_lib("trace") {
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":flags" ]
|
2019-03-25 18:00:12 +00:00
|
|
|
sources = [
|
|
|
|
"tools/trace/ChromeTracingTracer.cpp",
|
|
|
|
"tools/trace/ChromeTracingTracer.h",
|
|
|
|
"tools/trace/EventTracingPriv.cpp",
|
|
|
|
"tools/trace/EventTracingPriv.h",
|
|
|
|
"tools/trace/SkDebugfTracer.cpp",
|
|
|
|
"tools/trace/SkDebugfTracer.h",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("tool_utils") {
|
|
|
|
sources = [
|
2016-09-09 18:07:45 +00:00
|
|
|
"tools/AndroidSkDebugToStdOut.cpp",
|
2019-05-31 14:49:12 +00:00
|
|
|
"tools/AutoreleasePool.h",
|
2018-05-29 20:13:26 +00:00
|
|
|
"tools/DDLPromiseImageHelper.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/DDLPromiseImageHelper.h",
|
2018-05-29 20:13:26 +00:00
|
|
|
"tools/DDLTileHelper.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/DDLTileHelper.h",
|
2016-09-01 14:06:54 +00:00
|
|
|
"tools/LsanSuppressions.cpp",
|
2021-04-29 18:10:23 +00:00
|
|
|
"tools/MSKPPlayer.cpp",
|
|
|
|
"tools/MSKPPlayer.h",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/ProcStats.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/ProcStats.h",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/Resources.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/Resources.h",
|
2021-07-14 18:04:49 +00:00
|
|
|
"tools/RuntimeBlendUtils.cpp",
|
|
|
|
"tools/RuntimeBlendUtils.h",
|
2019-07-15 18:01:37 +00:00
|
|
|
"tools/SkMetaData.cpp",
|
|
|
|
"tools/SkMetaData.h",
|
2019-06-21 15:09:19 +00:00
|
|
|
"tools/SkSharingProc.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/SkSharingProc.h",
|
|
|
|
"tools/Stats.h",
|
2019-03-20 16:12:10 +00:00
|
|
|
"tools/ToolUtils.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/ToolUtils.h",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/UrlDataManager.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/UrlDataManager.h",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/debugger/DebugCanvas.h",
|
2019-12-12 16:05:10 +00:00
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/debugger/DebugLayerManager.h",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/DrawCommand.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/debugger/DrawCommand.h",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/debugger/JsonWriteBuffer.h",
|
2019-03-20 16:08:46 +00:00
|
|
|
"tools/fonts/RandomScalerContext.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/fonts/RandomScalerContext.h",
|
2019-03-20 16:08:46 +00:00
|
|
|
"tools/fonts/TestEmptyTypeface.h",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.h",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.h",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.h",
|
2019-03-20 16:12:10 +00:00
|
|
|
"tools/fonts/ToolUtilsFont.cpp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/random_parse_path.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/random_parse_path.h",
|
2019-07-11 20:32:53 +00:00
|
|
|
"tools/timer/TimeUtils.h",
|
2016-08-24 19:23:52 +00:00
|
|
|
"tools/timer/Timer.cpp",
|
2020-07-13 22:06:53 +00:00
|
|
|
"tools/timer/Timer.h",
|
2016-08-24 19:23:52 +00:00
|
|
|
]
|
2020-03-25 16:50:35 +00:00
|
|
|
if (target_cpu != "wasm") {
|
|
|
|
sources += [ "tools/CrashHandler.cpp" ]
|
|
|
|
}
|
2017-02-06 14:26:14 +00:00
|
|
|
libs = []
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = []
|
2017-02-06 14:26:14 +00:00
|
|
|
if (is_ios) {
|
|
|
|
sources += [ "tools/ios_utils.m" ]
|
2019-05-31 14:49:12 +00:00
|
|
|
sources += [ "tools/ios_utils.h" ]
|
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += [ "tools/AutoreleasePool.mm" ]
|
|
|
|
}
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [ "Foundation.framework" ]
|
2019-05-31 14:49:12 +00:00
|
|
|
} else if (is_mac) {
|
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += [ "tools/AutoreleasePool.mm" ]
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [ "Foundation.framework" ]
|
2019-05-31 14:49:12 +00:00
|
|
|
}
|
2021-02-09 14:22:41 +00:00
|
|
|
} else if (is_win && !skia_enable_winuwp) {
|
2019-04-15 16:32:16 +00:00
|
|
|
libs += [ "DbgHelp.lib" ]
|
2017-02-06 14:26:14 +00:00
|
|
|
}
|
2019-04-15 16:32:16 +00:00
|
|
|
|
2018-04-24 15:47:23 +00:00
|
|
|
defines = []
|
|
|
|
if (skia_tools_require_resources) {
|
|
|
|
defines += [ "SK_TOOLS_REQUIRE_RESOURCES" ]
|
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2019-03-26 14:05:52 +00:00
|
|
|
]
|
2020-04-01 18:47:34 +00:00
|
|
|
public_deps = [ ":gpu_tool_utils" ]
|
2016-08-24 19:23:52 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2019-04-24 17:46:06 +00:00
|
|
|
test_lib("etc1") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "third_party/etc1/etc1.cpp" ]
|
2019-04-24 17:46:06 +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") {
|
|
|
|
sources = gm_sources
|
2019-09-25 21:14:35 +00:00
|
|
|
if (skia_use_gl) {
|
|
|
|
sources += gl_gm_sources
|
|
|
|
}
|
2021-07-01 16:12:52 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
|
|
|
sources -= skgpu_v1_gm_sources
|
2021-06-16 16:05:54 +00:00
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
deps = [
|
2019-04-24 17:46:06 +00:00
|
|
|
":etc1",
|
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
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
2021-01-29 21:35:45 +00:00
|
|
|
"modules/particles",
|
2018-05-31 18:22:30 +00:00
|
|
|
"modules/skottie",
|
2018-09-20 18:35:30 +00:00
|
|
|
"modules/skottie:gm",
|
2020-06-02 15:34:24 +00:00
|
|
|
"modules/skparagraph",
|
|
|
|
"modules/skparagraph:gm",
|
2019-04-10 18:08:44 +00:00
|
|
|
"modules/skshaper",
|
2016-08-24 19:23:52 +00:00
|
|
|
]
|
2019-08-09 14:11:35 +00:00
|
|
|
if (is_skia_dev_build) {
|
|
|
|
sources += [ "gm/fiddle.cpp" ]
|
|
|
|
deps += [ ":skia.h" ]
|
|
|
|
}
|
2020-04-01 18:47:34 +00:00
|
|
|
public_deps = [ ":gpu_tool_utils" ]
|
2019-05-17 20:50:51 +00:00
|
|
|
|
|
|
|
if (skia_use_ffmpeg) {
|
2020-04-24 15:10:27 +00:00
|
|
|
deps += [ "experimental/ffmpeg:video_decoder" ]
|
2019-05-17 20:50:51 +00:00
|
|
|
sources += [ "gm/video_decoder.cpp" ]
|
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
|
2021-02-18 03:14:34 +00:00
|
|
|
test_lib("test") {
|
|
|
|
sources = [
|
|
|
|
"tests/Test.cpp",
|
|
|
|
"tests/Test.h",
|
2022-03-09 22:18:18 +00:00
|
|
|
"tests/TestHarness.cpp",
|
|
|
|
"tests/TestHarness.h",
|
2021-02-18 03:14:34 +00:00
|
|
|
"tests/TestUtils.cpp",
|
|
|
|
"tests/TestUtils.h",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
public_deps = [
|
|
|
|
":gpu_tool_utils", # Test.h #includes headers from this target.
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-10-27 16:21:40 +00:00
|
|
|
import("gn/tests.gni")
|
2016-08-24 19:23:52 +00:00
|
|
|
test_lib("tests") {
|
2016-10-27 16:21:40 +00:00
|
|
|
sources = tests_sources + pathops_tests_sources
|
2020-09-01 22:10:14 +00:00
|
|
|
frameworks = []
|
2019-05-16 16:43:11 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += metal_tests_sources
|
2020-08-24 17:16:46 +00:00
|
|
|
cflags_objcc = [ "-fobjc-arc" ]
|
2020-09-01 22:10:14 +00:00
|
|
|
frameworks += [ "MetalKit.framework" ]
|
2019-05-16 16:43:11 +00:00
|
|
|
}
|
2019-09-25 21:14:35 +00:00
|
|
|
if (skia_use_gl) {
|
|
|
|
sources += gl_tests_sources
|
|
|
|
}
|
2021-10-11 15:28:21 +00:00
|
|
|
if (skia_enable_graphite) {
|
|
|
|
sources += graphite_tests_sources
|
2021-11-30 17:02:30 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += graphite_metal_tests_sources
|
|
|
|
}
|
2021-10-11 15:28:21 +00:00
|
|
|
}
|
2021-07-01 16:12:52 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
|
|
|
sources -= skgpu_v1_tests_sources
|
2021-06-14 19:27:19 +00:00
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
2021-02-18 03:18:34 +00:00
|
|
|
":fontmgr_android_tests",
|
|
|
|
":fontmgr_fontconfig_tests",
|
2021-02-22 15:37:33 +00:00
|
|
|
":fontmgr_mac_ct_tests",
|
2016-08-24 19:23:52 +00:00
|
|
|
":skia",
|
2021-02-18 03:14:34 +00:00
|
|
|
":test",
|
2016-08-24 19:23:52 +00:00
|
|
|
":tool_utils",
|
2021-09-17 19:19:02 +00:00
|
|
|
"experimental/sktext:tests",
|
2018-06-18 17:10:51 +00:00
|
|
|
"modules/skottie:tests",
|
2019-05-30 20:12:56 +00:00
|
|
|
"modules/skparagraph:tests",
|
2018-06-01 19:20:00 +00:00
|
|
|
"modules/sksg:tests",
|
2019-04-10 18:08:44 +00:00
|
|
|
"modules/skshaper",
|
2020-12-17 21:36:54 +00:00
|
|
|
"modules/svg:tests",
|
2016-08-24 19:23:52 +00:00
|
|
|
"//third_party/libpng",
|
2019-02-22 17:32:16 +00:00
|
|
|
"//third_party/libwebp",
|
2016-08-24 19:23:52 +00:00
|
|
|
"//third_party/zlib",
|
|
|
|
]
|
|
|
|
}
|
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") {
|
|
|
|
sources = bench_sources
|
2021-10-19 19:04:41 +00:00
|
|
|
if (skia_enable_graphite) {
|
|
|
|
sources += graphite_bench_sources
|
|
|
|
}
|
2021-07-22 19:11:03 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
|
|
|
sources -= skgpu_v1_bench_sources
|
|
|
|
}
|
2016-08-24 19:23:52 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
2019-05-30 20:12:56 +00:00
|
|
|
"modules/skparagraph:bench",
|
2019-06-12 14:20:44 +00:00
|
|
|
"modules/skshaper",
|
2016-08-24 19:23:52 +00:00
|
|
|
]
|
|
|
|
}
|
2016-07-28 21:17:33 +00:00
|
|
|
|
2018-09-02 16:33:59 +00:00
|
|
|
if (is_linux || is_mac) {
|
2021-06-09 17:26:27 +00:00
|
|
|
if (skia_enable_skottie) {
|
|
|
|
test_app("skottie_tool") {
|
|
|
|
deps = [ "modules/skottie:tool" ]
|
|
|
|
}
|
2018-06-05 20:16:57 +00:00
|
|
|
}
|
2020-10-15 22:10:29 +00:00
|
|
|
test_app("svg_tool") {
|
|
|
|
deps = [ "modules/svg:tool" ]
|
|
|
|
}
|
2018-06-05 20:16:57 +00:00
|
|
|
}
|
|
|
|
|
2020-03-25 16:50:35 +00:00
|
|
|
import("gn/samples.gni")
|
|
|
|
test_lib("samples") {
|
|
|
|
sources = samples_sources
|
2021-07-01 16:12:52 +00:00
|
|
|
if (!skia_enable_skgpu_v1) {
|
|
|
|
sources -= skgpu_v1_samples_sources
|
2021-06-16 16:05:54 +00:00
|
|
|
}
|
2020-04-01 18:47:34 +00:00
|
|
|
public_deps = [ ":tool_utils" ]
|
2020-03-25 16:50:35 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":xml",
|
2021-09-17 19:19:02 +00:00
|
|
|
"experimental/sktext:samples",
|
2020-09-10 19:16:35 +00:00
|
|
|
"modules/audioplayer",
|
2020-03-25 16:50:35 +00:00
|
|
|
"modules/skparagraph:samples",
|
|
|
|
"modules/skshaper",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-10-22 19:40:49 +00:00
|
|
|
"//third_party/imgui",
|
2020-03-25 16:50:35 +00:00
|
|
|
]
|
|
|
|
}
|
2020-10-08 14:05:07 +00:00
|
|
|
test_lib("hash_and_encode") {
|
|
|
|
sources = [
|
|
|
|
"tools/HashAndEncode.cpp",
|
|
|
|
"tools/HashAndEncode.h",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
2020-03-25 16:50:35 +00:00
|
|
|
if (target_cpu != "wasm") {
|
2020-05-28 03:29:13 +00:00
|
|
|
test_app("convert-to-nia") {
|
|
|
|
sources = [ "tools/convert-to-nia.cpp" ]
|
|
|
|
deps = [ ":skia" ]
|
|
|
|
}
|
2018-07-27 13:54:43 +00:00
|
|
|
test_app("imgcvt") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/imgcvt.cpp" ]
|
2018-07-27 13:54:43 +00:00
|
|
|
deps = [
|
|
|
|
":skcms",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.
FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.
FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:
out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
ls *.skp | xargs ... out/fm ... -s
...
TODO later:
vector backends: --backend pdf, svg, xps, skp
--source *.svg, *.json (Skottie)
Create/update a dm.json file
Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:57:58 +00:00
|
|
|
test_app("fm") {
|
|
|
|
sources = [
|
2019-11-21 22:18:47 +00:00
|
|
|
"dm/DMGpuTestProcs.cpp", # blech
|
FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.
FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.
FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:
out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
ls *.skp | xargs ... out/fm ... -s
...
TODO later:
vector backends: --backend pdf, svg, xps, skp
--source *.svg, *.json (Skottie)
Create/update a dm.json file
Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:57:58 +00:00
|
|
|
"tools/fm/fm.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":common_flags_aa",
|
2021-10-14 12:24:22 +00:00
|
|
|
":common_flags_fontmgr",
|
FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.
FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.
FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:
out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
ls *.skp | xargs ... out/fm ... -s
...
TODO later:
vector backends: --backend pdf, svg, xps, skp
--source *.svg, *.json (Skottie)
Create/update a dm.json file
Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:57:58 +00:00
|
|
|
":common_flags_gpu",
|
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":hash_and_encode",
|
|
|
|
":skia",
|
2019-11-21 22:18:47 +00:00
|
|
|
":tests",
|
FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.
FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.
FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:
out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
ls *.skp | xargs ... out/fm ... -s
...
TODO later:
vector backends: --backend pdf, svg, xps, skp
--source *.svg, *.json (Skottie)
Create/update a dm.json file
Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:57:58 +00:00
|
|
|
":tool_utils",
|
|
|
|
":trace",
|
2019-04-02 18:14:56 +00:00
|
|
|
"modules/skottie",
|
|
|
|
"modules/skottie:utils",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.
FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.
FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:
out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
ls *.skp | xargs ... out/fm ... -s
...
TODO later:
vector backends: --backend pdf, svg, xps, skp
--source *.svg, *.json (Skottie)
Create/update a dm.json file
Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:57:58 +00:00
|
|
|
]
|
|
|
|
}
|
2017-09-21 17:45:16 +00:00
|
|
|
test_app("dm") {
|
|
|
|
sources = [
|
|
|
|
"dm/DM.cpp",
|
2017-10-09 20:13:02 +00:00
|
|
|
"dm/DMGpuTestProcs.cpp",
|
2017-09-21 17:45:16 +00:00
|
|
|
"dm/DMJsonWriter.cpp",
|
2021-07-20 16:53:54 +00:00
|
|
|
"dm/DMJsonWriter.h",
|
2017-09-21 17:45:16 +00:00
|
|
|
"dm/DMSrcSink.cpp",
|
2021-07-20 16:53:54 +00:00
|
|
|
"dm/DMSrcSink.h",
|
2017-09-21 17:45:16 +00:00
|
|
|
]
|
|
|
|
deps = [
|
2019-03-25 15:54:59 +00:00
|
|
|
":common_flags_aa",
|
|
|
|
":common_flags_config",
|
2021-10-14 12:24:22 +00:00
|
|
|
":common_flags_fontmgr",
|
2019-03-25 15:54:59 +00:00
|
|
|
":common_flags_gpu",
|
|
|
|
":common_flags_images",
|
2017-09-21 17:45:16 +00:00
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.
FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.
FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:
out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
ls *.skp | xargs ... out/fm ... -s
...
TODO later:
vector backends: --backend pdf, svg, xps, skp
--source *.svg, *.json (Skottie)
Create/update a dm.json file
Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:57:58 +00:00
|
|
|
":hash_and_encode",
|
2017-09-21 17:45:16 +00:00
|
|
|
":skia",
|
|
|
|
":tests",
|
|
|
|
":tool_utils",
|
2019-03-25 18:00:12 +00:00
|
|
|
":trace",
|
2018-05-26 13:49:28 +00:00
|
|
|
"modules/skottie",
|
2018-11-09 21:19:44 +00:00
|
|
|
"modules/skottie:utils",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2016-11-11 16:39:44 +00:00
|
|
|
]
|
|
|
|
}
|
2021-07-01 17:27:16 +00:00
|
|
|
test_app("sorttoy") {
|
2021-05-20 13:45:10 +00:00
|
|
|
sources = [
|
2021-07-01 17:27:16 +00:00
|
|
|
"experimental/sorttoy/Cmds.cpp",
|
|
|
|
"experimental/sorttoy/Cmds.h",
|
|
|
|
"experimental/sorttoy/Fake.cpp",
|
|
|
|
"experimental/sorttoy/Fake.h",
|
|
|
|
"experimental/sorttoy/SortKey.h",
|
|
|
|
"experimental/sorttoy/sorttoy.cpp",
|
|
|
|
"experimental/sorttoy/sorttypes.h",
|
2021-05-20 13:45:10 +00:00
|
|
|
]
|
2021-02-22 22:24:22 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
2020-12-04 17:58:35 +00:00
|
|
|
|
|
|
|
# optional separate library to dlopen when running CanvasStateTests.
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_shared_library("canvas_state_lib") {
|
2020-12-04 17:58:35 +00:00
|
|
|
sources = [
|
|
|
|
"tests/CanvasStateHelpers.cpp",
|
|
|
|
"tests/CanvasStateHelpers.h",
|
|
|
|
]
|
|
|
|
deps = [ ":skia" ]
|
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
|
|
|
|
2018-01-09 17:34:11 +00:00
|
|
|
if (!is_win) {
|
|
|
|
test_app("remote_demo") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/remote_demo.cpp" ]
|
|
|
|
deps = [ ":skia" ]
|
2018-01-09 17:34:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-23 16:52:33 +00:00
|
|
|
if (!is_win) {
|
|
|
|
test_app("blob_cache_sim") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/blob_cache_sim.cpp" ]
|
|
|
|
deps = [ ":skia" ]
|
2019-10-23 16:52:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("nanobench") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "bench/nanobench.cpp" ]
|
2016-07-28 21:17:33 +00:00
|
|
|
deps = [
|
|
|
|
":bench",
|
2019-03-25 15:54:59 +00:00
|
|
|
":common_flags_aa",
|
|
|
|
":common_flags_config",
|
|
|
|
":common_flags_gpu",
|
|
|
|
":common_flags_images",
|
2016-07-28 21:17:33 +00:00
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
2019-03-25 18:00:12 +00:00
|
|
|
":trace",
|
2020-06-02 15:34:24 +00:00
|
|
|
"modules/skparagraph",
|
2019-05-30 20:12:56 +00:00
|
|
|
"modules/skshaper",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2016-07-28 21:17:33 +00:00
|
|
|
]
|
|
|
|
}
|
2016-08-03 22:08:04 +00:00
|
|
|
|
2017-01-31 14:49:18 +00:00
|
|
|
test_app("skpinfo") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/skpinfo.cpp" ]
|
2021-06-18 14:47:54 +00:00
|
|
|
configs = [ ":our_vulkan_headers" ]
|
2017-01-31 14:49:18 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-05-28 20:11:03 +00:00
|
|
|
if (skia_use_ffmpeg) {
|
|
|
|
test_app("skottie2movie") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/skottie2movie.cpp" ]
|
2019-05-28 20:11:03 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
2019-09-24 16:01:58 +00:00
|
|
|
":gpu_tool_utils",
|
2019-05-28 20:11:03 +00:00
|
|
|
":skia",
|
2020-04-24 16:14:03 +00:00
|
|
|
"experimental/ffmpeg:video_encoder",
|
2019-05-28 20:11:03 +00:00
|
|
|
"modules/skottie",
|
2019-05-30 14:10:50 +00:00
|
|
|
"modules/skottie:utils",
|
2019-05-28 20:11:03 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
test_app("skpbench") {
|
2021-10-13 20:02:56 +00:00
|
|
|
sources = [
|
|
|
|
"bench/BigPath.cpp",
|
|
|
|
"tools/skpbench/skpbench.cpp",
|
|
|
|
]
|
2018-05-31 17:17:12 +00:00
|
|
|
deps = [
|
2019-03-25 15:54:59 +00:00
|
|
|
":common_flags_config",
|
|
|
|
":common_flags_gpu",
|
2018-05-31 17:17:12 +00:00
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
2016-09-19 18:03:58 +00:00
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("sktexttopdf") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/using_skia_and_harfbuzz.cpp" ]
|
2016-09-10 14:01:53 +00:00
|
|
|
deps = [
|
|
|
|
":skia",
|
2018-05-29 19:53:40 +00:00
|
|
|
"modules/skshaper",
|
2016-09-10 14:01:53 +00:00
|
|
|
]
|
|
|
|
}
|
2016-09-16 17:23:12 +00:00
|
|
|
|
2017-07-17 19:32:25 +00:00
|
|
|
test_app("create_test_font") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/fonts/create_test_font.cpp" ]
|
|
|
|
deps = [ ":skia" ]
|
2017-07-17 19:32:25 +00:00
|
|
|
assert_no_deps = [
|
|
|
|
# tool_utils requires the output of this app.
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-07-31 20:38:43 +00:00
|
|
|
if (skia_use_expat) {
|
|
|
|
test_app("create_test_font_color") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/fonts/create_test_font_color.cpp" ]
|
2018-07-31 20:38:43 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
2018-02-15 15:20:04 +00:00
|
|
|
}
|
|
|
|
|
2017-01-05 15:54:57 +00:00
|
|
|
test_app("get_images_from_skps") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/get_images_from_skps.cpp" ]
|
2016-09-16 17:23:12 +00:00
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
2016-09-22 18:51:24 +00:00
|
|
|
|
2018-12-10 16:56:01 +00:00
|
|
|
if (!is_ios && target_cpu != "wasm" && !(is_win && target_cpu == "arm64")) {
|
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/libmicrohttpd",
|
|
|
|
]
|
|
|
|
}
|
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") {
|
2016-10-03 18:49:45 +00:00
|
|
|
sources = [
|
2018-09-17 18:46:57 +00:00
|
|
|
"fuzz/Fuzz.cpp",
|
2020-07-31 16:33:31 +00:00
|
|
|
"fuzz/Fuzz.h",
|
2017-02-14 18:35:14 +00:00
|
|
|
"fuzz/FuzzCanvas.cpp",
|
2018-03-09 19:02:46 +00:00
|
|
|
"fuzz/FuzzCommon.cpp",
|
2020-07-31 16:33:31 +00:00
|
|
|
"fuzz/FuzzCommon.h",
|
2020-07-22 14:37:46 +00:00
|
|
|
"fuzz/FuzzCreateDDL.cpp",
|
2021-02-23 18:05:32 +00:00
|
|
|
"fuzz/FuzzDDLThreading.cpp",
|
2016-11-22 18:57:18 +00:00
|
|
|
"fuzz/FuzzDrawFunctions.cpp",
|
2018-03-30 19:05:13 +00:00
|
|
|
"fuzz/FuzzEncoders.cpp",
|
2016-10-03 18:49:45 +00:00
|
|
|
"fuzz/FuzzGradients.cpp",
|
2018-09-17 18:46:57 +00:00
|
|
|
"fuzz/FuzzMain.cpp",
|
2016-10-03 18:49:45 +00:00
|
|
|
"fuzz/FuzzParsePath.cpp",
|
2018-03-09 19:02:46 +00:00
|
|
|
"fuzz/FuzzPathMeasure.cpp",
|
2016-10-03 18:49:45 +00:00
|
|
|
"fuzz/FuzzPathop.cpp",
|
2018-07-11 18:09:09 +00:00
|
|
|
"fuzz/FuzzPolyUtils.cpp",
|
2018-04-06 14:25:12 +00:00
|
|
|
"fuzz/FuzzRegionOp.cpp",
|
2020-12-30 18:29:00 +00:00
|
|
|
"fuzz/FuzzSkParagraph.cpp",
|
2021-04-22 14:51:58 +00:00
|
|
|
"fuzz/FuzzTriangulation.cpp",
|
2018-10-16 19:52:17 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzAndroidCodec.cpp",
|
2018-02-12 13:26:39 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzAnimatedImage.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzImage.cpp",
|
2018-02-08 19:31:24 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
|
2018-10-16 19:52:17 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzIncrementalImage.cpp",
|
2018-06-19 15:27:20 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzJSON.cpp",
|
2018-02-08 19:31:24 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzPathDeserialize.cpp",
|
2018-01-11 15:27:14 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
|
2020-07-31 17:21:29 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSKP.cpp",
|
2019-03-11 15:09:40 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzSKSL2Metal.cpp",
|
2019-03-18 20:20:55 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp",
|
2019-03-11 15:09:40 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp",
|
2020-06-12 12:20:59 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSVG.cpp",
|
2019-10-21 17:44:48 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp",
|
2021-02-04 16:09:59 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSkParagraph.cpp",
|
Add SkRuntimeEffect Fuzzer
The major improvement is that now the fuzzer is able to execute
the sksl code (before it just compiled it). The fuzzer will
reserve 256 bytes for providing uniforms to the shader;
meanwhile, the fuzzer will read the remaining bytes as sksl code
to create SkRuntimeEffect. It then creates a shader and executes
it by painting the shader on a canvas.
The code was tested locally with afl-fuzz, and the execution
speed was around 700/sec.
An alternative implementation would have been using Fuzz.h to
read bytes; I decided to go with sk_sp<SkData> since it has a
comparable format to other binary fuzzer and meets all the
functionality in this fuzzer.
For future changes, there are 2 important improvements to the
implementation:
1) Current shader does not have children shaders; thus,
makeShader() will fail if the SkSL ever tries to use an 'in shader'.
As pointed out in patchset 11, after creating the runtime effect,
effect->children().count() will tell you how many children it's
expecting (how many 'in shader' variables were declared). When you
call makeShader(), the second and third arguments are a
(C-style) array of shader pointers, and
a count (which must match children().count()).
Some helpful examples can be SkRTShader::CreateProc in
SkRuntimeEffect.cpp, make_fuzz_shader in FuzzCanvas.cpp.
2)
In this fuzzer, after creating the paint from a shader, the paint
can be drawn on either GPU canvas or CPU, so a possible way is to
use SkSurface::MakeRenderTarget to create GPU canvas and use a byte
to determine which canvas it will be drawn on.
Change-Id: Ib0385edd0f5ec2f23744aa517135a6955c53ba38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300618
Commit-Queue: Zepeng Hu <zepenghu@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-10 13:36:20 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp",
|
2018-02-08 19:31:24 +00:00
|
|
|
"fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
|
2018-01-09 17:47:33 +00:00
|
|
|
"tools/UrlDataManager.cpp",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
2019-12-12 16:05:10 +00:00
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
2019-03-20 16:59:00 +00:00
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.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-05-26 13:49:28 +00:00
|
|
|
"modules/skottie:fuzz",
|
2020-12-30 18:29:00 +00:00
|
|
|
"modules/skparagraph",
|
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("dump_record") {
|
2020-08-18 21:02:52 +00:00
|
|
|
sources = [ "tools/dump_record.cpp" ]
|
2016-10-05 19:41:01 +00:00
|
|
|
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") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/skp_parser.cpp" ]
|
2016-10-17 20:19:02 +00:00
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
if (!is_win) {
|
2021-03-16 18:29:20 +00:00
|
|
|
source_set("skqp_lib") { # Not a skia_source_set
|
2019-11-08 21:08:36 +00:00
|
|
|
check_includes = false
|
|
|
|
testonly = true
|
|
|
|
public_configs = [ ":skia_private" ]
|
2017-10-11 20:00:31 +00:00
|
|
|
sources = [
|
|
|
|
"dm/DMGpuTestProcs.cpp",
|
2018-11-26 19:07:41 +00:00
|
|
|
"tools/skqp/src/skqp.cpp",
|
2022-03-04 22:48:15 +00:00
|
|
|
"tools/skqp/src/skqp.h",
|
2017-10-11 20:00:31 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":gm",
|
|
|
|
":skia",
|
|
|
|
":tests",
|
2017-12-11 22:46:26 +00:00
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
test_app("skqp") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/skqp/src/skqp_main.cpp" ]
|
2019-09-25 21:14:35 +00:00
|
|
|
include_dirs = [ "//" ]
|
|
|
|
lib_dirs = []
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":skqp_lib" ]
|
2018-11-26 19:07:41 +00:00
|
|
|
}
|
2017-10-11 20:00:31 +00:00
|
|
|
}
|
2019-09-25 21:14:35 +00:00
|
|
|
if (is_fuchsia) {
|
|
|
|
# Build a package repository for skqp on Fuchsia.
|
|
|
|
group("skqp_repo") {
|
|
|
|
testonly = true
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "//build/fuchsia/skqp:skqp_repo" ]
|
2019-09-25 21:14:35 +00:00
|
|
|
}
|
|
|
|
}
|
2018-05-31 17:17:12 +00:00
|
|
|
if (is_android) {
|
2021-03-16 18:29:20 +00:00
|
|
|
shared_library("libskqp_app") { # Not a skia_shared_library
|
2019-11-08 21:08:36 +00:00
|
|
|
configs += [ ":skia_private" ]
|
|
|
|
testonly = true
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/skqp/src/jni_skqp.cpp" ]
|
2017-12-12 14:42:14 +00:00
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":skqp_lib",
|
2018-01-29 18:10:08 +00:00
|
|
|
":tool_utils",
|
2017-12-12 14:42:14 +00:00
|
|
|
]
|
|
|
|
libs = [ "android" ]
|
|
|
|
}
|
|
|
|
}
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_android && skia_use_gl) {
|
2018-08-02 15:10:52 +00:00
|
|
|
test_app("skottie_android") {
|
|
|
|
is_shared_library = true
|
|
|
|
|
2020-06-22 14:14:32 +00:00
|
|
|
sources = [ "platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp" ]
|
2018-08-02 15:10:52 +00:00
|
|
|
libs = []
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
"modules/skottie",
|
|
|
|
]
|
|
|
|
}
|
2021-04-08 19:27:13 +00:00
|
|
|
|
|
|
|
test_app("androidkit") {
|
|
|
|
is_shared_library = true
|
|
|
|
|
2021-04-12 17:38:44 +00:00
|
|
|
sources = [
|
2021-04-13 14:05:27 +00:00
|
|
|
"modules/androidkit/src/AndroidKit.cpp",
|
2021-04-12 17:38:44 +00:00
|
|
|
"modules/androidkit/src/Canvas.cpp",
|
2021-06-28 20:34:14 +00:00
|
|
|
"modules/androidkit/src/ColorFilters.cpp",
|
2021-09-07 20:50:21 +00:00
|
|
|
"modules/androidkit/src/Font.cpp",
|
2021-10-14 18:02:08 +00:00
|
|
|
"modules/androidkit/src/FontChainAdapter.cpp",
|
2021-06-17 18:05:57 +00:00
|
|
|
"modules/androidkit/src/Gradients.cpp",
|
2021-05-20 16:23:42 +00:00
|
|
|
"modules/androidkit/src/Image.cpp",
|
2021-06-04 20:34:02 +00:00
|
|
|
"modules/androidkit/src/ImageFilter.cpp",
|
2021-04-29 17:33:50 +00:00
|
|
|
"modules/androidkit/src/Matrix.cpp",
|
2021-04-13 15:06:43 +00:00
|
|
|
"modules/androidkit/src/Paint.cpp",
|
2021-06-16 18:45:52 +00:00
|
|
|
"modules/androidkit/src/Path.cpp",
|
|
|
|
"modules/androidkit/src/PathBuilder.cpp",
|
2021-04-22 13:37:50 +00:00
|
|
|
"modules/androidkit/src/RuntimeShaderBuilder.cpp",
|
|
|
|
"modules/androidkit/src/Shader.cpp",
|
2021-05-18 13:54:10 +00:00
|
|
|
"modules/androidkit/src/SkottieAnimation.cpp",
|
2021-04-12 17:38:44 +00:00
|
|
|
"modules/androidkit/src/Surface.cpp",
|
2021-05-13 15:24:37 +00:00
|
|
|
"modules/androidkit/src/Surface.h",
|
2021-04-26 17:48:56 +00:00
|
|
|
"modules/androidkit/src/SurfaceThread.cpp",
|
|
|
|
"modules/androidkit/src/SurfaceThread.h",
|
2021-08-20 18:37:13 +00:00
|
|
|
"modules/androidkit/src/Text.cpp",
|
2021-05-21 12:23:32 +00:00
|
|
|
"modules/androidkit/src/Utils.cpp",
|
2021-04-26 17:48:56 +00:00
|
|
|
]
|
|
|
|
libs = [
|
|
|
|
"android",
|
|
|
|
"jnigraphics",
|
2021-04-12 17:38:44 +00:00
|
|
|
]
|
2021-04-08 19:27:13 +00:00
|
|
|
|
2021-04-27 01:59:35 +00:00
|
|
|
deps = [
|
|
|
|
":sk_app",
|
|
|
|
":skia",
|
2021-09-17 19:19:02 +00:00
|
|
|
"experimental/sktext:sktext",
|
2021-05-18 13:54:10 +00:00
|
|
|
"modules/skottie:skottie",
|
2021-04-27 01:59:35 +00:00
|
|
|
]
|
2021-04-08 19:27:13 +00:00
|
|
|
}
|
2018-08-02 15:10:52 +00:00
|
|
|
}
|
2017-10-11 20:00:31 +00:00
|
|
|
|
2018-01-19 18:08:23 +00:00
|
|
|
test_app("list_gms") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/list_gms.cpp" ]
|
2018-01-19 18:08:23 +00:00
|
|
|
deps = [
|
|
|
|
":gm",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
test_app("list_gpu_unit_tests") {
|
|
|
|
sources = [
|
|
|
|
"dm/DMGpuTestProcs.cpp",
|
|
|
|
"tools/list_gpu_unit_tests.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":tests",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
test_lib("sk_app") {
|
2019-04-26 12:20:14 +00:00
|
|
|
public_deps = [
|
|
|
|
":gpu_tool_utils",
|
2019-05-03 21:14:21 +00:00
|
|
|
":skia",
|
2019-04-26 12:20:14 +00:00
|
|
|
]
|
2018-05-31 17:17:12 +00:00
|
|
|
sources = [
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/Application.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/CommandSet.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/CommandSet.h",
|
|
|
|
"tools/sk_app/DisplayParams.h",
|
|
|
|
"tools/sk_app/RasterWindowContext.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/Window.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/Window.h",
|
2020-07-10 17:55:21 +00:00
|
|
|
"tools/sk_app/WindowContext.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/WindowContext.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
]
|
|
|
|
libs = []
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks = []
|
2018-05-31 17:17:12 +00:00
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
sources += [
|
|
|
|
"tools/sk_app/android/RasterWindowContext_android.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/android/WindowContextFactory_android.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/android/Window_android.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/android/Window_android.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/android/main_android.cpp",
|
|
|
|
"tools/sk_app/android/surface_glue_android.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/android/surface_glue_android.h",
|
2016-10-18 18:42:44 +00:00
|
|
|
]
|
2018-05-31 17:17:12 +00:00
|
|
|
libs += [ "android" ]
|
|
|
|
} else if (is_linux) {
|
|
|
|
sources += [
|
|
|
|
"tools/sk_app/unix/RasterWindowContext_unix.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/unix/WindowContextFactory_unix.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/unix/Window_unix.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/unix/Window_unix.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/unix/keysym2ucs.c",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/unix/keysym2ucs.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/unix/main_unix.cpp",
|
|
|
|
]
|
|
|
|
libs += [
|
2020-03-19 19:54:28 +00:00
|
|
|
"GL", # Used by raster window context, so cannot be behind skia_use_gl.
|
2018-05-31 17:17:12 +00:00
|
|
|
"X11",
|
|
|
|
]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [
|
|
|
|
"tools/sk_app/win/RasterWindowContext_win.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/win/WindowContextFactory_win.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/win/Window_win.cpp",
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/win/Window_win.h",
|
2018-05-31 17:17:12 +00:00
|
|
|
"tools/sk_app/win/main_win.cpp",
|
|
|
|
]
|
|
|
|
} else if (is_mac) {
|
|
|
|
sources += [
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/mac/WindowContextFactory_mac.h",
|
|
|
|
"tools/sk_app/mac/Window_mac.h",
|
2019-01-28 19:46:04 +00:00
|
|
|
"tools/sk_app/mac/Window_mac.mm",
|
|
|
|
"tools/sk_app/mac/main_mac.mm",
|
2018-05-31 17:17:12 +00:00
|
|
|
]
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [
|
2018-05-31 17:17:12 +00:00
|
|
|
"QuartzCore.framework",
|
|
|
|
"Cocoa.framework",
|
|
|
|
"Foundation.framework",
|
|
|
|
]
|
|
|
|
} else if (is_ios) {
|
|
|
|
sources += [
|
2020-06-30 21:36:55 +00:00
|
|
|
"tools/sk_app/ios/WindowContextFactory_ios.h",
|
|
|
|
"tools/sk_app/ios/Window_ios.h",
|
2019-08-29 18:59:17 +00:00
|
|
|
"tools/sk_app/ios/Window_ios.mm",
|
|
|
|
"tools/sk_app/ios/main_ios.mm",
|
2018-05-31 17:17:12 +00:00
|
|
|
]
|
2020-08-12 14:45:00 +00:00
|
|
|
frameworks += [ "QuartzCore.framework" ]
|
2018-05-31 17:17:12 +00:00
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
|
2020-03-19 19:54:28 +00:00
|
|
|
if (skia_use_gl) {
|
|
|
|
sources += [ "tools/sk_app/GLWindowContext.cpp" ]
|
2020-06-30 21:36:55 +00:00
|
|
|
sources += [ "tools/sk_app/GLWindowContext.h" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_android) {
|
|
|
|
sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ]
|
|
|
|
} else if (is_linux) {
|
|
|
|
sources += [ "tools/sk_app/unix/GLWindowContext_unix.cpp" ]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "tools/sk_app/win/GLWindowContext_win.cpp" ]
|
|
|
|
if (skia_use_angle) {
|
|
|
|
sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
|
|
|
|
}
|
|
|
|
} else if (is_mac) {
|
2021-04-19 14:12:12 +00:00
|
|
|
sources += [
|
|
|
|
"tools/sk_app/mac/GLWindowContext_mac.mm",
|
|
|
|
"tools/sk_app/mac/RasterWindowContext_mac.mm",
|
|
|
|
]
|
2020-03-19 19:54:28 +00:00
|
|
|
} else if (is_ios) {
|
2021-04-19 14:12:12 +00:00
|
|
|
sources += [
|
|
|
|
"tools/sk_app/ios/GLWindowContext_ios.mm",
|
|
|
|
"tools/sk_app/ios/RasterWindowContext_ios.mm",
|
|
|
|
]
|
2020-03-19 19:54:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-31 17:17:12 +00:00
|
|
|
if (skia_use_vulkan) {
|
|
|
|
sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
|
2020-06-30 21:36:55 +00:00
|
|
|
sources += [ "tools/sk_app/VulkanWindowContext.h" ]
|
2016-10-21 14:58:52 +00:00
|
|
|
if (is_android) {
|
2018-05-31 17:17:12 +00:00
|
|
|
sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
|
2016-10-21 14:58:52 +00:00
|
|
|
} else if (is_linux) {
|
2018-05-31 17:17:12 +00:00
|
|
|
sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ]
|
|
|
|
libs += [ "X11-xcb" ]
|
2016-10-18 19:33:53 +00:00
|
|
|
} else if (is_win) {
|
2018-05-31 17:17:12 +00:00
|
|
|
sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ]
|
2016-10-18 18:42:44 +00:00
|
|
|
}
|
2018-05-31 17:17:12 +00:00
|
|
|
}
|
2016-10-18 18:42:44 +00:00
|
|
|
|
2019-02-08 20:36:14 +00:00
|
|
|
if (skia_use_metal) {
|
|
|
|
sources += [ "tools/sk_app/MetalWindowContext.mm" ]
|
2020-06-30 21:36:55 +00:00
|
|
|
sources += [ "tools/sk_app/MetalWindowContext.h" ]
|
2021-09-30 20:27:30 +00:00
|
|
|
if (skia_enable_graphite) {
|
|
|
|
sources += [ "tools/sk_app/GraphiteMetalWindowContext.mm" ]
|
|
|
|
sources += [ "tools/sk_app/GraphiteMetalWindowContext.h" ]
|
|
|
|
}
|
2019-02-08 20:36:14 +00:00
|
|
|
if (is_mac) {
|
|
|
|
sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ]
|
2021-09-30 20:27:30 +00:00
|
|
|
if (skia_enable_graphite) {
|
|
|
|
sources += [ "tools/sk_app/mac/GraphiteMetalWindowContext_mac.mm" ]
|
|
|
|
}
|
2019-08-29 18:59:17 +00:00
|
|
|
} else if (is_ios) {
|
2019-09-03 13:42:57 +00:00
|
|
|
sources += [ "tools/sk_app/ios/MetalWindowContext_ios.mm" ]
|
2019-02-08 20:36:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-13 20:54:09 +00:00
|
|
|
if (skia_use_direct3d) {
|
|
|
|
sources += [ "tools/sk_app/win/D3D12WindowContext_win.cpp" ]
|
|
|
|
}
|
|
|
|
|
2020-03-19 19:54:28 +00:00
|
|
|
if (skia_use_dawn) {
|
|
|
|
sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
|
2020-06-30 21:36:55 +00:00
|
|
|
sources += [ "tools/sk_app/DawnWindowContext.h" ]
|
2020-03-19 19:54:28 +00:00
|
|
|
if (is_linux) {
|
|
|
|
if (dawn_enable_vulkan) {
|
|
|
|
sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ]
|
|
|
|
defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
|
|
|
|
libs += [ "X11-xcb" ]
|
|
|
|
}
|
|
|
|
} else if (is_win) {
|
|
|
|
if (dawn_enable_d3d12) {
|
|
|
|
sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ]
|
|
|
|
}
|
|
|
|
} else if (is_mac) {
|
|
|
|
if (dawn_enable_metal) {
|
|
|
|
sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ ":tool_utils" ]
|
2018-05-31 17:17:12 +00:00
|
|
|
if (is_android) {
|
|
|
|
deps += [ "//third_party/native_app_glue" ]
|
|
|
|
}
|
2020-03-19 19:54:28 +00:00
|
|
|
if (skia_use_gl && skia_use_angle) {
|
2018-05-31 17:17:12 +00:00
|
|
|
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
|
|
|
|
2019-03-15 18:22:51 +00:00
|
|
|
if (!skia_use_vulkan && (is_mac || is_linux || is_win)) {
|
|
|
|
test_app("fiddle_examples") {
|
|
|
|
sources = [
|
2019-04-10 18:08:44 +00:00
|
|
|
"tools/fiddle/all_examples.cpp",
|
2019-03-15 18:22:51 +00:00
|
|
|
"tools/fiddle/examples.cpp",
|
2019-03-17 15:09:17 +00:00
|
|
|
"tools/fiddle/examples.h",
|
2019-03-15 18:22:51 +00:00
|
|
|
]
|
2019-03-17 15:09:17 +00:00
|
|
|
if (is_win) {
|
2020-01-10 20:22:09 +00:00
|
|
|
cflags = [
|
|
|
|
"/wd4756", # Overflow in constant arithmetic
|
|
|
|
"/wd4305", # truncation from 'double' to 'float'
|
|
|
|
]
|
2019-03-17 15:09:17 +00:00
|
|
|
}
|
2019-03-15 18:22:51 +00:00
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
":skia.h",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/particles",
|
2019-03-15 18:22:51 +00:00
|
|
|
"modules/skottie",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/skparagraph",
|
2019-03-25 21:38:43 +00:00
|
|
|
"modules/skshaper",
|
2020-12-28 19:37:39 +00:00
|
|
|
"modules/svg",
|
2019-03-15 18:22:51 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2018-05-31 17:17:12 +00:00
|
|
|
|
2020-03-19 19:54:28 +00:00
|
|
|
# sk_app can work without GL but viewer always runs raster through a GL window context.
|
|
|
|
if (skia_use_gl) {
|
|
|
|
test_app("viewer") {
|
|
|
|
is_shared_library = is_android
|
|
|
|
sources = [
|
|
|
|
"tools/viewer/AnimTimer.h",
|
|
|
|
"tools/viewer/BisectSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/BisectSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/GMSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/GMSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/ImGuiLayer.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/ImGuiLayer.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/ImageSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/ImageSlide.h",
|
2021-04-29 18:10:23 +00:00
|
|
|
"tools/viewer/MSKPSlide.cpp",
|
|
|
|
"tools/viewer/MSKPSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/ParticlesSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/ParticlesSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/SKPSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/SKPSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/SampleSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/SampleSlide.h",
|
2021-12-11 00:53:57 +00:00
|
|
|
"tools/viewer/SkSLDebuggerSlide.cpp",
|
|
|
|
"tools/viewer/SkSLDebuggerSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/SkSLSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/SkSLSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/SkottieSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/SkottieSlide.h",
|
|
|
|
"tools/viewer/Slide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/SlideDir.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/SlideDir.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/StatsLayer.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/StatsLayer.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/SvgSlide.cpp",
|
2021-01-28 19:30:59 +00:00
|
|
|
"tools/viewer/SvgSlide.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
"tools/viewer/TouchGesture.cpp",
|
|
|
|
"tools/viewer/TouchGesture.h",
|
|
|
|
"tools/viewer/Viewer.cpp",
|
2020-07-31 16:33:31 +00:00
|
|
|
"tools/viewer/Viewer.h",
|
2020-03-19 19:54:28 +00:00
|
|
|
]
|
|
|
|
libs = []
|
|
|
|
|
|
|
|
deps = [
|
2021-10-14 12:24:22 +00:00
|
|
|
":common_flags_fontmgr",
|
2020-03-19 19:54:28 +00:00
|
|
|
":common_flags_gpu",
|
|
|
|
":flags",
|
|
|
|
":gm",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":samples",
|
|
|
|
":sk_app",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
":trace",
|
2021-09-17 19:19:02 +00:00
|
|
|
"experimental/sktext",
|
2020-08-13 16:03:37 +00:00
|
|
|
"modules/audioplayer",
|
2020-03-19 19:54:28 +00:00
|
|
|
"modules/particles",
|
|
|
|
"modules/skottie",
|
|
|
|
"modules/skottie:utils",
|
|
|
|
"modules/sksg:samples",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-03-19 19:54:28 +00:00
|
|
|
"//third_party/imgui",
|
|
|
|
]
|
2020-06-16 19:11:34 +00:00
|
|
|
if (skia_use_vulkan) {
|
2020-06-30 15:09:25 +00:00
|
|
|
deps += [
|
2021-03-08 14:25:34 +00:00
|
|
|
"//third_party/externals/spirv-tools:spvtools",
|
2020-06-30 15:09:25 +00:00
|
|
|
|
2021-03-08 14:25:34 +00:00
|
|
|
#spvtools depends on this but doesn't deps it in.
|
|
|
|
"//third_party/externals/spirv-tools:spvtools_val",
|
2020-06-30 15:09:25 +00:00
|
|
|
]
|
2020-06-16 19:11:34 +00:00
|
|
|
}
|
2019-06-12 14:20:44 +00:00
|
|
|
}
|
2017-11-21 18:18:02 +00:00
|
|
|
}
|
|
|
|
|
2020-03-19 19:54:28 +00:00
|
|
|
if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac)) {
|
2017-11-21 18:18:02 +00:00
|
|
|
test_app("HelloWorld") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "example/HelloWorld.cpp" ]
|
2017-11-21 18:18:02 +00:00
|
|
|
libs = []
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":sk_app",
|
|
|
|
":skia",
|
|
|
|
":tool_utils",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-08 17:45:45 +00:00
|
|
|
if (skia_use_vulkan) {
|
|
|
|
test_app("VulkanBasic") {
|
|
|
|
# Bots and even devs may not have Vulkan headers, so put
|
|
|
|
# include/third_party/vulkan on our path so they're always available.
|
|
|
|
all_dependent_configs = [ ":our_vulkan_headers" ]
|
|
|
|
|
|
|
|
sources = [ "example/VulkanBasic.cpp" ]
|
|
|
|
sources += [ "tools/gpu/vk/VkTestUtils.h" ]
|
|
|
|
sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
|
|
|
|
deps = [ ":skia" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-03 14:21:30 +00:00
|
|
|
if (is_android && defined(ndk) && ndk != "") {
|
2017-01-05 16:39:04 +00:00
|
|
|
copy("gdbserver") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "$ndk/$ndk_gdbserver" ]
|
|
|
|
outputs = [ "$root_out_dir/gdbserver" ]
|
2017-01-05 16:39:04 +00:00
|
|
|
}
|
|
|
|
}
|
2018-06-20 18:05:05 +00:00
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable("cpu_modules") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/cpu_modules.cpp" ]
|
2019-07-23 19:14:30 +00:00
|
|
|
deps = [
|
|
|
|
":skia",
|
|
|
|
"modules/particles",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-04-19 14:12:12 +00:00
|
|
|
if (skia_use_icu && skia_use_harfbuzz) {
|
2019-07-30 13:27:56 +00:00
|
|
|
test_app("editor") {
|
|
|
|
is_shared_library = is_android
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "modules/skplaintexteditor:editor_app" ]
|
2019-07-30 13:27:56 +00:00
|
|
|
}
|
2021-09-17 19:19:02 +00:00
|
|
|
test_app("text_editor") {
|
|
|
|
is_shared_library = is_android
|
|
|
|
deps = [ "experimental/sktext:text_editor" ]
|
|
|
|
}
|
2019-04-24 17:56:16 +00:00
|
|
|
}
|
2019-09-19 15:33:31 +00:00
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable("image_diff_metric") {
|
2020-04-01 18:47:34 +00:00
|
|
|
sources = [ "tools/image_diff_metric.cpp" ]
|
|
|
|
deps = [ ":skia" ]
|
2019-09-19 15:33:31 +00:00
|
|
|
}
|
2020-03-25 16:50:35 +00:00
|
|
|
|
|
|
|
group("modules_testonly") {
|
|
|
|
testonly = true
|
|
|
|
deps = []
|
2022-02-14 20:08:12 +00:00
|
|
|
if (is_wasm) {
|
2020-03-25 16:50:35 +00:00
|
|
|
deps += [ "modules/canvaskit:viewer_wasm" ]
|
|
|
|
}
|
|
|
|
}
|
2020-09-15 14:05:41 +00:00
|
|
|
|
|
|
|
if (skia_build_fuzzers) {
|
|
|
|
template("libfuzzer_app") {
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable(target_name) {
|
|
|
|
output_dir = root_build_dir
|
2020-09-15 14:05:41 +00:00
|
|
|
check_includes = false
|
|
|
|
forward_variables_from(invoker, "*", [ "is_shared_library" ])
|
2021-03-16 18:29:20 +00:00
|
|
|
if (!defined(configs)) {
|
|
|
|
configs = []
|
|
|
|
}
|
2020-09-15 14:05:41 +00:00
|
|
|
configs += [ ":skia_private" ]
|
|
|
|
sources += [
|
|
|
|
"fuzz/Fuzz.cpp",
|
|
|
|
"fuzz/FuzzCommon.cpp",
|
|
|
|
]
|
|
|
|
deps += [
|
|
|
|
":flags",
|
|
|
|
":gpu_tool_utils",
|
|
|
|
":skia",
|
|
|
|
]
|
|
|
|
defines = [ "SK_BUILD_FOR_LIBFUZZER" ]
|
|
|
|
if (skia_use_libfuzzer_defaults) {
|
|
|
|
cflags = [ "-fsanitize=fuzzer" ]
|
|
|
|
ldflags = [ "-fsanitize=fuzzer" ]
|
|
|
|
}
|
|
|
|
testonly = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("region_deserialize") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("image_filter_deserialize") {
|
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/fonts",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
2020-10-15 22:10:29 +00:00
|
|
|
deps = [ "modules/svg" ]
|
2020-09-15 14:05:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("region_set_path") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzRegionSetPath.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("textblob_deserialize") {
|
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/fonts",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
2020-10-15 22:10:29 +00:00
|
|
|
deps = [ "modules/svg" ]
|
2020-09-15 14:05:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("path_deserialize") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzPathDeserialize.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("image_decode") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzImage.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("animated_image_decode") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzAnimatedImage.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_create_ddl") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"include/gpu",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzCreateDDL.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzAPICreateDDL.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-09-15 14:05:41 +00:00
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_draw_functions") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzDrawFunctions.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzDrawFunctions.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
2021-02-25 15:28:44 +00:00
|
|
|
libfuzzer_app("api_ddl_threading") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzDDLThreading.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzDDLThreading.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
2020-09-15 14:05:41 +00:00
|
|
|
libfuzzer_app("api_gradients") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzGradients.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzGradients.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_image_filter") {
|
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzCanvas.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzAPIImageFilter.cpp",
|
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
|
|
|
]
|
|
|
|
deps = [ "//third_party/libpng" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_path_measure") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzPathMeasure.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzPathMeasure.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_pathop") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzPathop.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzPathop.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
2021-04-22 14:51:58 +00:00
|
|
|
libfuzzer_app("api_triangulation") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzTriangulation.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzTriangulation.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
2020-09-15 14:05:41 +00:00
|
|
|
libfuzzer_app("api_raster_n32_canvas") {
|
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
|
|
|
"tools/fonts",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzCanvas.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzRasterN32Canvas.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-09-15 14:05:41 +00:00
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-03-29 12:07:32 +00:00
|
|
|
libfuzzer_app("api_regionop") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzRegionOp.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzRegionOp.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
2022-02-01 14:03:41 +00:00
|
|
|
if (skia_enable_gpu) {
|
2020-09-15 14:05:41 +00:00
|
|
|
libfuzzer_app("api_mock_gpu_canvas") {
|
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
|
|
|
"tools/fonts",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzCanvas.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzMockGPUCanvas.cpp",
|
|
|
|
"tools/LsanSuppressions.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-09-15 14:05:41 +00:00
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_null_canvas") {
|
|
|
|
include_dirs = [
|
|
|
|
"tools",
|
|
|
|
"tools/debugger",
|
|
|
|
"tools/fonts",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzCanvas.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzNullCanvas.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-09-15 14:05:41 +00:00
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-02-04 16:09:59 +00:00
|
|
|
libfuzzer_app("api_skparagraph") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzSkParagraph.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzSkParagraph.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
]
|
|
|
|
deps = [ "modules/skparagraph" ]
|
|
|
|
}
|
|
|
|
|
2020-09-15 14:05:41 +00:00
|
|
|
libfuzzer_app("api_svg_canvas") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"include/svg",
|
|
|
|
]
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzCanvas.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/UrlDataManager.cpp",
|
|
|
|
"tools/debugger/DebugCanvas.cpp",
|
|
|
|
"tools/debugger/DebugLayerManager.cpp",
|
|
|
|
"tools/debugger/DrawCommand.cpp",
|
|
|
|
"tools/debugger/JsonWriteBuffer.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-09-15 14:05:41 +00:00
|
|
|
"//third_party/libpng",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("png_encoder") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzEncoders.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzPNGEncoder.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("jpeg_encoder") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzEncoders.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzJPEGEncoder.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("webp_encoder") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzEncoders.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzWEBPEncoder.cpp",
|
|
|
|
]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("skottie_json") {
|
|
|
|
sources = [
|
|
|
|
"modules/skottie/fuzz/FuzzSkottieJSON.cpp",
|
|
|
|
"tools/Resources.cpp",
|
|
|
|
"tools/fonts/TestFontMgr.cpp",
|
|
|
|
"tools/fonts/TestSVGTypeface.cpp",
|
|
|
|
"tools/fonts/TestTypeface.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
"modules/skottie:skottie",
|
2020-10-15 22:10:29 +00:00
|
|
|
"modules/svg",
|
2020-09-15 14:05:41 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("skjson") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzJSON.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("api_polyutils") {
|
|
|
|
sources = [
|
|
|
|
"fuzz/FuzzPolyUtils.cpp",
|
|
|
|
"fuzz/oss_fuzz/FuzzPolyUtils.cpp",
|
|
|
|
]
|
|
|
|
deps = [ ":skia" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("android_codec") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzAndroidCodec.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("image_decode_incremental") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzIncrementalImage.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("sksl2glsl") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("sksl2spirv") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("sksl2metal") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("sksl2pipeline") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("skdescriptor_deserialize") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("svg_dom") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSVG.cpp" ]
|
2020-10-15 22:10:29 +00:00
|
|
|
deps = [ "modules/svg" ]
|
2020-09-15 14:05:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("skruntimeeffect") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
|
|
|
|
libfuzzer_app("skp") {
|
|
|
|
sources = [ "fuzz/oss_fuzz/FuzzSKP.cpp" ]
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
}
|
2019-09-17 14:43:18 +00:00
|
|
|
|
2021-10-28 16:44:43 +00:00
|
|
|
if (is_ios && skia_use_metal && skia_enable_gpu &&
|
|
|
|
!skia_enable_flutter_defines) {
|
2019-09-17 14:43:18 +00:00
|
|
|
group("minimal_ios_mtl_skia_app") {
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "experimental/minimal_ios_mtl_skia_app" ]
|
2019-09-17 14:43:18 +00:00
|
|
|
}
|
2019-12-06 20:01:08 +00:00
|
|
|
}
|
|
|
|
|
2020-01-21 17:39:20 +00:00
|
|
|
if (is_ios && skia_enable_skottie && !skia_enable_flutter_defines) {
|
2019-09-17 14:43:18 +00:00
|
|
|
group("skottie_ios") {
|
2020-04-01 18:47:34 +00:00
|
|
|
deps = [ "tools/skottie_ios_app" ]
|
2019-09-17 14:43:18 +00:00
|
|
|
}
|
|
|
|
}
|
2020-12-15 15:15:13 +00:00
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
skia_executable("skia_c_api_example") {
|
2020-12-15 15:15:13 +00:00
|
|
|
sources = [ "experimental/c-api-example/skia-c-example.c" ]
|
|
|
|
include_dirs = [ "." ]
|
|
|
|
deps = [ ":skia" ]
|
|
|
|
}
|