skia2/BUILD.gn

3380 lines
89 KiB
Plaintext
Raw Normal View History

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("gn/flutter_defines.gni")
import("gn/fuchsia_defines.gni")
import("gn/shared_sources.gni")
import("gn/skia.gni")
import("gn/toolchain/wasm.gni")
if (is_fuchsia) {
import("//build/fuchsia/sdk.gni")
import("build/fuchsia/fuchsia_download_sdk.gni")
}
if (skia_use_dawn) {
Reland "Enable non-standalone builds with dawn" This reverts commit 122f1b936fece081c14f07b2b1dc750ad551665c. Reason for revert: unrelated to G3 failure? Original change's description: > Revert "Enable non-standalone builds with dawn" > > This reverts commit 25deba3516bc3dbce9c1a1c7db6f66e95e9d0de4. > > Reason for revert: Possible Google3 roll break > > Original change's description: > > Enable non-standalone builds with dawn > > > > Bug: skia:12276 > > Change-Id: Iaf7311fef43bd9c37bfc7b7a6221f6bea25f196d > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433696 > > Auto-Submit: Safa Sofuoglu <safasofuoglu@gmail.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Stephen White <senorblanco@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,senorblanco@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com,safasofuoglu@gmail.com > > Change-Id: I05dc7e1107ae08d4c9d4a7663704eb14f711208d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:12276 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471757 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Julia Lavrova <jlavrova@google.com> # Not skipping CQ checks because this is a reland. Bug: skia:12276 Change-Id: Ifca6eaba59083afef4bb7a1ee73de1b8538b383b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471761 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-11-15 19:08:02 +00:00
import("//third_party/externals/dawn/scripts/dawn_features.gni")
}
if (defined(skia_settings)) {
import(skia_settings)
}
import("gn/ios.gni")
# Skia public API, generally provided by :skia.
config("skia_public") {
include_dirs = [ "." ]
defines = []
cflags_objcc = []
if (is_component_build) {
defines += [ "SKIA_DLL" ]
}
if (is_fuchsia || is_linux) {
defines += [ "SK_R32_SHIFT=16" ]
}
if (skia_enable_flutter_defines) {
defines += flutter_defines
}
if (!skia_enable_gpu) {
defines += [ "SK_SUPPORT_GPU=0" ]
}
if (skia_enable_sksl) {
defines += [ "SK_ENABLE_SKSL" ]
}
if (is_fuchsia) {
defines += fuchsia_defines
}
if (is_wasm) {
defines += wasm_defines
}
if (skia_gl_standard == "gles") {
defines += [ "SK_ASSUME_GL_ES=1" ]
} else if (skia_gl_standard == "gl") {
defines += [ "SK_ASSUME_GL=1" ]
} else if (skia_gl_standard == "webgl") {
defines += [
"SK_ASSUME_WEBGL=1",
"SK_USE_WEBGL",
]
}
if (!skia_enable_skgpu_v1) {
defines += [ "SK_GPU_V1=0" ]
}
# 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" ]
}
}
}
# Skia internal APIs, used by Skia itself and a few test tools.
config("skia_private") {
visibility = [ "./*" ]
defines = [ "SK_GAMMA_APPLY_TO_A8" ]
Generate Android Framework host-side Skia (linux) Bug: b/118742766 Update gn_to_bp to write an Android.bp file that will build a host-side Skia library. Switch some methods from SK_BUILD_FOR_ANDROID to SK_BUILD_FOR_ANDROID_FRAMEWORK. Prior reviews were done at ag/5482397. gn_to_bp.py: - Run GN twice - once for android and once for linux - Disable GPU (depends on a to-be-written host side GL target) and HEIF (which relies on Android hardware) on linux - TODO: Turn on GPU on linux - Split sources into everywhere, android-only, and linux-only. It seems that Android.bp does not allow using the same cpp file in multiple targets. - note that we currently *only* divide out the sources. The cflags are the same (except for a couple manual ones) and include directories are mostly the same (again, except for manual ones). Android has a "gpu" include directory, which I don't expect to make a difference to the linux build, which isn't using GPU (yet). - Use the same "custom empty" font manager on the host as on Android - Write separate SkUserConfig files; one for android and one for linux. This allows libskia to force libraries that use it to use the right defines by setting export_include_dirs. - Add extra checks to SkUserConfig.h to ensure we have only the appropriate SK_BUILD_FOR macro defined - Add host_supported: true for libskia gn_to_bp_utils.py: - Switch SkUserConfig.h from include guards to pragma once so it is easier to append to the end. This matches how Android generally includes headers. BUILD.gn: - Add skia_use_fixed_gamma_text so host build can use the same SK_GAMMA defines as the device. SkPreConfig.h: - Stop making SK_BUILD_FOR_ANDROID_FRAMEWORK imply SK_BUILD_FOR_ANDROID. The host build needs the former defined but not the latter. SkRegion.cpp/.h: - Make toString() SK_BUILD_FOR_ANDROID_FRAMEWORK so it can be called on the host. SkCamera.h/.cpp: - Switch methods to SK_BUILD_FOR_ANDROID_FRAMEWORK so they can be called on the host. - Make getCameraLocation*() const. They are logically const, and this allows removing a const_cast + TODO in hwui. Change-Id: I771f825d06380e01c0488fd1c00df1d8a2454dc0 Reviewed-on: https://skia-review.googlesource.com/c/171231 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-11-15 20:54:59 +00:00
if (skia_use_fixed_gamma_text) {
defines += [
"SK_GAMMA_EXPONENT=1.4",
"SK_GAMMA_CONTRAST=0.0",
]
}
if (is_skia_dev_build && !is_wasm) {
defines += [
"SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1",
"GR_TEST_UTILS=1",
]
if (skia_enable_graphite) {
defines += [ "GRAPHITE_TEST_UTILS=1" ]
}
}
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" ]
}
libs = []
lib_dirs = []
if (skia_use_gl && skia_use_angle) {
defines += [ "SK_ANGLE" ]
}
if (skia_use_vma) {
defines += [ "SK_USE_VMA" ]
}
if (skia_enable_winuwp) {
defines += [ "SK_WINUWP" ]
}
}
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
config("skia_library") {
visibility = [ "./*" ]
defines = [ "SKIA_IMPLEMENTATION=1" ]
}
skia_library_configs = [
":skia_public",
":skia_private",
":skia_library",
]
# Use for CPU-specific Skia code that needs particular compiler flags.
template("opts") {
if (invoker.enabled) {
skia_source_set(target_name) {
visibility = [ ":*" ]
check_includes = false
configs = skia_library_configs
forward_variables_from(invoker, "*")
if (defined(invoker.configs)) {
configs += invoker.configs
}
}
} else {
# If not enabled, a phony empty target that swallows all otherwise unused variables.
skia_source_set(target_name) {
visibility = [ ":*" ]
check_includes = false
forward_variables_from(invoker,
"*",
[
"sources",
"cflags",
])
}
}
}
is_x86 = current_cpu == "x64" || current_cpu == "x86"
opts("none") {
enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
sources = skia_opts.none_sources
cflags = []
}
opts("armv7") {
enabled = current_cpu == "arm"
sources = skia_opts.armv7_sources + skia_opts.neon_sources
cflags = []
}
opts("arm64") {
enabled = current_cpu == "arm64"
sources = skia_opts.arm64_sources
cflags = []
}
opts("crc32") {
enabled = current_cpu == "arm64"
sources = skia_opts.crc32_sources
cflags = [ "-march=armv8-a+crc" ]
}
opts("sse2") {
enabled = is_x86
sources = skia_opts.sse2_sources
if (!is_clang && is_win) {
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ]
} else {
cflags = [ "-msse2" ]
}
}
opts("ssse3") {
enabled = is_x86
sources = skia_opts.ssse3_sources
if (!is_clang && is_win) {
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ]
} else {
cflags = [ "-mssse3" ]
}
}
opts("sse41") {
enabled = is_x86
sources = skia_opts.sse41_sources
if (!is_clang && is_win) {
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ]
} else {
cflags = [ "-msse4.1" ]
}
}
opts("sse42") {
enabled = is_x86
sources = skia_opts.sse42_sources
if (!is_clang && is_win) {
defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ]
} else {
cflags = [ "-msse4.2" ]
}
}
opts("avx") {
enabled = is_x86
sources = skia_opts.avx_sources
if (is_win) {
cflags = [ "/arch:AVX" ]
} else {
cflags = [ "-mavx" ]
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
}
}
}
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
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 {
cflags = [ "-march=haswell" ]
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
}
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("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
}
}
}
# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
if (invoker.enabled) {
config(target_name + "_public") {
if (defined(invoker.public_defines)) {
defines = invoker.public_defines
}
if (defined(invoker.public_configs)) {
configs = invoker.public_configs
}
if (defined(invoker.public_include_dirs)) {
include_dirs = invoker.public_include_dirs
}
}
skia_source_set(target_name) {
visibility = [ ":*" ]
check_includes = false
configs = skia_library_configs
# "*" clobbers the current scope; append to existing configs
forward_variables_from(invoker,
"*",
[
"configs",
"public_defines",
"sources_for_tests",
"sources_when_disabled",
])
if (defined(invoker.configs)) {
configs += invoker.configs
}
all_dependent_configs = [ ":" + target_name + "_public" ]
}
if (defined(invoker.sources_for_tests) && skia_enable_tools) {
skia_source_set(target_name + "_tests") {
visibility = [ ":*" ]
check_includes = false
configs = skia_library_configs
# "*" clobbers the current scope; append to existing configs
forward_variables_from(invoker,
"*",
[
"configs",
"public_defines",
"sources",
"sources_for_tests",
"sources_when_disabled",
])
if (defined(invoker.configs)) {
configs += invoker.configs
}
testonly = true
sources = invoker.sources_for_tests
if (!defined(deps)) {
deps = []
}
deps += [ ":test" ]
all_dependent_configs = [ ":" + target_name + "_public" ]
}
}
} else {
skia_source_set(target_name) {
visibility = [ ":*" ]
configs = skia_library_configs
# "*" clobbers the current scope; append to existing configs
forward_variables_from(invoker,
"*",
[
"configs",
"public",
"public_defines",
Reland "Move gn setup for vulkan library/headers into their own third_party directory." This reverts commit 2c2a119f945eedaced4bf081347a53f05cf0c39c. Reason for revert: Relanding with fixes Original change's description: > Revert "Move gn setup for vulkan library/headers into their own third_party directory." > > This reverts commit 477094250cd55a38d4d796ab6c50eb57bdba65e1. > > Reason for revert: > I think we know this broke the MoltenVK bots. It also appears to have broken the Fuchsia roll: https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8945885190914943680%2F%2B%2Fsteps%2Fbuild%2F0%2Fsteps%2Fbuild_fuchsia%2F0%2Fsteps%2Fgn_gen%2F0%2Fstdout > > Original change's description: > > Move gn setup for vulkan library/headers into their own third_party directory. > > > > Bug: skia: > > Change-Id: I4605f0d962271efb77bf3c17f1b0daaaddfb51c8 > > Reviewed-on: https://skia-review.googlesource.com/128540 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com > > Change-Id: I6e41d98e39883eff34424a2f352b0c8adec178db > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/129444 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> Bug: skia: Change-Id: I26b4b1f7196dd1bd8bf2e7641ef741c90c742c81 Reviewed-on: https://skia-review.googlesource.com/129445 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-22 17:25:15 +00:00
"public_deps",
"deps",
"libs",
"frameworks",
"sources",
"sources_for_tests",
"sources_when_disabled",
])
if (defined(invoker.configs)) {
configs += invoker.configs
}
if (defined(invoker.sources_when_disabled)) {
sources = invoker.sources_when_disabled
}
}
if (defined(invoker.sources_for_tests)) {
skia_source_set(target_name + "_tests") {
visibility = [ ":*" ]
}
}
}
}
optional("android_utils") {
enabled = skia_enable_android_utils
public = [
"client_utils/android/BRDAllocator.h",
"client_utils/android/BitmapRegionDecoder.h",
"client_utils/android/FrontBufferedStream.h",
]
public_defines = [ "SK_ENABLE_ANDROID_UTILS" ]
sources = [
"client_utils/android/BitmapRegionDecoder.cpp",
"client_utils/android/FrontBufferedStream.cpp",
]
}
group("fontmgr_factory") {
public_deps = [ skia_fontmgr_factory ]
}
optional("fontmgr_empty_factory") {
enabled = true
sources = [ "src/ports/SkFontMgr_empty_factory.cpp" ]
}
optional("fontmgr_android") {
enabled = skia_enable_fontmgr_android
deps = [
":typeface_freetype",
"//third_party/expat",
]
public = [ "include/ports/SkFontMgr_android.h" ]
sources = [
"src/ports/SkFontMgr_android.cpp",
"src/ports/SkFontMgr_android_parser.cpp",
"src/ports/SkFontMgr_android_parser.h",
]
sources_for_tests = [ "tests/FontMgrAndroidParserTest.cpp" ]
}
optional("fontmgr_android_factory") {
enabled = skia_enable_fontmgr_android
deps = [ ":fontmgr_android" ]
sources = [ "src/ports/SkFontMgr_android_factory.cpp" ]
}
optional("fontmgr_custom") {
enabled =
skia_enable_fontmgr_custom_directory ||
skia_enable_fontmgr_custom_embedded || skia_enable_fontmgr_custom_empty
deps = [ ":typeface_freetype" ]
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" ]
}
optional("fontmgr_custom_directory_factory") {
enabled = skia_enable_fontmgr_custom_directory
deps = [ ":fontmgr_custom_directory" ]
sources = [ "src/ports/SkFontMgr_custom_directory_factory.cpp" ]
}
optional("fontmgr_custom_embedded") {
enabled = skia_enable_fontmgr_custom_embedded
deps = [
":fontmgr_custom",
":typeface_freetype",
]
sources = [ "src/ports/SkFontMgr_custom_embedded.cpp" ]
}
optional("fontmgr_custom_embedded_factory") {
enabled = skia_enable_fontmgr_custom_embedded
deps = [ ":fontmgr_custom_embedded" ]
sources = [ "src/ports/SkFontMgr_custom_embedded_factory.cpp" ]
}
optional("fontmgr_custom_empty") {
enabled = skia_enable_fontmgr_custom_empty
deps = [
":fontmgr_custom",
":typeface_freetype",
]
public = [ "include/ports/SkFontMgr_empty.h" ]
sources = [ "src/ports/SkFontMgr_custom_empty.cpp" ]
}
optional("fontmgr_custom_empty_factory") {
enabled = skia_enable_fontmgr_custom_empty
deps = [ ":fontmgr_custom_empty" ]
sources = [ "src/ports/SkFontMgr_custom_empty_factory.cpp" ]
}
optional("fontmgr_fontconfig") {
enabled = skia_enable_fontmgr_fontconfig
# The public header includes fontconfig.h and uses FcConfig*
public_deps = [ "//third_party:fontconfig" ]
public = [ "include/ports/SkFontMgr_fontconfig.h" ]
deps = [ ":typeface_freetype" ]
sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ]
sources_for_tests = [ "tests/FontMgrFontConfigTest.cpp" ]
}
optional("fontmgr_fontconfig_factory") {
enabled = skia_enable_fontmgr_fontconfig
deps = [ ":fontmgr_fontconfig" ]
sources = [ "src/ports/SkFontMgr_fontconfig_factory.cpp" ]
}
optional("fontmgr_FontConfigInterface") {
enabled = skia_enable_fontmgr_FontConfigInterface
deps = [
":typeface_freetype",
"//third_party:fontconfig",
]
public = [
"include/ports/SkFontConfigInterface.h",
"include/ports/SkFontMgr_FontConfigInterface.h",
]
sources = [
"src/ports/SkFontConfigInterface.cpp",
"src/ports/SkFontConfigInterface_direct.cpp",
"src/ports/SkFontConfigInterface_direct_factory.cpp",
"src/ports/SkFontConfigTypeface.h",
"src/ports/SkFontMgr_FontConfigInterface.cpp",
]
}
optional("fontmgr_FontConfigInterface_factory") {
enabled = skia_enable_fontmgr_FontConfigInterface
deps = [ ":fontmgr_FontConfigInterface" ]
sources = [ "src/ports/SkFontMgr_FontConfigInterface_factory.cpp" ]
}
optional("fontmgr_fuchsia") {
enabled = skia_enable_fontmgr_fuchsia
deps = []
if (is_fuchsia && using_fuchsia_sdk) {
deps += [ "//build/fuchsia/fidl:fuchsia.fonts" ]
} else {
deps = [ "//sdk/fidl/fuchsia.fonts" ]
}
public = [ "src/ports/SkFontMgr_fuchsia.h" ]
sources = [ "src/ports/SkFontMgr_fuchsia.cpp" ]
}
optional("fontmgr_mac_ct") {
enabled = skia_use_fonthost_mac
public = [
"include/ports/SkFontMgr_mac_ct.h",
"include/ports/SkTypeface_mac.h",
]
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",
]
Reland "Reland "Test mac system font variations."" This reverts commit 759f2613b5718a41672e77c4d091dafd503ae53a. Reason for revert: Fix bzl build. Original change's description: > Revert "Reland "Test mac system font variations."" > > This reverts commit ba55be671d57cb94bb300cf925714be562976dde. > > Reason for revert: G3 roll > > (08:59:24) ERROR: third_party/skia/HEAD/BUILD:926:10: Compiling third_party/skia/HEAD/tests/TypefaceMacTest.cpp failed: (Exit 1) driver_is_not_gcc failed: error executing command third_party/crosstool/v18/stable/toolchain/bin/driver_is_not_gcc '-frandom-seed=blaze-out/k8-fastbuild/bin/third_party/skia/HEAD/_objs/dm/TypefaceMacTest.pic.o' -DSK_USE_FREETYPE_EMBOLDEN ... (remaining 383 argument(s) skipped). [forge_remote_host=ixog19] > third_party/skia/HEAD/tests/TypefaceMacTest.cpp:31:45: error: unknown type name 'CTFontRef' > auto makeSystemFont = [](float size) -> CTFontRef { > ^ > third_party/skia/HEAD/tests/TypefaceMacTest.cpp:33:46: error: use of undeclared identifier 'kCTFontUIFontSystem' > return CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr); > ^ > 2 errors generated. > > Original change's description: > > Reland "Test mac system font variations." > > > > This reverts commit 4c0b9b90d63a155a7137dd1ebe08f74222051fb6. > > > > Reason for revert: Work around broken -Wrange-loop-analysis > > > > Original change's description: > > > Revert "Test mac system font variations." > > > > > > This reverts commit a612dc77d75fda3c9d7fb26ce3e2cd916e8c76cb. > > > > > > Reason for revert: Breaking iOS builds. > > > > > > Original change's description: > > > > Test mac system font variations. > > > > > > > > On macOS system fonts are special and sometimes have different behavior > > > > from fonts generated from data. Add a test which exercises several > > > > expectations about changing the variation on the system ui font. > > > > > > > > Bug: skia:10968 > > > > Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f > > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218 > > > > Commit-Queue: Ben Wagner <bungeman@google.com> > > > > Reviewed-by: Herb Derby <herb@google.com> > > > > > > TBR=bungeman@google.com,herb@google.com,drott@google.com > > > > > > Change-Id: Iccc05f25d827ab85c507b5f3bde936561349e2b8 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia:10968 > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372678 > > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > > > # Not skipping CQ checks because this is a reland. > > > > Bug: skia:10968 > > Change-Id: Ifddc6c5ada335d97f7796df7f6ea10577f6bc252 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372776 > > Commit-Queue: Ben Wagner <bungeman@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: skia:10968 > Change-Id: Ia5ff4ff827e3f79ff17b4d99458ffb45b7c36c58 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373277 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> Bug: skia:10968 Change-Id: Ieb79128745dc934a7469d84b27a9e9f3306704df Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373620 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Dominik Röttsches <drott@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-22 15:37:33 +00:00
sources_for_tests = [ "tests/TypefaceMacTest.cpp" ]
if (is_mac) {
frameworks = [
# AppKit symbols NSFontWeightXXX may be dlsym'ed.
"AppKit.framework",
"ApplicationServices.framework",
]
}
if (is_ios) {
frameworks = [
"CoreFoundation.framework",
"CoreGraphics.framework",
"CoreText.framework",
# UIKit symbols UIFontWeightXXX may be dlsym'ed.
"UIKit.framework",
]
}
}
optional("fontmgr_mac_ct_factory") {
enabled = skia_use_fonthost_mac
deps = [ ":fontmgr_mac_ct" ]
sources = [ "src/ports/SkFontMgr_mac_ct_factory.cpp" ]
}
optional("fontmgr_win") {
enabled = skia_enable_fontmgr_win
public = [ "include/ports/SkTypeface_win.h" ]
sources = [
"src/fonts/SkFontMgr_indirect.cpp",
"src/ports/SkFontMgr_win_dw.cpp",
"src/ports/SkScalerContext_win_dw.cpp",
"src/ports/SkScalerContext_win_dw.h",
"src/ports/SkTypeface_win_dw.cpp",
"src/ports/SkTypeface_win_dw.h",
]
}
optional("fontmgr_win_factory") {
enabled = skia_enable_fontmgr_win
deps = [ ":fontmgr_win" ]
sources = [ "src/ports/SkFontMgr_win_dw_factory.cpp" ]
}
optional("fontmgr_win_gdi") {
enabled = skia_enable_fontmgr_win_gdi
public = [ "include/ports/SkTypeface_win.h" ]
sources = [ "src/ports/SkFontHost_win.cpp" ]
libs = [ "Gdi32.lib" ]
}
if (skia_lex) {
skia_executable("sksllex") {
sources = [
"src/sksl/lex/DFA.h",
"src/sksl/lex/DFAState.h",
"src/sksl/lex/LexUtil.h",
"src/sksl/lex/Main.cpp",
"src/sksl/lex/NFA.cpp",
"src/sksl/lex/NFA.h",
"src/sksl/lex/NFAState.h",
"src/sksl/lex/NFAtoDFA.h",
"src/sksl/lex/RegexNode.cpp",
"src/sksl/lex/RegexNode.h",
"src/sksl/lex/RegexParser.cpp",
"src/sksl/lex/RegexParser.h",
"src/sksl/lex/TransitionTable.cpp",
"src/sksl/lex/TransitionTable.h",
]
include_dirs = [ "." ]
}
action("run_sksllex") {
script = "gn/run_sksllex.py"
deps = [ ":sksllex(//gn/toolchain:$host_toolchain)" ]
sources = [ "src/sksl/lex/sksl.lex" ]
# GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
# path that starts with target_out_dir and then uses ".." to back up into the src dir.
outputs = [
"$target_out_dir/" + rebase_path("src/sksl/SkSLLexer.h", target_out_dir),
# the script also modifies the corresponding .cpp file, but if we tell GN that it gets
# confused due to the same file being named by two different paths
]
sksllex_path = "$root_out_dir/"
sksllex_path += "sksllex"
if (host_os == "win") {
sksllex_path += ".exe"
}
args = [
rebase_path(sksllex_path),
rebase_path("bin/clang-format"),
rebase_path("bin/fetch-clang-format"),
rebase_path("src"),
]
}
} else {
group("run_sksllex") {
}
}
# `Compile SkSL Tests` relies on skslc.
if (skia_compile_sksl_tests) {
skia_executable("skslc") {
defines = [
"SKSL_STANDALONE",
"SK_DISABLE_TRACING",
"SK_ENABLE_SPIRV_CROSS",
"SK_ENABLE_SPIRV_VALIDATION",
]
sources = [
"src/core/SkArenaAlloc.cpp",
"src/core/SkBlockAllocator.cpp",
"src/core/SkCpu.cpp",
"src/core/SkData.cpp",
"src/core/SkHalf.cpp",
"src/core/SkMalloc.cpp",
"src/core/SkMath.cpp",
"src/core/SkMatrixInvert.cpp",
"src/core/SkSemaphore.cpp",
"src/core/SkStream.cpp",
"src/core/SkString.cpp",
"src/core/SkStringUtils.cpp",
"src/core/SkThreadID.cpp",
"src/core/SkUtils.cpp",
"src/core/SkVM.cpp",
"src/gpu/GrMemoryPool.cpp",
"src/ports/SkMemory_malloc.cpp",
"src/ports/SkOSFile_stdio.cpp",
"src/sksl/SkSLMain.cpp",
"src/utils/SkJSON.cpp",
"src/utils/SkJSONWriter.cpp",
"src/utils/SkParse.cpp",
"src/utils/SkShaderUtils.cpp",
"src/utils/SkUTF.cpp",
"src/utils/SkVMVisualizer.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",
":skvm_jit",
Roll spirv-tools and spirv-headers and use upstream GN files This will allow rolling spirv-tools and spirv-headers without additional manual changes to fix Skia's copy of their BUILD.gn files. Roll third_party/externals/spirv-headers/ c0df742ec..bcf55210f (59 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+log/c0df742ec0b8..bcf55210f13a $ git log c0df742ec..bcf55210f --date=short --no-merges --format='%ad %ae %s' 2020-07-03 dneto Support SPV_KHR_expect_assume 2020-07-03 dneto Support SPV_KHR_linkonce_odr 2021-03-01 alanbaker Change operand name in OpReadClockKHR to match extension 2021-02-13 dmalyshau Add Naga as SPIR-V generation tool 2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max 2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation 2021-01-19 dneto Header generator: Check enumerant ordering 2021-01-27 ben.ashbaugh add generated headers 2021-01-27 ben.ashbaugh add None as a possible value for DebugInfoFlags 2021-01-25 caio.oliveira Add SPV_KHR_workgroup_memory_explicit_layout 2021-01-20 dneto Push FPDenormMode, FPOperationMode to the end 2021-01-20 dmitry.sidorov Apply suggestions to Intel extensions PR 2020-12-16 dmitry.sidorov Update generated files 2020-12-16 dmitry.sidorov Add SPV_INTEL_long_constant_composite extension 2020-12-16 dmitry.sidorov Add SPV_INTEL_loop_fuse extension 2020-11-23 dmitry.sidorov Add SPV_INTEL_fpga_cluster_attributes and SPV_INTEL_fp_fast_math_mode 2020-11-23 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls extension 2020-11-16 dmitry.sidorov Update SPV_INTEL_kernel_attributes extension 2020-11-09 dmitry.sidorov Update SPV_INTEL_function_pointers extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_float_controls2 extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_vector_compute extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_fpga_memory_accesses extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_io_pipes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_variable_length_array extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_usm_storage_classes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_arbitrary_precision_integers extensions 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_inline_assembly extension 2020-11-03 dmitry.sidorov Upstream SPV_INTEL_fpga_buffer_location extension 2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension 2020-11-26 dkoch remove HitTKHR 2020-11-12 dneto MeshShadingNV enables builtins PrimitiveId, Layer, and ViewportIndex 2020-10-16 dkoch de-alias/reassign OpIgnoreIntersectionKHR/OpTerminateRayKHR 2020-06-29 alele Raytracing and Rayquery updates for final 2020-06-15 alele Updated headers for new trace/executeCallable and acceleration structure cast. 2020-11-05 orbea cmake: Install cmake files to CMAKE_INSTALL_DATADIR 2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175) 2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174) 2020-10-23 john Bump revision to 4, for SPIR-V 1.5. 2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170) 2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172) 2020-10-12 hwguy.siplus Register the Xenia emulator as a generator (#171) 2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169) 2020-09-10 syoussefi Register the ANGLE compiler (#168) 2020-09-08 cepheus Rebuild of latest headers, which slightly moves OpTerminateInvocation 2020-08-03 44190824+mmerecki Reserve SPIR-V token range for upcoming Intel extensions. (#165) 2020-07-29 alanbaker Update BUILD.bazel and BUILD.gn (#166) 2020-07-29 alanbaker Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164) 2020-07-29 johnkslang Update the registry in spir-v.xml to modernize and split out opcodes. (#156) 2020-07-21 alanbaker Support SPV_KHR_terminate_invocation (#163) 2020-07-19 vkushwaha Add changes for SPV_EXT_shader_atomic_float 2020-06-26 dj2 Register the Tint compiler 2020-06-01 dneto spir-v.xml: Use plain ASCII quotes in comment 2020-05-29 cepheus Rebuild headers against the previous grammar commit. 2020-05-29 dmitry.sidorov Apply suggestions 2020-04-05 dmitry.sidorov Add Intel specific definitions from KhronosGroup/SPIRV-LLVM-Translator 2020-05-29 cepheus Header build from previous grammar update. 2020-05-25 michael.kinsner Propose bit allocation mechanism for the FP Fast Math Mode bitfield, following from the mechanism previously added for the loop control bitfield. 2020-05-20 dneto Update example to use unified1 headers 2020-04-05 dmitry.sidorov Add SPV_INTEL_function_pointers preview extension Roll third_party/externals/spirv-tools/ e95fbfb1f..5d8c40399 (488 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/e95fbfb1f509..5d8c40399e1a $ git log e95fbfb1f..5d8c40399 --date=short --no-merges --format='%ad %ae %s' 2021-03-11 cwallez BUILD.gn: fix typo for 'cflags' (#4169) 2021-03-10 cwallez Suppress warning (#4168) 2021-03-10 alastair.donaldson spirv-fuzz: Avoid unnecessary dependency (#4165) 2021-03-10 dgkoch Add `void` in function declaration to keep some compilers happy (#4160) 2021-03-09 cwallez Fix -Wextra-semi-stmt -Wsuggest-destructor-override -Wdeprecated-copy-dtor (#4164) 2021-03-08 46493288+sfricke-samsung spirv-val: Vulkan 64-bit OpAtomicStore check (#4163) 2021-03-05 vasniktel spirv-fuzz: Fix the bug in TransformationReplaceBranchFromDeadBlockWithExit (#4140) 2021-03-05 vasniktel spirv-fuzz: Fix PartialCount (#4159) 2021-03-03 afd spirv-fuzz: Handle Vulkan SPIR-V versions (#4156) 2021-03-03 vasniktel spirv-fuzz: Add persistent state to the fuzzer (#4137) 2021-03-02 alanbaker Require an OpSelectionMerge before an OpSwitch (#4154) 2021-03-01 stevenperron Use standard function to get stdin to binary mode. (#4141) 2021-02-26 bclayton Fixes for the vscode language server extension (#4150) 2021-02-19 atte.seppala spirv-opt: Don't call GenerateCopy for mismatched image types (#4126) 2021-02-18 jaebaek Start SPIRV-Tools v2021.0 2021-02-18 jaebaek Finalize SPIRV-Tools v2020.7 2021-02-16 jaebaek Update CHANGES 2021-02-11 greg Generate differentiated error codes for buffer oob checking (#4144) 2021-02-10 dj2 Update a few virtuals to overrides. (#4143) 2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133) 2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134) 2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132) 2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119) 2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122) 2021-01-28 stevenperron Mark module as modified if convert-to-half removes decorations. (#4127) 2021-01-28 jaebaek Set correct scope and line info for DebugValue (#4125) 2021-01-27 caio.oliveira Validate SPV_KHR_workgroup_memory_explicit_layout (#4128) 2021-01-27 alanbaker Validate VK_KHR_zero_initialize_workgroup_memory (#4124) 2021-01-27 46493288+sfricke-samsung spirv-val: Add Vulkan image gather offset VUID (#4118) 2021-01-27 alanbaker Add cmake to windows path for kokoro (#4129) 2021-01-25 46493288+sfricke-samsung spirv-val: Label Vulkan atomic semantics VUIDs (#4120) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04662 (#4123) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04683 (#4121) 2021-01-22 machenbach Remove obsolete GN config (#4110) 2021-01-20 46493288+sfricke-samsung spirv-val: Add Vulkan EXT builtins (#4115) 2021-01-20 dneto Support pending Intel extensions (#4116) 2021-01-19 dneto Validate Sampled=1 for Vulkan ImageQuerySizeLod, ImageQueryLevels, ImageQueryLod (#4103) 2021-01-19 46493288+sfricke-samsung spirv-val: Add Vulkan Memory Scope VUs (#4106) 2021-01-18 bclayton Migrate all Kokoro build scripts over to use the docker VM image (#4114) 2021-01-15 46493288+sfricke-samsung spirv-val: Add Vulkan Addressing Model check (#4107) 2021-01-14 rharrison Remove WebGPU support (#4108) 2021-01-14 46493288+sfricke-samsung spirv-val: Vulkan atomic storage class (#4079) 2021-01-13 jaebaek Avoid integrity check failures caused by propagating line instructions (#4096) 2021-01-13 pierremoreau Linker usability improvements (#4084) 2021-01-12 dj2 Revert "Generate differentiated error codes for buffer oob checking (#4097)" (#4100) 2021-01-11 greg Generate differentiated error codes for buffer oob checking (#4097) 2021-01-07 dneto use std::string::empty() to test for emptiness (#4098) 2021-01-07 46493288+sfricke-samsung spirv-val: Label standalone Vulkan VUID (#4091) 2021-01-06 46493288+sfricke-samsung spirv-val: Add Vulkan decroation VUID (#4090) 2021-01-06 stevenperron Fix binding number calculation in desc sroa (#4095) (...) 2020-05-19 vasniktel spirv-fuzz: Remove FuzzerPassAddUsefulConstructs (#3341) 2020-05-19 vasniktel Add support for StorageBuffer (#3348) 2020-05-19 462213+sl1pkn07 Prevent Effcee install his things when build spirv-tools with testing enabled (#3256) 2020-05-19 stevenperron Don't register edges twice in merge return (#3350) 2020-05-14 stevenperron Revert "Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342)" (#3345) 2020-05-14 afdx spirv-reduce: Remove unused struct members (#3329) 2020-05-14 andreperezmaselco.developer Add adjust branch weights transformation (#3336) 2020-05-13 stevenperron Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342) 2020-05-13 jaebaek [spirv-opt] refactor inlining pass (#3328) 2020-05-13 afdx spirv-reduce: Remove unused uniforms and similar (#3321) 2020-05-13 afdx spirv-fuzz: Fix to fact manager (#3339) 2020-05-13 afdx spirv-fuzz: Get rid of unnecessary template method (#3340) 2020-05-12 stevenperron Do merge return if the return is not at the end of the function. (#3337) 2020-05-06 jaebaek Preserve debug info for wrap-opkill (#3331) 2020-05-05 jbolz Validate ShaderCallKHR memory scope (#3332) 2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (#3316) 2020-04-30 paulthomson reduce: increase default step limit (#3327) 2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (#3325) 2020-04-28 stevenperron Delete nullptr in function bb list immedietly (#3326) 2020-04-28 jaebaek Set DebugScope for termination instructions (#3323) 2020-04-28 afdx spirv-fuzz: Do not outline regions that end with a loop header (#3312) 2020-04-27 bclayton vscode: Handle '|' chains on BitEnum / ValueEnum (#3309) 2020-04-27 jaebaek Add debug information analysis (#3305) 2020-04-27 dneto Add spvtools::opt::Operand::AsLiteralUint64 (#3320) 2020-04-27 afdx spirv-fuzz: Pass on validator options during shrinking (#3317) 2020-04-27 afdx spirv-fuzz: Clamp statically out-of-bounds accesses in code donation (#3315) 2020-04-27 afdx spirv-fuzz: Fix memory management in the fact manager (#3313) 2020-04-27 afdx spirv-fuzz: Do not replace the Sample argument in OpImageTexelPointer (#3311) 2020-04-23 afdx Allow various validation options to be passed to spirv-opt (#3314) 2020-04-23 Chaitanyas0101 typo fix: in README.md exectuable->executable (#3306) 2020-04-20 afdx spirv-fuzz: Make handling of synonym facts more efficient (#3301) 2020-04-15 stevenperron Remove unreachable code. (#3304) 2020-04-15 afdx spirv-fuzz: Fix to outliner (#3302) 2020-04-14 afdx spirv-fuzz: Do not outline regions that produce pointer outputs (#3291) 2020-04-14 afdx spirv-fuzz: Handle OpRuntimeArray when replacing ids with synonyms (#3292) 2020-04-14 afdx spirv-fuzz: Handle image storage class in donation (#3290) 2020-04-14 afdx spirv-fuzz: Respect rules for OpSampledImage (#3287) 2020-04-14 afdx spirv-fuzz: Fix comment. (#3300) 2020-04-14 stevenperron Sampled images as read-only storage (#3295) 2020-04-14 alanbaker Remove implicit fallthrough (#3298) 2020-04-14 stevenperron Add tests for recently added command line option (#3297) 2020-04-14 dneto If SPIRV-Headers is in our tree, include it as subproject (#3299) 2020-04-13 stevenperron Struct CFG analysus and single block loop (#3293) 2020-04-13 jaebaek Preserve debug info in eliminate-dead-functions (#3251) 2020-04-13 stevenperron Update acorn version (#3294) 2020-04-09 stevenperron Handle more cases in dead member elim (#3289) 2020-04-09 h.baensch.92 Fix pch macro to ignore clang-cl (#3283) 2020-04-07 afdx spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 afdx spirv-fuzz: Handle more general SPIR-V in donation (#3280) 2020-04-06 afdx spirv-fuzz: Improve support for compute shaders in donation (#3277) Created with: roll-dep third_party/externals/spirv-headers third_party/externals/spirv-tools Bug: dawn:706 Change-Id: I4ca1acd84b4905cf5454e146a917e36fc8c2d399 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381237 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Stephen White <senorblanco@google.com> Reviewed-by: Eric Boren <borenet@google.com>
2021-03-08 14:25:34 +00:00
"//third_party/externals/spirv-tools:spvtools",
"//third_party/externals/spirv-tools:spvtools_val",
"//third_party/spirv-cross:spirv_cross",
]
}
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"
}
copy("sksl_pre_includes") {
sources = [
"src/sksl/sksl_frag.sksl",
"src/sksl/sksl_gpu.sksl",
"src/sksl/sksl_public.sksl",
"src/sksl/sksl_rt_shader.sksl",
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
"src/sksl/sksl_vert.sksl",
]
outputs = [ "$root_out_dir/{{source_file_part}}" ]
}
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
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"
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
deps = [
":sksl_pre_includes",
":skslc(//gn/toolchain:$host_toolchain)",
]
sources = dehydrate_sksl_sources
outputs = dehydrate_sksl_outputs
Revert "Untangle dependency cycle in sksl dehydration" This reverts commit a1ed0dc9f81255351eefe999975408f7afb32cfd. Reason for revert: Bots will need some guidance to ingest this CL Original change's description: > Untangle dependency cycle in sksl dehydration > > NOTE: If you have any out directories with skia_compile_processors > enabled, you will likely need to run `gn clean <dir>` > > 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. > > Bug: skia:10571 > Change-Id: I246360cec387b17d017805ed42ab6424329e32e7 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308760 > Reviewed-by: Mike Klein <mtklein@google.com> > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: Id0f3f6e18474f7531b8531cfa481031c26b88d51 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:10571 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308802 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-07 21:28:12 +00:00
args = [
rebase_path(skslc_path),
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
rebase_path("src/sksl/generated"),
Revert "Untangle dependency cycle in sksl dehydration" This reverts commit a1ed0dc9f81255351eefe999975408f7afb32cfd. Reason for revert: Bots will need some guidance to ingest this CL Original change's description: > Untangle dependency cycle in sksl dehydration > > NOTE: If you have any out directories with skia_compile_processors > enabled, you will likely need to run `gn clean <dir>` > > 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. > > Bug: skia:10571 > Change-Id: I246360cec387b17d017805ed42ab6424329e32e7 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308760 > Reviewed-by: Mike Klein <mtklein@google.com> > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: Id0f3f6e18474f7531b8531cfa481031c26b88d51 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:10571 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308802 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-07 21:28:12 +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
args += rebase_path(dehydrate_sksl_sources)
}
} else {
group("dehydrate_sksl") {
}
}
if (skia_compile_sksl_tests) {
import("gn/sksl_tests.gni")
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)",
]
sources = []
outputs = []
response_file_contents = []
args = [
rebase_path(skslc_path),
invoker.lang,
invoker.settings,
"{{response_file_name}}",
]
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")
# We want to support double-extensions (for '.dsl.cpp') but GN doesn't natively handle this.
# Workaround: http://go/ggroup/a/chromium.org/g/gn-dev/c/RdEpjeYtb-4
# For input path "file.aa.bb", name will contain "file" and ext will contain ".aa.bb".
# For input path "file.cc", name will contain "file" and ext will contain ".cc".
nameTmp = get_path_info(dst, "name")
name = get_path_info(nameTmp, "name")
ext = get_path_info(nameTmp, "extension")
ext += get_path_info(dst, "extension")
response_file_contents += rebase_path([
src,
dir,
])
sources += [ src ]
foreach(outExtension, invoker.outExtensions) {
# SPIR-V uses separate extensions for .vert shaders.
if (ext == "vert" && outExtension == ".asm.frag") {
outExtension = ".asm.vert"
}
outputs +=
[ target_out_dir + "/" +
rebase_path(dir + "/" + name + outExtension, target_out_dir) ]
}
}
}
}
compile_sksl("glsl_tests") {
sources = sksl_glsl_tests_sources + sksl_glsl_settings_tests_sources
outExtensions = [ ".glsl" ]
lang = "--glsl"
settings = "--settings"
}
compile_sksl("glsl_nosettings_tests") {
sources = sksl_glsl_settings_tests_sources
outExtensions = [ "StandaloneSettings.glsl" ]
lang = "--glsl"
settings = "--nosettings"
}
compile_sksl("metal_tests") {
sources = sksl_metal_tests_sources
outExtensions = [ ".metal" ]
lang = "--metal"
settings = "--settings"
}
compile_sksl("skvm_tests") {
sources = sksl_skvm_tests_sources
outExtensions = [ ".skvm" ]
lang = "--skvm"
settings = "--settings"
}
compile_sksl("stage_tests") {
sources = sksl_stage_tests_sources
outExtensions = [ ".stage" ]
lang = "--stage"
settings = "--settings"
}
compile_sksl("spirv_tests") {
sources = sksl_spirv_tests_sources
outExtensions = [ ".asm.frag" ]
lang = "--spirv"
settings = "--settings"
}
} else {
group("compile_sksl_glsl_tests") {
}
group("compile_sksl_glsl_nosettings_tests") {
}
group("compile_sksl_metal_tests") {
}
group("compile_sksl_skvm_tests") {
}
group("compile_sksl_spirv_tests") {
}
}
optional("gpu_shared") {
enabled = skia_enable_gpu || skia_enable_graphite
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
}
optional("gpu") {
enabled = skia_enable_gpu
deps = [
":compile_sksl_glsl_nosettings_tests",
":compile_sksl_glsl_tests",
":compile_sksl_metal_tests",
":compile_sksl_skvm_tests",
":compile_sksl_spirv_tests",
":dehydrate_sksl",
":gpu_shared",
":run_sksllex",
]
if (skia_generate_workarounds) {
deps += [ ":workaround_list" ]
}
public_defines = []
public_configs = []
Reland "Move gn setup for vulkan library/headers into their own third_party directory." This reverts commit 2c2a119f945eedaced4bf081347a53f05cf0c39c. Reason for revert: Relanding with fixes Original change's description: > Revert "Move gn setup for vulkan library/headers into their own third_party directory." > > This reverts commit 477094250cd55a38d4d796ab6c50eb57bdba65e1. > > Reason for revert: > I think we know this broke the MoltenVK bots. It also appears to have broken the Fuchsia roll: https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8945885190914943680%2F%2B%2Fsteps%2Fbuild%2F0%2Fsteps%2Fbuild_fuchsia%2F0%2Fsteps%2Fgn_gen%2F0%2Fstdout > > Original change's description: > > Move gn setup for vulkan library/headers into their own third_party directory. > > > > Bug: skia: > > Change-Id: I4605f0d962271efb77bf3c17f1b0daaaddfb51c8 > > Reviewed-on: https://skia-review.googlesource.com/128540 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com > > Change-Id: I6e41d98e39883eff34424a2f352b0c8adec178db > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/129444 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> Bug: skia: Change-Id: I26b4b1f7196dd1bd8bf2e7641ef741c90c742c81 Reviewed-on: https://skia-review.googlesource.com/129445 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-22 17:25:15 +00:00
public_deps = []
sources = skia_gpu_sources
if (!skia_enable_skgpu_v1) {
sources -= skia_skgpu_v1_sources
}
libs = []
frameworks = []
if (skia_use_gl) {
public_defines += [ "SK_GL" ]
if (is_android) {
sources += [
"src/gpu/gl/egl/GrGLMakeEGLInterface.cpp",
"src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp",
]
# this lib is required to link against AHardwareBuffer
if (defined(ndk_api) && ndk_api >= 26) {
libs += [ "android" ]
}
} else if (skia_use_egl) {
sources += [
"src/gpu/gl/egl/GrGLMakeEGLInterface.cpp",
"src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp",
]
libs += [ "EGL" ]
} else if (skia_use_webgl) {
sources += [ "src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp" ]
} else if (is_linux && skia_use_x11) {
sources += [
"src/gpu/gl/glx/GrGLMakeGLXInterface.cpp",
"src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp",
]
libs += [ "GL" ]
} else if (is_mac) {
sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
} else if (is_ios) {
sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
} else if (is_win && !skia_enable_winuwp) {
sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
if (target_cpu != "arm64") {
libs += [ "OpenGL32.lib" ]
}
} else {
sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
}
sources += skia_gl_gpu_sources
}
if (skia_use_vulkan) {
public_defines += [ "SK_VULKAN" ]
if (skia_use_vma) {
deps += [ "third_party/vulkanmemoryallocator" ]
}
sources += skia_vk_sources
if (skia_enable_vulkan_debug_layers) {
public_defines += [ "SK_ENABLE_VK_LAYERS" ]
}
if (is_fuchsia) {
if (using_fuchsia_sdk) {
public_deps += [ "$fuchsia_sdk_root/pkg:vulkan" ]
} else {
public_deps += [ "//src/graphics/lib/vulkan" ]
}
}
}
Reland "Move gn setup for vulkan library/headers into their own third_party directory." This reverts commit 2c2a119f945eedaced4bf081347a53f05cf0c39c. Reason for revert: Relanding with fixes Original change's description: > Revert "Move gn setup for vulkan library/headers into their own third_party directory." > > This reverts commit 477094250cd55a38d4d796ab6c50eb57bdba65e1. > > Reason for revert: > I think we know this broke the MoltenVK bots. It also appears to have broken the Fuchsia roll: https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8945885190914943680%2F%2B%2Fsteps%2Fbuild%2F0%2Fsteps%2Fbuild_fuchsia%2F0%2Fsteps%2Fgn_gen%2F0%2Fstdout > > Original change's description: > > Move gn setup for vulkan library/headers into their own third_party directory. > > > > Bug: skia: > > Change-Id: I4605f0d962271efb77bf3c17f1b0daaaddfb51c8 > > Reviewed-on: https://skia-review.googlesource.com/128540 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com > > Change-Id: I6e41d98e39883eff34424a2f352b0c8adec178db > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/129444 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> Bug: skia: Change-Id: I26b4b1f7196dd1bd8bf2e7641ef741c90c742c81 Reviewed-on: https://skia-review.googlesource.com/129445 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-22 17:25:15 +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" ]
}
}
if (skia_use_dawn) {
public_defines += [ "SK_DAWN" ]
sources += skia_dawn_sources
public_deps += [ "//third_party/externals/dawn/include/dawn:cpp_headers" ]
deps += [
"//third_party/externals/dawn/src/dawn:cpp",
"//third_party/externals/dawn/src/dawn:proc",
]
Reland "Enable non-standalone builds with dawn" This reverts commit 122f1b936fece081c14f07b2b1dc750ad551665c. Reason for revert: unrelated to G3 failure? Original change's description: > Revert "Enable non-standalone builds with dawn" > > This reverts commit 25deba3516bc3dbce9c1a1c7db6f66e95e9d0de4. > > Reason for revert: Possible Google3 roll break > > Original change's description: > > Enable non-standalone builds with dawn > > > > Bug: skia:12276 > > Change-Id: Iaf7311fef43bd9c37bfc7b7a6221f6bea25f196d > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433696 > > Auto-Submit: Safa Sofuoglu <safasofuoglu@gmail.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Stephen White <senorblanco@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,senorblanco@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com,safasofuoglu@gmail.com > > Change-Id: I05dc7e1107ae08d4c9d4a7663704eb14f711208d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:12276 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471757 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Julia Lavrova <jlavrova@google.com> # Not skipping CQ checks because this is a reland. Bug: skia:12276 Change-Id: Ifca6eaba59083afef4bb7a1ee73de1b8538b383b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471761 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
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) {
deps += [ "//third_party/externals/dawn/src/dawn/native" ]
Reland "Enable non-standalone builds with dawn" This reverts commit 122f1b936fece081c14f07b2b1dc750ad551665c. Reason for revert: unrelated to G3 failure? Original change's description: > Revert "Enable non-standalone builds with dawn" > > This reverts commit 25deba3516bc3dbce9c1a1c7db6f66e95e9d0de4. > > Reason for revert: Possible Google3 roll break > > Original change's description: > > Enable non-standalone builds with dawn > > > > Bug: skia:12276 > > Change-Id: Iaf7311fef43bd9c37bfc7b7a6221f6bea25f196d > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433696 > > Auto-Submit: Safa Sofuoglu <safasofuoglu@gmail.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Stephen White <senorblanco@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,senorblanco@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com,safasofuoglu@gmail.com > > Change-Id: I05dc7e1107ae08d4c9d4a7663704eb14f711208d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:12276 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471757 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Julia Lavrova <jlavrova@google.com> # Not skipping CQ checks because this is a reland. Bug: skia:12276 Change-Id: Ifca6eaba59083afef4bb7a1ee73de1b8538b383b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471761 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-11-15 19:08:02 +00:00
}
if (dawn_enable_d3d12) {
libs += [
"d3d12.lib",
"dxgi.lib",
"d3dcompiler.lib",
]
} else if (dawn_enable_metal) {
frameworks += [ "Metal.framework" ]
}
}
if (skia_use_direct3d) {
public_defines += [ "SK_DIRECT3D" ]
deps += [ "//third_party/d3d12allocator" ]
sources += skia_direct3d_sources
if (skia_enable_direct3d_debug_layer) {
public_defines += [ "SK_ENABLE_D3D_DEBUG_LAYER" ]
}
libs += [
"d3d12.lib",
"dxgi.lib",
"d3dcompiler.lib",
]
}
cflags_objcc = []
if (skia_use_metal) {
public_defines += [ "SK_METAL" ]
sources += skia_metal_sources
if (skia_enable_metal_debug_info) {
public_defines += [ "SK_ENABLE_MTL_DEBUG_INFO" ]
}
frameworks += [ "Metal.framework" ]
frameworks += [ "Foundation.framework" ]
if (is_ios) {
frameworks += [ "UIKit.framework" ]
}
cflags_objcc += [ "-fobjc-arc" ]
}
if (is_debug) {
public_defines += [ "SK_ENABLE_DUMP_GPU" ]
}
}
optional("gif") {
enabled = !skia_use_wuffs && skia_use_libgifcodec
_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)
}
}
optional("heif") {
enabled = skia_use_libheif
public_defines = [ "SK_HAS_HEIF_LIBRARY" ]
[infra] Add Bazel rules for codecs. This ports the third_party BUILD.gn files related to codecs (with a best-effort on arm/SIMD stuff). This includes: - libpng - libjpeg-turbo - libwebp - wuffs (gif) - libgifcodec - dng_sdk and piex (raw codec) This expands the string_flag_with_values macro to allow multiple values to be set at once. This was added in Bazel 5.0.0, however the latest pre-release version of that has a bug [1] which slows down compilation dramatically. This was fixed at ToT, but not released. As a result, I started using the Bazel 6 pre-release (via bazelisk). The macro select_multi makes writing select() where multiple elements could be on possible/easier. One can try compiling certain codecs by running: bazel build :skia-core --config clang --include_codec=raw_codec --include_codec=png_codec Suggested Review Order: - bazel/macros.bzl - bazel/common_config_settings/defs.bzl and its BUILD.bazel to see how the codec options are defined. - BUILD.bazel to see how the codec settings are used. - src/codec/BUILD.bazel to see the inclusion of Skia files to deal with specific codecs. - third_party/BUILD.bazel (while referencing the corresponding BUILD.gn files, such as third_party/libwebp/BUILD.gn) - Everything else. Change-Id: I797375a35fa345d9835e7b2a2ab23371c45953c3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469456 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
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.
deps = []
sources = [ "src/codec/SkHeifCodec.cpp" ]
}
optional("jpeg_decode") {
enabled = skia_use_libjpeg_turbo_decode
public_defines = [ "SK_CODEC_DECODES_JPEG" ]
deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
sources = [
Revert "Split building encoding from decoding" This reverts commit 94aaf7cdf57d7e3374a8b5bbd15aa9ae570cb5de. Reason for revert: you know what I already typed the reason stop making rules that people have to follow, robots. Original change's description: > Split building encoding from decoding > > Bug: skia:9756 > > In CanvasKit, a large part of the binary is for encoding. Clients > would be happier with a smaller binary and no webp/jpeg encoding. Make > this an option by splitting up the GN arguments. > > Split SK_HAS_WEBP_LIBRARY into SK_CODEC_DECODES_WEBP (to match the > existing SK_CODEC_DECODES_RAW) and SK_ENCODE_WEBP. Same for JPEG and > PNG. > > Update CanvasKit compile script to disable webp and jpeg encoding. > Update debugger compile script to disable all encoding. > > Change IsPng signature to match other SkCodecs. > > Change-Id: Iec8466ee1b76bc3d1e377c24201068b776cd7718 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273768 > Commit-Queue: Leon Scroggins <scroggo@google.com> > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Reviewed-by: Kevin Lubick <kjlubick@google.com> > Reviewed-by: Nathaniel Nifong <nifong@google.com> TBR=djsollen@google.com,scroggo@google.com,kjlubick@google.com,nifong@google.com Change-Id: I4fc2ea916743fda7e7d0d668b59e52052e880104 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:9756 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275710 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-06 21:39:05 +00:00
"src/codec/SkJpegCodec.cpp",
"src/codec/SkJpegDecoderMgr.cpp",
"src/codec/SkJpegUtility.cpp",
]
}
optional("jpeg_encode") {
enabled = skia_use_libjpeg_turbo_encode
public_defines = [ "SK_ENCODE_JPEG" ]
deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
public = [ "include/encode/SkJpegEncoder.h" ]
sources = [
"src/images/SkJPEGWriteUtility.cpp",
"src/images/SkJpegEncoder.cpp",
]
}
optional("jpegxl_decode") {
enabled = skia_use_libjxl_decode
public_defines = [ "SK_CODEC_DECODES_JPEGXL" ]
deps = [ "//third_party/libjxl" ]
sources = [ "src/codec/SkJpegxlCodec.cpp" ]
}
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",
]
libs = [ "jnigraphics" ]
}
optional("graphite") {
libs = []
frameworks = []
enabled = skia_enable_graphite
deps = [ ":gpu_shared" ]
public_defines = [ "SK_GRAPHITE_ENABLED" ]
public = skia_graphite_public
sources = skia_graphite_sources
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" ]
if (is_ios) {
frameworks += [ "UIKit.framework" ]
}
}
}
optional("pdf") {
enabled = skia_use_zlib && skia_enable_pdf
public_defines = [ "SK_SUPPORT_PDF" ]
deps = [ "//third_party/zlib" ]
if (skia_use_libjpeg_turbo_decode) {
deps += [ ":jpeg_decode" ]
}
if (skia_use_libjpeg_turbo_encode) {
deps += [ ":jpeg_encode" ]
}
public = skia_pdf_public
sources = skia_pdf_sources
sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
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) {
deps += [ "//third_party/sfntly" ]
defines = [ "SK_PDF_USE_SFNTLY" ]
}
}
optional("xps") {
enabled = skia_use_xps && is_win
public_defines = [ "SK_SUPPORT_XPS" ]
public = skia_xps_public
sources = skia_xps_sources
}
optional("png_decode") {
enabled = skia_use_libpng_decode
public_defines = [ "SK_CODEC_DECODES_PNG" ]
deps = [ "//third_party/libpng" ]
sources = [
"src/codec/SkIcoCodec.cpp",
"src/codec/SkPngCodec.cpp",
]
}
optional("png_encode") {
enabled = skia_use_libpng_encode
public_defines = [ "SK_ENCODE_PNG" ]
deps = [ "//third_party/libpng" ]
sources = [ "src/images/SkPngEncoder.cpp" ]
}
optional("raw") {
enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo_decode && skia_use_piex
public_defines = [ "SK_CODEC_DECODES_RAW" ]
deps = [
"//third_party/dng_sdk",
"//third_party/libjpeg-turbo:libjpeg",
"//third_party/piex",
]
# SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of
# Skia.
configs = [ "gn/portable:add_exceptions" ]
sources = [ "src/codec/SkRawCodec.cpp" ]
}
import("third_party/skcms/skcms.gni")
skia_source_set("skcms") {
cflags = []
if (!is_win || is_clang) {
cflags += [
"-w",
"-std=c11",
]
}
public = [ "include/third_party/skcms/skcms.h" ]
include_dirs = [ "include/third_party/skcms" ]
sources = rebase_path(skcms_sources, ".", "third_party/skcms")
}
optional("typeface_freetype") {
enabled = skia_use_freetype
deps = [ "//third_party/freetype2" ]
sources = [
"src/ports/SkFontHost_FreeType.cpp",
"src/ports/SkFontHost_FreeType_common.cpp",
"src/ports/SkFontHost_FreeType_common.h",
]
}
optional("webp_decode") {
enabled = skia_use_libwebp_decode
public_defines = [ "SK_CODEC_DECODES_WEBP" ]
deps = [ "//third_party/libwebp" ]
sources = [ "src/codec/SkWebpCodec.cpp" ]
}
optional("webp_encode") {
enabled = skia_use_libwebp_encode
public_defines = [ "SK_ENCODE_WEBP" ]
deps = [ "//third_party/libwebp" ]
sources = [ "src/images/SkWebpEncoder.cpp" ]
}
optional("wuffs") {
enabled = skia_use_wuffs
public_defines = [ "SK_HAS_WUFFS_LIBRARY" ]
deps = [ "//third_party/wuffs" ]
sources = [ "src/codec/SkWuffsCodec.cpp" ]
}
optional("xml") {
enabled = skia_use_expat
Revert "Revert "GN: define SK_XML to indicate :xml is enabled."" This reverts commit 7e8f80a08444f534376a25d45194c92f948c9594. Reason for revert: the SVG DM flakiness should be fixed by now. Original change's description: > Revert "GN: define SK_XML to indicate :xml is enabled." > > This reverts commit 7234448c11b0493a072723acd185dae986103df6. > > Reason for revert: this enabled tests which are making the bots flaky. > > Original change's description: > > GN: define SK_XML to indicate :xml is enabled. > > > > Without this, nothing ever defines SK_XML for dm/DM.cpp, dm/DMSrcSink.cpp, tests/SkDOMTest.cpp or tests/SkPEGTest.cpp. > > > > GYP does something similiar in gyp/xml.gyp. > > > > BUG=skia: > > > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4500 > > > > Change-Id: I93322722d6d86f5802495d7a2edad2f82ba36f69 > > Reviewed-on: https://skia-review.googlesource.com/4500 > > Reviewed-by: Hal Canary <halcanary@google.com> > > Commit-Queue: Eric Boren <borenet@google.com> > > Commit-Queue: Mike Klein <mtklein@chromium.org> > > > > TBR=mtklein@chromium.org,borenet@google.com,halcanary@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I46c198f4985f6e7f96c07b3100a3877ba46fdb18 > Reviewed-on: https://skia-review.googlesource.com/4526 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,borenet@google.com,halcanary@google.com,fmalita@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic3225f119dff3c6949a3b559ac60707d36bc3792 Reviewed-on: https://skia-review.googlesource.com/4544 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-11-08 16:07:52 +00:00
public_defines = [ "SK_XML" ]
deps = [ "//third_party/expat" ]
sources = [
"src/svg/SkSVGCanvas.cpp",
"src/svg/SkSVGDevice.cpp",
"src/xml/SkDOM.cpp",
"src/xml/SkXMLParser.cpp",
"src/xml/SkXMLWriter.cpp",
]
}
optional("skvm_jit") {
enabled = skia_enable_skvm_jit_when_possible
public_defines = [ "SKVM_JIT_WHEN_POSSIBLE" ]
if (skia_vtune_path != "") {
public_defines += [ "SKVM_JIT_VTUNE" ]
public_include_dirs = [ "$skia_vtune_path/include" ]
libs = [ "$skia_vtune_path/lib64/jitprofiling.lib" ]
}
}
if (skia_enable_gpu && skia_generate_workarounds) {
action("workaround_list") {
script = "tools/build_workaround_header.py"
inputs = [ "src/gpu/gpu_workaround_list.txt" ]
# 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.
output_file =
rebase_path("include/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir)
outputs = [ "$root_out_dir/$output_file" ]
args = [
"--output-file",
"$output_file",
]
foreach(file, inputs) {
args += [ rebase_path(file, root_build_dir) ]
}
}
}
skia_component("skia") {
public_configs = [ ":skia_public" ]
configs = skia_library_configs
public_deps = [
":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",
":gpu",
":graphite",
":pdf",
":skcms",
":xps",
]
deps = [
":android_utils",
":arm64",
":armv7",
":avx",
":crc32",
":fontmgr_factory",
":gif",
":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",
":jpeg_decode",
":jpeg_encode",
":jpegxl_decode",
":ndk_images",
":none",
":png_decode",
":png_encode",
":raw",
":skvm_jit",
":skx",
":sse2",
":sse41",
":sse42",
":ssse3",
":webp_decode",
":webp_encode",
":wuffs",
":xml",
]
public = skia_core_public
public += skia_utils_public
public += skia_effects_public
public += skia_effects_imagefilter_public
sources = []
sources += skia_core_sources
sources += skia_utils_sources
Reland "simplify disabling effect deserialization" This reverts commit 34d7a163a4a749d6e91cf768d0f1767e8da6ceb2. Reason for revert: ok now? Original change's description: > Revert "simplify disabling effect deserialization" > > This reverts commit 5bbf790b5beeb2ed74f04551502259b54ac5556f. > > Reason for revert: flutter GN needs some love > > Original change's description: > > simplify disabling effect deserialization > > > > Switch to a simple #define instead of conditional build targets. > > > > No one changes skia_enable_effects or skia_enable_effects_imagefilters, > > so we can merge all that together back into :skia. > > > > Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7 > > Reviewed-on: https://skia-review.googlesource.com/c/169220 > > Reviewed-by: Kevin Lubick <kjlubick@google.com> > > Commit-Queue: Mike Klein <mtklein@google.com> > > TBR=mtklein@google.com,kjlubick@google.com > > Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/169222 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,kjlubick@google.com Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Release-Flutter_Android Change-Id: I534346c3ef3561a871f1af6df976bfee0b48014a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/169640 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-08 12:08:05 +00:00
sources += skia_effects_sources
sources += skia_effects_imagefilter_sources
sources += [
"src/android/SkAndroidFrameworkUtils.cpp",
"src/android/SkAnimatedImage.cpp",
"src/codec/SkAndroidCodec.cpp",
"src/codec/SkAndroidCodecAdapter.cpp",
"src/codec/SkBmpBaseCodec.cpp",
"src/codec/SkBmpCodec.cpp",
"src/codec/SkBmpMaskCodec.cpp",
"src/codec/SkBmpRLECodec.cpp",
"src/codec/SkBmpStandardCodec.cpp",
"src/codec/SkCodec.cpp",
"src/codec/SkCodecImageGenerator.cpp",
"src/codec/SkColorTable.cpp",
"src/codec/SkEncodedInfo.cpp",
"src/codec/SkMaskSwizzler.cpp",
"src/codec/SkMasks.cpp",
"src/codec/SkParseEncodedOrigin.cpp",
"src/codec/SkSampledCodec.cpp",
"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",
"src/codec/SkSwizzler.cpp",
"src/codec/SkWbmpCodec.cpp",
"src/images/SkImageEncoder.cpp",
"src/ports/SkDiscardableMemory_none.cpp",
Reland "simplify disabling effect deserialization" This reverts commit 34d7a163a4a749d6e91cf768d0f1767e8da6ceb2. Reason for revert: ok now? Original change's description: > Revert "simplify disabling effect deserialization" > > This reverts commit 5bbf790b5beeb2ed74f04551502259b54ac5556f. > > Reason for revert: flutter GN needs some love > > Original change's description: > > simplify disabling effect deserialization > > > > Switch to a simple #define instead of conditional build targets. > > > > No one changes skia_enable_effects or skia_enable_effects_imagefilters, > > so we can merge all that together back into :skia. > > > > Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7 > > Reviewed-on: https://skia-review.googlesource.com/c/169220 > > Reviewed-by: Kevin Lubick <kjlubick@google.com> > > Commit-Queue: Mike Klein <mtklein@google.com> > > TBR=mtklein@google.com,kjlubick@google.com > > Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/169222 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,kjlubick@google.com Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Release-Flutter_Android Change-Id: I534346c3ef3561a871f1af6df976bfee0b48014a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/169640 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-08 12:08:05 +00:00
"src/ports/SkGlobalInitialization_default.cpp",
"src/ports/SkImageGenerator_skia.cpp",
"src/ports/SkMemory_malloc.cpp",
"src/ports/SkOSFile_stdio.cpp",
"src/sfnt/SkOTTable_name.cpp",
"src/sfnt/SkOTUtils.cpp",
]
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" ]
libs = []
if (skia_enable_sksl) {
deps += [ ":dehydrate_sksl" ]
sources += skia_sksl_sources
}
if (is_win) {
sources += [
"src/ports/SkDebug_win.cpp",
"src/ports/SkImageEncoder_WIC.cpp",
"src/ports/SkImageGeneratorWIC.cpp",
"src/ports/SkOSFile_win.cpp",
"src/ports/SkOSLibrary_win.cpp",
]
libs += [
"Ole32.lib",
"OleAut32.lib",
]
if (!skia_enable_winuwp) {
libs += [
"FontSub.lib",
"User32.lib",
"Usp10.lib",
]
}
} else {
sources += [
"src/ports/SkOSFile_posix.cpp",
"src/ports/SkOSLibrary_posix.cpp",
]
libs += [ "dl" ]
}
if (is_android) {
deps += [ "//third_party/expat" ]
Strengthen is_official_build, update docs. This makes is_official_build turn off all development targets and features in Skia, including building third-party dependencies from source. This will intentionally break some external users, who will find themselves no longer able to find third-party headers or link against third-party libraries. These users have been building with our testing third-party dependencies unknowingly. They'll need to either explicitly turn back on building each dependency from source (skia_use_system_foo=false) or disable that dependency entirely (skia_use_foo=false). is_skia_standalone is now basically !is_official_build, so I've propagated that through, removing is_skia_standalone. In a few places we were using it as a stand-in for defined(ndk), so I've just written defined(ndk) there. Duh. gn_to_bp: is_offical_build's new strength also makes gn_to_bp.py simpler to write. In spirit, Android builds are official Skia builds that also build DM and nanobench. It seems that SkJumper (src/jumper/*) is (unintentionally) enabled on Android. Switching to an is_official_build would have disabled that. But as that accidental launch seems to have gone fine, I've kept it explicitly enabled. In the end, no changes to Android.bp or its SkUserConfig.h. The -Mini builder no longer needs to explicitly disable tools. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73 Reviewed-on: https://skia-review.googlesource.com/9190 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-03 14:21:30 +00:00
if (defined(ndk) && ndk != "") {
deps += [ "//third_party/cpu-features" ]
}
sources += [ "src/ports/SkDebug_android.cpp" ]
libs += [
"EGL",
"GLESv2",
"log",
]
}
if (is_linux || target_cpu == "wasm") {
sources += [ "src/ports/SkDebug_stdio.cpp" ]
if (skia_use_egl) {
libs += [ "GLESv2" ]
}
}
if (is_mac) {
public += [ "include/ports/SkCFObject.h" ]
sources += [
"src/ports/SkDebug_stdio.cpp",
"src/ports/SkImageEncoder_CG.cpp",
"src/ports/SkImageGeneratorCG.cpp",
]
frameworks = [
"ApplicationServices.framework",
"OpenGL.framework",
]
}
if (is_ios) {
public += [ "include/ports/SkCFObject.h" ]
sources += [
"src/ports/SkDebug_stdio.cpp",
"src/ports/SkImageEncoder_CG.cpp",
"src/ports/SkImageGeneratorCG.cpp",
]
frameworks = [
"CoreFoundation.framework",
"ImageIO.framework",
"MobileCoreServices.framework",
]
}
if (is_fuchsia) {
sources += [ "src/ports/SkDebug_stdio.cpp" ]
}
if (skia_enable_spirv_validation) {
Roll spirv-tools and spirv-headers and use upstream GN files This will allow rolling spirv-tools and spirv-headers without additional manual changes to fix Skia's copy of their BUILD.gn files. Roll third_party/externals/spirv-headers/ c0df742ec..bcf55210f (59 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+log/c0df742ec0b8..bcf55210f13a $ git log c0df742ec..bcf55210f --date=short --no-merges --format='%ad %ae %s' 2020-07-03 dneto Support SPV_KHR_expect_assume 2020-07-03 dneto Support SPV_KHR_linkonce_odr 2021-03-01 alanbaker Change operand name in OpReadClockKHR to match extension 2021-02-13 dmalyshau Add Naga as SPIR-V generation tool 2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max 2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation 2021-01-19 dneto Header generator: Check enumerant ordering 2021-01-27 ben.ashbaugh add generated headers 2021-01-27 ben.ashbaugh add None as a possible value for DebugInfoFlags 2021-01-25 caio.oliveira Add SPV_KHR_workgroup_memory_explicit_layout 2021-01-20 dneto Push FPDenormMode, FPOperationMode to the end 2021-01-20 dmitry.sidorov Apply suggestions to Intel extensions PR 2020-12-16 dmitry.sidorov Update generated files 2020-12-16 dmitry.sidorov Add SPV_INTEL_long_constant_composite extension 2020-12-16 dmitry.sidorov Add SPV_INTEL_loop_fuse extension 2020-11-23 dmitry.sidorov Add SPV_INTEL_fpga_cluster_attributes and SPV_INTEL_fp_fast_math_mode 2020-11-23 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls extension 2020-11-16 dmitry.sidorov Update SPV_INTEL_kernel_attributes extension 2020-11-09 dmitry.sidorov Update SPV_INTEL_function_pointers extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_float_controls2 extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_vector_compute extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_fpga_memory_accesses extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_io_pipes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_variable_length_array extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_usm_storage_classes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_arbitrary_precision_integers extensions 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_inline_assembly extension 2020-11-03 dmitry.sidorov Upstream SPV_INTEL_fpga_buffer_location extension 2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension 2020-11-26 dkoch remove HitTKHR 2020-11-12 dneto MeshShadingNV enables builtins PrimitiveId, Layer, and ViewportIndex 2020-10-16 dkoch de-alias/reassign OpIgnoreIntersectionKHR/OpTerminateRayKHR 2020-06-29 alele Raytracing and Rayquery updates for final 2020-06-15 alele Updated headers for new trace/executeCallable and acceleration structure cast. 2020-11-05 orbea cmake: Install cmake files to CMAKE_INSTALL_DATADIR 2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175) 2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174) 2020-10-23 john Bump revision to 4, for SPIR-V 1.5. 2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170) 2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172) 2020-10-12 hwguy.siplus Register the Xenia emulator as a generator (#171) 2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169) 2020-09-10 syoussefi Register the ANGLE compiler (#168) 2020-09-08 cepheus Rebuild of latest headers, which slightly moves OpTerminateInvocation 2020-08-03 44190824+mmerecki Reserve SPIR-V token range for upcoming Intel extensions. (#165) 2020-07-29 alanbaker Update BUILD.bazel and BUILD.gn (#166) 2020-07-29 alanbaker Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164) 2020-07-29 johnkslang Update the registry in spir-v.xml to modernize and split out opcodes. (#156) 2020-07-21 alanbaker Support SPV_KHR_terminate_invocation (#163) 2020-07-19 vkushwaha Add changes for SPV_EXT_shader_atomic_float 2020-06-26 dj2 Register the Tint compiler 2020-06-01 dneto spir-v.xml: Use plain ASCII quotes in comment 2020-05-29 cepheus Rebuild headers against the previous grammar commit. 2020-05-29 dmitry.sidorov Apply suggestions 2020-04-05 dmitry.sidorov Add Intel specific definitions from KhronosGroup/SPIRV-LLVM-Translator 2020-05-29 cepheus Header build from previous grammar update. 2020-05-25 michael.kinsner Propose bit allocation mechanism for the FP Fast Math Mode bitfield, following from the mechanism previously added for the loop control bitfield. 2020-05-20 dneto Update example to use unified1 headers 2020-04-05 dmitry.sidorov Add SPV_INTEL_function_pointers preview extension Roll third_party/externals/spirv-tools/ e95fbfb1f..5d8c40399 (488 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/e95fbfb1f509..5d8c40399e1a $ git log e95fbfb1f..5d8c40399 --date=short --no-merges --format='%ad %ae %s' 2021-03-11 cwallez BUILD.gn: fix typo for 'cflags' (#4169) 2021-03-10 cwallez Suppress warning (#4168) 2021-03-10 alastair.donaldson spirv-fuzz: Avoid unnecessary dependency (#4165) 2021-03-10 dgkoch Add `void` in function declaration to keep some compilers happy (#4160) 2021-03-09 cwallez Fix -Wextra-semi-stmt -Wsuggest-destructor-override -Wdeprecated-copy-dtor (#4164) 2021-03-08 46493288+sfricke-samsung spirv-val: Vulkan 64-bit OpAtomicStore check (#4163) 2021-03-05 vasniktel spirv-fuzz: Fix the bug in TransformationReplaceBranchFromDeadBlockWithExit (#4140) 2021-03-05 vasniktel spirv-fuzz: Fix PartialCount (#4159) 2021-03-03 afd spirv-fuzz: Handle Vulkan SPIR-V versions (#4156) 2021-03-03 vasniktel spirv-fuzz: Add persistent state to the fuzzer (#4137) 2021-03-02 alanbaker Require an OpSelectionMerge before an OpSwitch (#4154) 2021-03-01 stevenperron Use standard function to get stdin to binary mode. (#4141) 2021-02-26 bclayton Fixes for the vscode language server extension (#4150) 2021-02-19 atte.seppala spirv-opt: Don't call GenerateCopy for mismatched image types (#4126) 2021-02-18 jaebaek Start SPIRV-Tools v2021.0 2021-02-18 jaebaek Finalize SPIRV-Tools v2020.7 2021-02-16 jaebaek Update CHANGES 2021-02-11 greg Generate differentiated error codes for buffer oob checking (#4144) 2021-02-10 dj2 Update a few virtuals to overrides. (#4143) 2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133) 2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134) 2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132) 2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119) 2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122) 2021-01-28 stevenperron Mark module as modified if convert-to-half removes decorations. (#4127) 2021-01-28 jaebaek Set correct scope and line info for DebugValue (#4125) 2021-01-27 caio.oliveira Validate SPV_KHR_workgroup_memory_explicit_layout (#4128) 2021-01-27 alanbaker Validate VK_KHR_zero_initialize_workgroup_memory (#4124) 2021-01-27 46493288+sfricke-samsung spirv-val: Add Vulkan image gather offset VUID (#4118) 2021-01-27 alanbaker Add cmake to windows path for kokoro (#4129) 2021-01-25 46493288+sfricke-samsung spirv-val: Label Vulkan atomic semantics VUIDs (#4120) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04662 (#4123) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04683 (#4121) 2021-01-22 machenbach Remove obsolete GN config (#4110) 2021-01-20 46493288+sfricke-samsung spirv-val: Add Vulkan EXT builtins (#4115) 2021-01-20 dneto Support pending Intel extensions (#4116) 2021-01-19 dneto Validate Sampled=1 for Vulkan ImageQuerySizeLod, ImageQueryLevels, ImageQueryLod (#4103) 2021-01-19 46493288+sfricke-samsung spirv-val: Add Vulkan Memory Scope VUs (#4106) 2021-01-18 bclayton Migrate all Kokoro build scripts over to use the docker VM image (#4114) 2021-01-15 46493288+sfricke-samsung spirv-val: Add Vulkan Addressing Model check (#4107) 2021-01-14 rharrison Remove WebGPU support (#4108) 2021-01-14 46493288+sfricke-samsung spirv-val: Vulkan atomic storage class (#4079) 2021-01-13 jaebaek Avoid integrity check failures caused by propagating line instructions (#4096) 2021-01-13 pierremoreau Linker usability improvements (#4084) 2021-01-12 dj2 Revert "Generate differentiated error codes for buffer oob checking (#4097)" (#4100) 2021-01-11 greg Generate differentiated error codes for buffer oob checking (#4097) 2021-01-07 dneto use std::string::empty() to test for emptiness (#4098) 2021-01-07 46493288+sfricke-samsung spirv-val: Label standalone Vulkan VUID (#4091) 2021-01-06 46493288+sfricke-samsung spirv-val: Add Vulkan decroation VUID (#4090) 2021-01-06 stevenperron Fix binding number calculation in desc sroa (#4095) (...) 2020-05-19 vasniktel spirv-fuzz: Remove FuzzerPassAddUsefulConstructs (#3341) 2020-05-19 vasniktel Add support for StorageBuffer (#3348) 2020-05-19 462213+sl1pkn07 Prevent Effcee install his things when build spirv-tools with testing enabled (#3256) 2020-05-19 stevenperron Don't register edges twice in merge return (#3350) 2020-05-14 stevenperron Revert "Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342)" (#3345) 2020-05-14 afdx spirv-reduce: Remove unused struct members (#3329) 2020-05-14 andreperezmaselco.developer Add adjust branch weights transformation (#3336) 2020-05-13 stevenperron Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342) 2020-05-13 jaebaek [spirv-opt] refactor inlining pass (#3328) 2020-05-13 afdx spirv-reduce: Remove unused uniforms and similar (#3321) 2020-05-13 afdx spirv-fuzz: Fix to fact manager (#3339) 2020-05-13 afdx spirv-fuzz: Get rid of unnecessary template method (#3340) 2020-05-12 stevenperron Do merge return if the return is not at the end of the function. (#3337) 2020-05-06 jaebaek Preserve debug info for wrap-opkill (#3331) 2020-05-05 jbolz Validate ShaderCallKHR memory scope (#3332) 2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (#3316) 2020-04-30 paulthomson reduce: increase default step limit (#3327) 2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (#3325) 2020-04-28 stevenperron Delete nullptr in function bb list immedietly (#3326) 2020-04-28 jaebaek Set DebugScope for termination instructions (#3323) 2020-04-28 afdx spirv-fuzz: Do not outline regions that end with a loop header (#3312) 2020-04-27 bclayton vscode: Handle '|' chains on BitEnum / ValueEnum (#3309) 2020-04-27 jaebaek Add debug information analysis (#3305) 2020-04-27 dneto Add spvtools::opt::Operand::AsLiteralUint64 (#3320) 2020-04-27 afdx spirv-fuzz: Pass on validator options during shrinking (#3317) 2020-04-27 afdx spirv-fuzz: Clamp statically out-of-bounds accesses in code donation (#3315) 2020-04-27 afdx spirv-fuzz: Fix memory management in the fact manager (#3313) 2020-04-27 afdx spirv-fuzz: Do not replace the Sample argument in OpImageTexelPointer (#3311) 2020-04-23 afdx Allow various validation options to be passed to spirv-opt (#3314) 2020-04-23 Chaitanyas0101 typo fix: in README.md exectuable->executable (#3306) 2020-04-20 afdx spirv-fuzz: Make handling of synonym facts more efficient (#3301) 2020-04-15 stevenperron Remove unreachable code. (#3304) 2020-04-15 afdx spirv-fuzz: Fix to outliner (#3302) 2020-04-14 afdx spirv-fuzz: Do not outline regions that produce pointer outputs (#3291) 2020-04-14 afdx spirv-fuzz: Handle OpRuntimeArray when replacing ids with synonyms (#3292) 2020-04-14 afdx spirv-fuzz: Handle image storage class in donation (#3290) 2020-04-14 afdx spirv-fuzz: Respect rules for OpSampledImage (#3287) 2020-04-14 afdx spirv-fuzz: Fix comment. (#3300) 2020-04-14 stevenperron Sampled images as read-only storage (#3295) 2020-04-14 alanbaker Remove implicit fallthrough (#3298) 2020-04-14 stevenperron Add tests for recently added command line option (#3297) 2020-04-14 dneto If SPIRV-Headers is in our tree, include it as subproject (#3299) 2020-04-13 stevenperron Struct CFG analysus and single block loop (#3293) 2020-04-13 jaebaek Preserve debug info in eliminate-dead-functions (#3251) 2020-04-13 stevenperron Update acorn version (#3294) 2020-04-09 stevenperron Handle more cases in dead member elim (#3289) 2020-04-09 h.baensch.92 Fix pch macro to ignore clang-cl (#3283) 2020-04-07 afdx spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 afdx spirv-fuzz: Handle more general SPIR-V in donation (#3280) 2020-04-06 afdx spirv-fuzz: Improve support for compute shaders in donation (#3277) Created with: roll-dep third_party/externals/spirv-headers third_party/externals/spirv-tools Bug: dawn:706 Change-Id: I4ca1acd84b4905cf5454e146a917e36fc8c2d399 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381237 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Stephen White <senorblanco@google.com> Reviewed-by: Eric Boren <borenet@google.com>
2021-03-08 14:25:34 +00:00
deps += [ "//third_party/externals/spirv-tools:spvtools_val" ]
defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
}
if (skia_include_multiframe_procs) {
sources += [ "tools/SkSharingProc.cpp" ]
}
}
# DebugCanvas used in experimental/wasm-skp-debugger
if (target_cpu == "wasm") {
skia_static_library("debugcanvas") {
public_configs = [ ":skia_public" ]
sources = [
"tools/SkSharingProc.cpp",
"tools/UrlDataManager.cpp",
"tools/debugger/DebugCanvas.cpp",
"tools/debugger/DebugLayerManager.cpp",
"tools/debugger/DrawCommand.cpp",
"tools/debugger/JsonWriteBuffer.cpp",
]
}
}
skia_static_library("pathkit") {
check_includes = false
public_configs = [ ":skia_public" ]
configs = skia_library_configs
deps = [
":arm64",
":armv7",
":avx",
":crc32",
":hsw",
":none",
":sse2",
":sse41",
":sse42",
":ssse3",
]
sources = []
sources += skia_pathops_sources
sources += skia_pathops_public
sources += [
"src/core/SkAnalyticEdge.cpp",
"src/core/SkArenaAlloc.cpp",
"src/core/SkContourMeasure.cpp",
"src/core/SkCubicMap.cpp",
"src/core/SkEdge.cpp",
"src/core/SkEdgeBuilder.cpp",
"src/core/SkEdgeClipper.cpp",
"src/core/SkGeometry.cpp",
"src/core/SkIDChangeListener.cpp",
"src/core/SkLineClipper.cpp",
"src/core/SkMalloc.cpp",
"src/core/SkMallocPixelRef.cpp",
"src/core/SkMath.cpp",
"src/core/SkMatrix.cpp",
"src/core/SkOpts.cpp",
"src/core/SkPaint.cpp",
"src/core/SkPaintPriv.cpp",
"src/core/SkPath.cpp",
"src/core/SkPathBuilder.cpp",
"src/core/SkPathEffect.cpp",
"src/core/SkPathMeasure.cpp",
"src/core/SkPathRef.cpp",
"src/core/SkPoint.cpp",
"src/core/SkRRect.cpp",
"src/core/SkReadBuffer.cpp",
"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",
]
}
group("modules") {
deps = [
"modules/particles",
"modules/skottie",
"modules/skparagraph",
"modules/skshaper",
"modules/svg",
]
if (is_wasm) {
deps += [ "modules/canvaskit" ]
}
}
group("experimental") {
deps = [ "experimental/sktext" ]
}
config("our_vulkan_headers") {
include_dirs = [ "include/third_party/vulkan" ]
}
# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
skia_public_includes = [
"client_utils/android",
"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",
"modules/particles/include",
"modules/skottie/include",
"modules/skparagraph/include",
"modules/skshaper/include",
"modules/svg/include",
]
# Used by gn_to_bp.py to list our public include dirs.
skia_source_set("public") {
configs = [ ":skia_public" ]
include_dirs = skia_public_includes
}
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"
args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] +
[ rebase_path(skia_h, root_build_dir) ] +
rebase_path(skia_public_includes)
depfile = "$skia_h.deps"
outputs = [ skia_h ]
}
if (target_cpu == "x64") {
skia_executable("fiddle") {
check_includes = false
libs = []
sources = [
"tools/fiddle/draw.cpp",
"tools/fiddle/fiddle_main.cpp",
]
if (skia_use_egl) {
sources += [ "tools/fiddle/egl_context.cpp" ]
} else {
sources += [ "tools/fiddle/null_context.cpp" ]
}
testonly = true
deps = [
":flags",
":gpu_tool_utils",
":skia",
":skia.h",
"modules/particles",
"modules/skottie",
"modules/skparagraph",
"modules/skshaper",
"modules/svg",
]
}
}
config("cpp17") {
if (is_win) {
cflags_cc = [ "/std:c++17" ]
} else {
cflags_cc = [ "-std=c++17" ]
}
}
skia_source_set("public_headers_warnings_check") {
sources = [ "tools/public_headers_warnings_check.cpp" ]
configs = [
":our_vulkan_headers",
":cpp17",
]
if (defined(skia_header_target_default_configs)) {
configs += skia_header_target_default_configs
}
deps = [
":skia",
":skia.h",
"modules/skottie",
"modules/skshaper",
]
if (skia_use_dawn) {
deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
}
}
template("test_lib") {
config(target_name + "_config") {
if (defined(invoker.public_defines)) {
defines = invoker.public_defines
}
}
skia_source_set(target_name) {
forward_variables_from(invoker, "*", [])
check_includes = false
public_configs = [
":" + target_name + "_config",
":skia_private",
]
if (!defined(deps)) {
deps = []
}
deps += [ ":skia" ]
testonly = true
}
}
template("test_app") {
if (is_ios) {
ios_app_bundle(target_name) {
forward_variables_from(invoker,
"*",
[
"output_name",
"visibility",
"is_shared_library",
])
testonly = true
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" ]
}
if ("True" == exec_script("//gn/checkdir.py",
[ rebase_path("mskps", root_build_dir) ],
"trim string")) {
data_sources += [ "mskps" ]
}
}
} else {
# !is_ios
if (defined(invoker.is_shared_library) && invoker.is_shared_library) {
skia_shared_library("lib" + target_name) {
output_dir = root_build_dir
forward_variables_from(invoker, "*", [ "is_shared_library" ])
if (!defined(configs)) {
configs = []
}
configs += [ ":skia_private" ]
testonly = true
}
} else {
_executable = target_name
skia_executable(_executable) {
check_includes = false
output_dir = root_build_dir
forward_variables_from(invoker, "*", [ "is_shared_library" ])
if (!defined(configs)) {
configs = []
}
configs += [ ":skia_private" ]
testonly = true
}
}
if (is_android && skia_android_serial != "" && defined(_executable)) {
action("push_" + target_name) {
output_dir = root_build_dir
script = "gn/push_to_android.py"
deps = [ ":" + _executable ]
_stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial"
outputs = [ _stamp ]
args = [
rebase_path("$root_build_dir/$_executable"),
skia_android_serial,
rebase_path(_stamp),
]
testonly = true
}
}
}
}
test_lib("gpu_tool_utils") {
public_defines = []
# 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" ]
defines = []
if (skia_enable_discrete_gpu) {
defines += [ "SK_ENABLE_DISCRETE_GPU" ]
}
deps = []
public_deps = []
sources = [
"tools/gpu/BackendSurfaceFactory.cpp",
"tools/gpu/BackendSurfaceFactory.h",
"tools/gpu/BackendTextureImageFactory.cpp",
"tools/gpu/BackendTextureImageFactory.h",
"tools/gpu/FlushFinishTracker.cpp",
"tools/gpu/FlushFinishTracker.h",
"tools/gpu/GrContextFactory.cpp",
"tools/gpu/GrTest.cpp",
"tools/gpu/ManagedBackendTexture.cpp",
"tools/gpu/ManagedBackendTexture.h",
"tools/gpu/MemoryCache.cpp",
"tools/gpu/MemoryCache.h",
"tools/gpu/ProxyUtils.cpp",
"tools/gpu/TestContext.cpp",
"tools/gpu/TestOps.cpp",
"tools/gpu/TestOps.h",
"tools/gpu/YUVUtils.cpp",
"tools/gpu/YUVUtils.h",
"tools/gpu/gl/GLTestContext.cpp", # See comment below about
# GrContextFactory workaround.
"tools/gpu/mock/MockTestContext.cpp",
]
libs = []
frameworks = []
if (skia_use_gl) {
sources +=
[ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp" ]
if (is_ios) {
sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
frameworks += [ "OpenGLES.framework" ]
} 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" ]
}
}
Reland "[fuzzer] Remove GL from (now-Vulkan) build" This is a reland of 805acda3f3aa3d9fc85c84bac5aa52c472ec3bb1 It fixes the #if SK_GL which was causing the Android roll to fail. This disables unit tests on Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan which were consistently crashing with OOM. Original change's description: > [fuzzer] Remove GL from (now-Vulkan) build > > The fuzzer runs against the Vulkan version of Swiftshader. > There are no libGL.so (etc) on the fuzz runtime, so we > want to avoid linking against those. > > The GL code that is #ifdef'd out is still necessary to > avoid timeouts on TSAN with our NVIDIA jobs. > https://skia-review.googlesource.com/c/skia/+/502638 > > Procedure for testing this locally (and iterating): > 1. In oss-fuzz checkout, run > `python infra/helper.py shell skia` > to pull up local interactive version of Docker > fuzzer build image. > 2. Run `compile` in fuzzer shell. Stop after > the swiftshader compiles and is copied into /out > with Ctrl + C. > 3. Comment out the swiftshader compilation part [1] > (no need to re-do this when modifying Skia code). > `apt-get install nano -y` > `nano ../build.sh` > 4. Make change to Skia repo using normal methods. > 5. Run the following in the Skia repo > `git diff origin main > foo.patch` > Copy the patch into the Docker shell using Ctrl+C > and nano. > 6. Apply the patch inside the Docker shell > `git apply foo.patch` > and re-compile (which should skip right to > building the fuzzer libs) > `compile` > 7. Repeat 4-7 or make small changes directly in > the Docker shell via nano. > 8. When compilation and link succeeds, run > `ldd /out/api_mock_gpu_canvas` > to verify GL and friends were not dynamically linked. > > [1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53 > > Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0 > Bug: oss-fuzz:44132 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Kevin Lubick <kjlubick@google.com> Bug: oss-fuzz:44132, skia:12900 Change-Id: Ia2eff9403b0035e7f86098f296d7d9b1bbfd4876 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503716 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2022-02-03 15:54:07 +00:00
if (skia_use_gl && target_cpu != "wasm") {
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" ]
}
}
}
if (skia_use_vulkan) {
sources += [ "tools/gpu/vk/VkTestContext.h" ]
sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
sources += [ "tools/gpu/vk/VkTestHelper.h" ]
sources += [ "tools/gpu/vk/VkTestHelper.cpp" ]
sources += [ "tools/gpu/vk/VkTestUtils.h" ]
sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.h" ]
sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.cpp" ]
}
if (skia_use_metal) {
sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
}
if (skia_use_direct3d) {
sources += [ "tools/gpu/d3d/D3DTestContext.cpp" ]
sources += [ "tools/gpu/d3d/D3DTestUtils.cpp" ]
}
if (skia_use_dawn) {
public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
sources += [ "tools/gpu/dawn/DawnTestContext.cpp" ]
if (is_clang) {
cflags_cc = [ "-Wno-microsoft-cast" ]
}
}
if (!skia_enable_skgpu_v1) {
sources -= [ "tools/gpu/GrTest.cpp" ]
sources -= [ "tools/gpu/TestOps.cpp" ]
sources -= [ "tools/gpu/TestOps.h" ]
}
if (skia_enable_graphite) {
sources += [ "tools/graphite/ContextFactory.h" ]
sources += [ "tools/graphite/ContextFactory.cpp" ]
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" ]
}
}
if (is_fuchsia && using_fuchsia_sdk) {
libs +=
[ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
}
} # test_lib("gpu_tool_utils")
test_lib("flags") {
sources = [ "tools/flags/CommandLineFlags.cpp" ]
}
test_lib("common_flags_config") {
sources = [ "tools/flags/CommonFlagsConfig.cpp" ]
deps = [ ":flags" ]
public_deps = [ ":gpu_tool_utils" ]
}
test_lib("common_flags_gpu") {
sources = [ "tools/flags/CommonFlagsGpu.cpp" ]
deps = [ ":flags" ]
public_deps = [ ":gpu_tool_utils" ]
}
test_lib("common_flags_images") {
sources = [ "tools/flags/CommonFlagsImages.cpp" ]
deps = [ ":flags" ]
}
test_lib("common_flags_fontmgr") {
sources = [ "tools/flags/CommonFlagsFontMgr.cpp" ]
deps = [ ":flags" ]
}
test_lib("common_flags_aa") {
sources = [ "tools/flags/CommonFlagsAA.cpp" ]
deps = [ ":flags" ]
}
test_lib("trace") {
deps = [ ":flags" ]
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",
]
}
test_lib("tool_utils") {
sources = [
"tools/AndroidSkDebugToStdOut.cpp",
"tools/AutoreleasePool.h",
"tools/DDLPromiseImageHelper.cpp",
"tools/DDLPromiseImageHelper.h",
"tools/DDLTileHelper.cpp",
"tools/DDLTileHelper.h",
"tools/LsanSuppressions.cpp",
"tools/MSKPPlayer.cpp",
"tools/MSKPPlayer.h",
"tools/ProcStats.cpp",
"tools/ProcStats.h",
"tools/Resources.cpp",
"tools/Resources.h",
"tools/RuntimeBlendUtils.cpp",
"tools/RuntimeBlendUtils.h",
"tools/SkMetaData.cpp",
"tools/SkMetaData.h",
"tools/SkSharingProc.cpp",
"tools/SkSharingProc.h",
"tools/Stats.h",
"tools/ToolUtils.cpp",
"tools/ToolUtils.h",
"tools/UrlDataManager.cpp",
"tools/UrlDataManager.h",
"tools/debugger/DebugCanvas.cpp",
"tools/debugger/DebugCanvas.h",
"tools/debugger/DebugLayerManager.cpp",
"tools/debugger/DebugLayerManager.h",
"tools/debugger/DrawCommand.cpp",
"tools/debugger/DrawCommand.h",
"tools/debugger/JsonWriteBuffer.cpp",
"tools/debugger/JsonWriteBuffer.h",
"tools/fonts/RandomScalerContext.cpp",
"tools/fonts/RandomScalerContext.h",
"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",
"tools/fonts/ToolUtilsFont.cpp",
"tools/random_parse_path.cpp",
"tools/random_parse_path.h",
"tools/timer/TimeUtils.h",
"tools/timer/Timer.cpp",
"tools/timer/Timer.h",
]
if (target_cpu != "wasm") {
sources += [ "tools/CrashHandler.cpp" ]
}
libs = []
frameworks = []
if (is_ios) {
sources += [ "tools/ios_utils.m" ]
sources += [ "tools/ios_utils.h" ]
if (skia_use_metal) {
sources += [ "tools/AutoreleasePool.mm" ]
}
frameworks += [ "Foundation.framework" ]
} else if (is_mac) {
if (skia_use_metal) {
sources += [ "tools/AutoreleasePool.mm" ]
frameworks += [ "Foundation.framework" ]
}
} else if (is_win && !skia_enable_winuwp) {
libs += [ "DbgHelp.lib" ]
}
defines = []
if (skia_tools_require_resources) {
defines += [ "SK_TOOLS_REQUIRE_RESOURCES" ]
}
deps = [
":flags",
"modules/svg",
]
public_deps = [ ":gpu_tool_utils" ]
}
test_lib("etc1") {
sources = [ "third_party/etc1/etc1.cpp" ]
}
import("gn/gm.gni")
test_lib("gm") {
sources = gm_sources
if (skia_use_gl) {
sources += gl_gm_sources
}
if (!skia_enable_skgpu_v1) {
sources -= skgpu_v1_gm_sources
}
deps = [
":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",
":skia",
":tool_utils",
"modules/particles",
"modules/skottie",
"modules/skottie:gm",
"modules/skparagraph",
"modules/skparagraph:gm",
"modules/skshaper",
]
if (is_skia_dev_build) {
sources += [ "gm/fiddle.cpp" ]
deps += [ ":skia.h" ]
}
public_deps = [ ":gpu_tool_utils" ]
if (skia_use_ffmpeg) {
deps += [ "experimental/ffmpeg:video_decoder" ]
sources += [ "gm/video_decoder.cpp" ]
}
}
test_lib("test") {
sources = [
"tests/Test.cpp",
"tests/Test.h",
"tests/TestHarness.cpp",
"tests/TestHarness.h",
"tests/TestUtils.cpp",
"tests/TestUtils.h",
]
deps = [
":flags",
":skia",
":tool_utils",
]
public_deps = [
":gpu_tool_utils", # Test.h #includes headers from this target.
]
}
import("gn/tests.gni")
test_lib("tests") {
sources = tests_sources + pathops_tests_sources
frameworks = []
if (skia_use_metal) {
sources += metal_tests_sources
cflags_objcc = [ "-fobjc-arc" ]
frameworks += [ "MetalKit.framework" ]
}
if (skia_use_gl) {
sources += gl_tests_sources
}
if (skia_enable_graphite) {
sources += graphite_tests_sources
if (skia_use_metal) {
sources += graphite_metal_tests_sources
}
}
if (!skia_enable_skgpu_v1) {
sources -= skgpu_v1_tests_sources
}
deps = [
":flags",
":fontmgr_android_tests",
":fontmgr_fontconfig_tests",
Reland "Reland "Test mac system font variations."" This reverts commit 759f2613b5718a41672e77c4d091dafd503ae53a. Reason for revert: Fix bzl build. Original change's description: > Revert "Reland "Test mac system font variations."" > > This reverts commit ba55be671d57cb94bb300cf925714be562976dde. > > Reason for revert: G3 roll > > (08:59:24) ERROR: third_party/skia/HEAD/BUILD:926:10: Compiling third_party/skia/HEAD/tests/TypefaceMacTest.cpp failed: (Exit 1) driver_is_not_gcc failed: error executing command third_party/crosstool/v18/stable/toolchain/bin/driver_is_not_gcc '-frandom-seed=blaze-out/k8-fastbuild/bin/third_party/skia/HEAD/_objs/dm/TypefaceMacTest.pic.o' -DSK_USE_FREETYPE_EMBOLDEN ... (remaining 383 argument(s) skipped). [forge_remote_host=ixog19] > third_party/skia/HEAD/tests/TypefaceMacTest.cpp:31:45: error: unknown type name 'CTFontRef' > auto makeSystemFont = [](float size) -> CTFontRef { > ^ > third_party/skia/HEAD/tests/TypefaceMacTest.cpp:33:46: error: use of undeclared identifier 'kCTFontUIFontSystem' > return CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, size, nullptr); > ^ > 2 errors generated. > > Original change's description: > > Reland "Test mac system font variations." > > > > This reverts commit 4c0b9b90d63a155a7137dd1ebe08f74222051fb6. > > > > Reason for revert: Work around broken -Wrange-loop-analysis > > > > Original change's description: > > > Revert "Test mac system font variations." > > > > > > This reverts commit a612dc77d75fda3c9d7fb26ce3e2cd916e8c76cb. > > > > > > Reason for revert: Breaking iOS builds. > > > > > > Original change's description: > > > > Test mac system font variations. > > > > > > > > On macOS system fonts are special and sometimes have different behavior > > > > from fonts generated from data. Add a test which exercises several > > > > expectations about changing the variation on the system ui font. > > > > > > > > Bug: skia:10968 > > > > Change-Id: Ia10dfbf7f4f0ff099f9bfebf95481c95c7d3715f > > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372218 > > > > Commit-Queue: Ben Wagner <bungeman@google.com> > > > > Reviewed-by: Herb Derby <herb@google.com> > > > > > > TBR=bungeman@google.com,herb@google.com,drott@google.com > > > > > > Change-Id: Iccc05f25d827ab85c507b5f3bde936561349e2b8 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia:10968 > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372678 > > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > > > # Not skipping CQ checks because this is a reland. > > > > Bug: skia:10968 > > Change-Id: Ifddc6c5ada335d97f7796df7f6ea10577f6bc252 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372776 > > Commit-Queue: Ben Wagner <bungeman@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: skia:10968 > Change-Id: Ia5ff4ff827e3f79ff17b4d99458ffb45b7c36c58 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373277 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> Bug: skia:10968 Change-Id: Ieb79128745dc934a7469d84b27a9e9f3306704df Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373620 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Dominik Röttsches <drott@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-22 15:37:33 +00:00
":fontmgr_mac_ct_tests",
":skia",
":test",
":tool_utils",
"experimental/sktext:tests",
"modules/skottie:tests",
"modules/skparagraph:tests",
"modules/sksg:tests",
"modules/skshaper",
Reland "[svg] Absolute positioning support for text" This reverts commit e2f62453523e8eeb98968570b48b229f1cc1e712. Reason for revert: relanding with fixes Original change's description: > Revert "[svg] Absolute positioning support for text" > > This reverts commit febb1b87a5e73bdbe2cb598783082d3644d0e969. > > Reason for revert: breaking the android roll > > Original change's description: > > [svg] Absolute positioning support for text > > > > Implement per-character position attribute lookup based on [1]: > > > > - convert "x" and "y" attributes to arrays > > - introduce ScopedPosResolver to handle positioning attribute lookup > > and fallback > > - push a new resolver every time we enter a text positioning element > > scope (<text>, <tspan>, etc). > > - flush/reposition a new text chunk every time we encounter explicit > > absolute positions > > > > The position attribute fallback logic is complex enough to warrant a > > unit test. > > > > [1] https://www.w3.org/TR/SVG11/text.html#TSpanElementXAttribute > > > > Bug: skia:10840 > > Change-Id: I66c478fea4a179fdb8b1a6a9ff00c4dd9509f8d2 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345161 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Commit-Queue: Florin Malita <fmalita@google.com> > > Reviewed-by: Tyler Denniston <tdenniston@google.com> > > TBR=fmalita@chromium.org,fmalita@google.com,tdenniston@google.com > > Change-Id: I80e3396d555369fe835ee73102135061f63e8bf0 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:10840 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345417 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Derek Sollenberger <djsollen@google.com> TBR=djsollen@google.com,fmalita@chromium.org,fmalita@google.com,tdenniston@google.com # Not skipping CQ checks because this is a reland. Bug: skia:10840 Change-Id: I4c6f6a9f19c0f7598bdcf34e915f43c139b995a9 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345420 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
2020-12-17 21:36:54 +00:00
"modules/svg:tests",
"//third_party/libpng",
Reland "Treat kWEBP encode with quality=100 as lossless" This reverts commit 22170b317800325408310e144194d6c024d571bc. It was reverted due to the test breaking Google3. This includes a workaround. Original change's description: > Treat kWEBP encode with quality=100 as lossless > > In SkEncodeImage and friends, treat quality of 100 as a lossless encode > when using kWEBP. This seems a good fit for the intent - which is > presumably to save the highest quality image. This also matches > Chromium's blink::ImageEncoder::ComputeWebpOptions, which treats a > quality of 1 (on a float scale from 0 to 1) as a lossless encode. > > FWIW, Chromium has had this behavior since > https://codereview.chromium.org/1937433002, in response to > crbug.com/523098. The goal is to "maintain sharpness to > match the JPEG encoder behavior (use WEBP lossless encoding)". > > Add a test to verify the new behavior. This requires making tests > depend on libwebp to use WebPGetFeatures, since the Skia API does not > provide a way to determine whether an encoded webp file was encoded > lossless-ly or lossily. > > Bug: skia:8586 > Change-Id: Ie9e09c2f7414ab701d696c4ad9edf405868a716f > Reviewed-on: https://skia-review.googlesource.com/c/175823 > Commit-Queue: Leon Scroggins <scroggo@google.com> > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Reviewed-by: Mike Reed <reed@google.com> TBR=reed@google.com, based on prior approval Bug: skia:8586 Change-Id: I09c73f71996422f797fd9456fef5dfad9af36839 Reviewed-on: https://skia-review.googlesource.com/c/194194 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com> Auto-Submit: Leon Scroggins <scroggo@google.com>
2019-02-22 17:32:16 +00:00
"//third_party/libwebp",
"//third_party/zlib",
]
}
import("gn/bench.gni")
test_lib("bench") {
sources = bench_sources
if (skia_enable_graphite) {
sources += graphite_bench_sources
}
if (!skia_enable_skgpu_v1) {
sources -= skgpu_v1_bench_sources
}
deps = [
":flags",
":gm",
":gpu_tool_utils",
":skia",
":tool_utils",
"modules/skparagraph:bench",
"modules/skshaper",
]
}
if (is_linux || is_mac) {
if (skia_enable_skottie) {
test_app("skottie_tool") {
deps = [ "modules/skottie:tool" ]
}
}
test_app("svg_tool") {
deps = [ "modules/svg:tool" ]
}
}
import("gn/samples.gni")
test_lib("samples") {
sources = samples_sources
if (!skia_enable_skgpu_v1) {
sources -= skgpu_v1_samples_sources
}
public_deps = [ ":tool_utils" ]
deps = [
":flags",
":gpu_tool_utils",
":xml",
"experimental/sktext:samples",
"modules/audioplayer",
"modules/skparagraph:samples",
"modules/skshaper",
"modules/svg",
"//third_party/imgui",
]
}
test_lib("hash_and_encode") {
sources = [
"tools/HashAndEncode.cpp",
"tools/HashAndEncode.h",
]
deps = [
":flags",
":skia",
"//third_party/libpng",
]
}
if (target_cpu != "wasm") {
test_app("convert-to-nia") {
sources = [ "tools/convert-to-nia.cpp" ]
deps = [ ":skia" ]
}
test_app("imgcvt") {
sources = [ "tools/imgcvt.cpp" ]
deps = [
":skcms",
":skia",
]
}
test_app("fm") {
sources = [
"dm/DMGpuTestProcs.cpp", # blech
"tools/fm/fm.cpp",
]
deps = [
":common_flags_aa",
":common_flags_fontmgr",
":common_flags_gpu",
":flags",
":gm",
":gpu_tool_utils",
":hash_and_encode",
":skia",
":tests",
":tool_utils",
":trace",
"modules/skottie",
"modules/skottie:utils",
"modules/svg",
]
}
test_app("dm") {
sources = [
"dm/DM.cpp",
"dm/DMGpuTestProcs.cpp",
"dm/DMJsonWriter.cpp",
"dm/DMJsonWriter.h",
"dm/DMSrcSink.cpp",
"dm/DMSrcSink.h",
]
deps = [
":common_flags_aa",
":common_flags_config",
":common_flags_fontmgr",
":common_flags_gpu",
":common_flags_images",
":flags",
":gm",
":gpu_tool_utils",
":hash_and_encode",
":skia",
":tests",
":tool_utils",
":trace",
"modules/skottie",
"modules/skottie:utils",
"modules/svg",
]
}
test_app("sorttoy") {
sources = [
"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",
]
deps = [
":flags",
":skia",
":tool_utils",
]
}
# optional separate library to dlopen when running CanvasStateTests.
skia_shared_library("canvas_state_lib") {
sources = [
"tests/CanvasStateHelpers.cpp",
"tests/CanvasStateHelpers.h",
]
deps = [ ":skia" ]
}
}
if (!is_win) {
test_app("remote_demo") {
sources = [ "tools/remote_demo.cpp" ]
deps = [ ":skia" ]
}
}
if (!is_win) {
test_app("blob_cache_sim") {
sources = [ "tools/blob_cache_sim.cpp" ]
deps = [ ":skia" ]
}
}
test_app("nanobench") {
sources = [ "bench/nanobench.cpp" ]
deps = [
":bench",
":common_flags_aa",
":common_flags_config",
":common_flags_gpu",
":common_flags_images",
":flags",
":gm",
":gpu_tool_utils",
":skia",
":tool_utils",
":trace",
"modules/skparagraph",
"modules/skshaper",
"modules/svg",
]
}
test_app("skpinfo") {
sources = [ "tools/skpinfo.cpp" ]
configs = [ ":our_vulkan_headers" ]
deps = [
":flags",
":skia",
]
}
if (skia_use_ffmpeg) {
test_app("skottie2movie") {
sources = [ "tools/skottie2movie.cpp" ]
deps = [
":flags",
":gpu_tool_utils",
":skia",
"experimental/ffmpeg:video_encoder",
"modules/skottie",
"modules/skottie:utils",
]
}
}
test_app("skpbench") {
sources = [
"bench/BigPath.cpp",
"tools/skpbench/skpbench.cpp",
]
deps = [
":common_flags_config",
":common_flags_gpu",
":flags",
":gpu_tool_utils",
":skia",
":tool_utils",
]
}
test_app("sktexttopdf") {
sources = [ "tools/using_skia_and_harfbuzz.cpp" ]
deps = [
":skia",
"modules/skshaper",
]
}
test_app("create_test_font") {
sources = [ "tools/fonts/create_test_font.cpp" ]
deps = [ ":skia" ]
assert_no_deps = [
# tool_utils requires the output of this app.
":tool_utils",
]
}
if (skia_use_expat) {
test_app("create_test_font_color") {
sources = [ "tools/fonts/create_test_font_color.cpp" ]
deps = [
":flags",
":skia",
":tool_utils",
]
}
}
test_app("get_images_from_skps") {
sources = [ "tools/get_images_from_skps.cpp" ]
deps = [
":flags",
":skia",
]
}
if (!is_ios && target_cpu != "wasm" && !(is_win && target_cpu == "arm64")) {
test_app("skiaserve") {
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",
"tools/skiaserve/urlhandlers/OpBoundsHandler.cpp",
"tools/skiaserve/urlhandlers/OpsHandler.cpp",
"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",
]
}
}
test_app("fuzz") {
sources = [
"fuzz/Fuzz.cpp",
"fuzz/Fuzz.h",
"fuzz/FuzzCanvas.cpp",
"fuzz/FuzzCommon.cpp",
"fuzz/FuzzCommon.h",
"fuzz/FuzzCreateDDL.cpp",
"fuzz/FuzzDDLThreading.cpp",
"fuzz/FuzzDrawFunctions.cpp",
"fuzz/FuzzEncoders.cpp",
"fuzz/FuzzGradients.cpp",
"fuzz/FuzzMain.cpp",
"fuzz/FuzzParsePath.cpp",
"fuzz/FuzzPathMeasure.cpp",
"fuzz/FuzzPathop.cpp",
"fuzz/FuzzPolyUtils.cpp",
"fuzz/FuzzRegionOp.cpp",
"fuzz/FuzzSkParagraph.cpp",
"fuzz/FuzzTriangulation.cpp",
"fuzz/oss_fuzz/FuzzAndroidCodec.cpp",
"fuzz/oss_fuzz/FuzzAnimatedImage.cpp",
"fuzz/oss_fuzz/FuzzImage.cpp",
"fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
"fuzz/oss_fuzz/FuzzIncrementalImage.cpp",
"fuzz/oss_fuzz/FuzzJSON.cpp",
"fuzz/oss_fuzz/FuzzPathDeserialize.cpp",
"fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
"fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
"fuzz/oss_fuzz/FuzzSKP.cpp",
"fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp",
"fuzz/oss_fuzz/FuzzSKSL2Metal.cpp",
"fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp",
"fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp",
"fuzz/oss_fuzz/FuzzSVG.cpp",
"fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp",
"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",
"fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
"tools/UrlDataManager.cpp",
"tools/debugger/DebugCanvas.cpp",
"tools/debugger/DebugLayerManager.cpp",
"tools/debugger/DrawCommand.cpp",
"tools/debugger/JsonWriteBuffer.cpp",
]
deps = [
":flags",
":gpu_tool_utils",
":skia",
"modules/skottie:fuzz",
"modules/skparagraph",
]
}
test_app("dump_record") {
sources = [ "tools/dump_record.cpp" ]
deps = [
":flags",
":skia",
]
}
test_app("skdiff") {
sources = [
"tools/skdiff/skdiff.cpp",
"tools/skdiff/skdiff_html.cpp",
"tools/skdiff/skdiff_main.cpp",
"tools/skdiff/skdiff_utils.cpp",
]
deps = [
":skia",
":tool_utils",
]
}
test_app("skp_parser") {
sources = [ "tools/skp_parser.cpp" ]
deps = [
":skia",
":tool_utils",
]
}
if (!is_win) {
source_set("skqp_lib") { # Not a skia_source_set
check_includes = false
testonly = true
public_configs = [ ":skia_private" ]
sources = [
"dm/DMGpuTestProcs.cpp",
"tools/skqp/src/skqp.cpp",
"tools/skqp/src/skqp.h",
]
deps = [
":gm",
":skia",
":tests",
":tool_utils",
]
}
test_app("skqp") {
sources = [ "tools/skqp/src/skqp_main.cpp" ]
include_dirs = [ "//" ]
lib_dirs = []
deps = [ ":skqp_lib" ]
}
}
if (is_fuchsia) {
# Build a package repository for skqp on Fuchsia.
group("skqp_repo") {
testonly = true
deps = [ "//build/fuchsia/skqp:skqp_repo" ]
}
}
if (is_android) {
shared_library("libskqp_app") { # Not a skia_shared_library
configs += [ ":skia_private" ]
testonly = true
sources = [ "tools/skqp/src/jni_skqp.cpp" ]
deps = [
":skia",
":skqp_lib",
":tool_utils",
]
libs = [ "android" ]
}
}
if (is_android && skia_use_gl) {
test_app("skottie_android") {
is_shared_library = true
sources = [ "platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp" ]
libs = []
deps = [
":skia",
"modules/skottie",
]
}
test_app("androidkit") {
is_shared_library = true
sources = [
"modules/androidkit/src/AndroidKit.cpp",
"modules/androidkit/src/Canvas.cpp",
"modules/androidkit/src/ColorFilters.cpp",
"modules/androidkit/src/Font.cpp",
"modules/androidkit/src/FontChainAdapter.cpp",
"modules/androidkit/src/Gradients.cpp",
"modules/androidkit/src/Image.cpp",
"modules/androidkit/src/ImageFilter.cpp",
"modules/androidkit/src/Matrix.cpp",
"modules/androidkit/src/Paint.cpp",
"modules/androidkit/src/Path.cpp",
"modules/androidkit/src/PathBuilder.cpp",
"modules/androidkit/src/RuntimeShaderBuilder.cpp",
"modules/androidkit/src/Shader.cpp",
"modules/androidkit/src/SkottieAnimation.cpp",
"modules/androidkit/src/Surface.cpp",
"modules/androidkit/src/Surface.h",
"modules/androidkit/src/SurfaceThread.cpp",
"modules/androidkit/src/SurfaceThread.h",
"modules/androidkit/src/Text.cpp",
"modules/androidkit/src/Utils.cpp",
]
libs = [
"android",
"jnigraphics",
]
deps = [
":sk_app",
":skia",
"experimental/sktext:sktext",
"modules/skottie:skottie",
]
}
}
test_app("list_gms") {
sources = [ "tools/list_gms.cpp" ]
deps = [
":gm",
":skia",
]
}
test_app("list_gpu_unit_tests") {
sources = [
"dm/DMGpuTestProcs.cpp",
"tools/list_gpu_unit_tests.cpp",
]
deps = [
":skia",
":tests",
]
}
test_lib("sk_app") {
public_deps = [
":gpu_tool_utils",
":skia",
]
sources = [
"tools/sk_app/Application.h",
"tools/sk_app/CommandSet.cpp",
"tools/sk_app/CommandSet.h",
"tools/sk_app/DisplayParams.h",
"tools/sk_app/RasterWindowContext.h",
"tools/sk_app/Window.cpp",
"tools/sk_app/Window.h",
"tools/sk_app/WindowContext.cpp",
"tools/sk_app/WindowContext.h",
]
libs = []
frameworks = []
if (is_android) {
sources += [
"tools/sk_app/android/RasterWindowContext_android.cpp",
"tools/sk_app/android/WindowContextFactory_android.h",
"tools/sk_app/android/Window_android.cpp",
"tools/sk_app/android/Window_android.h",
"tools/sk_app/android/main_android.cpp",
"tools/sk_app/android/surface_glue_android.cpp",
"tools/sk_app/android/surface_glue_android.h",
]
libs += [ "android" ]
} else if (is_linux) {
sources += [
"tools/sk_app/unix/RasterWindowContext_unix.cpp",
"tools/sk_app/unix/WindowContextFactory_unix.h",
"tools/sk_app/unix/Window_unix.cpp",
"tools/sk_app/unix/Window_unix.h",
"tools/sk_app/unix/keysym2ucs.c",
"tools/sk_app/unix/keysym2ucs.h",
"tools/sk_app/unix/main_unix.cpp",
]
libs += [
"GL", # Used by raster window context, so cannot be behind skia_use_gl.
"X11",
]
} else if (is_win) {
sources += [
"tools/sk_app/win/RasterWindowContext_win.cpp",
"tools/sk_app/win/WindowContextFactory_win.h",
"tools/sk_app/win/Window_win.cpp",
"tools/sk_app/win/Window_win.h",
"tools/sk_app/win/main_win.cpp",
]
} else if (is_mac) {
sources += [
"tools/sk_app/mac/WindowContextFactory_mac.h",
"tools/sk_app/mac/Window_mac.h",
"tools/sk_app/mac/Window_mac.mm",
"tools/sk_app/mac/main_mac.mm",
]
frameworks += [
"QuartzCore.framework",
"Cocoa.framework",
"Foundation.framework",
]
} else if (is_ios) {
sources += [
"tools/sk_app/ios/WindowContextFactory_ios.h",
"tools/sk_app/ios/Window_ios.h",
"tools/sk_app/ios/Window_ios.mm",
"tools/sk_app/ios/main_ios.mm",
]
frameworks += [ "QuartzCore.framework" ]
}
if (skia_use_gl) {
sources += [ "tools/sk_app/GLWindowContext.cpp" ]
sources += [ "tools/sk_app/GLWindowContext.h" ]
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) {
sources += [
"tools/sk_app/mac/GLWindowContext_mac.mm",
"tools/sk_app/mac/RasterWindowContext_mac.mm",
]
} else if (is_ios) {
sources += [
"tools/sk_app/ios/GLWindowContext_ios.mm",
"tools/sk_app/ios/RasterWindowContext_ios.mm",
]
}
}
if (skia_use_vulkan) {
sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
sources += [ "tools/sk_app/VulkanWindowContext.h" ]
if (is_android) {
sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
} else if (is_linux) {
sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ]
libs += [ "X11-xcb" ]
} else if (is_win) {
sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ]
}
}
if (skia_use_metal) {
sources += [ "tools/sk_app/MetalWindowContext.mm" ]
sources += [ "tools/sk_app/MetalWindowContext.h" ]
if (skia_enable_graphite) {
sources += [ "tools/sk_app/GraphiteMetalWindowContext.mm" ]
sources += [ "tools/sk_app/GraphiteMetalWindowContext.h" ]
}
if (is_mac) {
sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ]
if (skia_enable_graphite) {
sources += [ "tools/sk_app/mac/GraphiteMetalWindowContext_mac.mm" ]
}
} else if (is_ios) {
sources += [ "tools/sk_app/ios/MetalWindowContext_ios.mm" ]
}
}
if (skia_use_direct3d) {
sources += [ "tools/sk_app/win/D3D12WindowContext_win.cpp" ]
}
if (skia_use_dawn) {
sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
sources += [ "tools/sk_app/DawnWindowContext.h" ]
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" ]
}
}
}
deps = [ ":tool_utils" ]
if (is_android) {
deps += [ "//third_party/native_app_glue" ]
}
if (skia_use_gl && skia_use_angle) {
deps += [ "//third_party/angle2" ]
}
}
if (!skia_use_vulkan && (is_mac || is_linux || is_win)) {
test_app("fiddle_examples") {
sources = [
"tools/fiddle/all_examples.cpp",
"tools/fiddle/examples.cpp",
"tools/fiddle/examples.h",
]
if (is_win) {
cflags = [
"/wd4756", # Overflow in constant arithmetic
"/wd4305", # truncation from 'double' to 'float'
]
}
deps = [
":skia",
":skia.h",
"modules/particles",
"modules/skottie",
"modules/skparagraph",
"modules/skshaper",
"modules/svg",
]
}
}
# 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",
"tools/viewer/BisectSlide.h",
"tools/viewer/GMSlide.cpp",
"tools/viewer/GMSlide.h",
"tools/viewer/ImGuiLayer.cpp",
"tools/viewer/ImGuiLayer.h",
"tools/viewer/ImageSlide.cpp",
"tools/viewer/ImageSlide.h",
"tools/viewer/MSKPSlide.cpp",
"tools/viewer/MSKPSlide.h",
"tools/viewer/ParticlesSlide.cpp",
"tools/viewer/ParticlesSlide.h",
"tools/viewer/SKPSlide.cpp",
"tools/viewer/SKPSlide.h",
"tools/viewer/SampleSlide.cpp",
"tools/viewer/SampleSlide.h",
"tools/viewer/SkSLDebuggerSlide.cpp",
"tools/viewer/SkSLDebuggerSlide.h",
"tools/viewer/SkSLSlide.cpp",
"tools/viewer/SkSLSlide.h",
"tools/viewer/SkottieSlide.cpp",
"tools/viewer/SkottieSlide.h",
"tools/viewer/Slide.h",
"tools/viewer/SlideDir.cpp",
"tools/viewer/SlideDir.h",
"tools/viewer/StatsLayer.cpp",
"tools/viewer/StatsLayer.h",
"tools/viewer/SvgSlide.cpp",
"tools/viewer/SvgSlide.h",
"tools/viewer/TouchGesture.cpp",
"tools/viewer/TouchGesture.h",
"tools/viewer/Viewer.cpp",
"tools/viewer/Viewer.h",
]
libs = []
deps = [
":common_flags_fontmgr",
":common_flags_gpu",
":flags",
":gm",
":gpu_tool_utils",
":samples",
":sk_app",
":skia",
":tool_utils",
":trace",
"experimental/sktext",
"modules/audioplayer",
"modules/particles",
"modules/skottie",
"modules/skottie:utils",
"modules/sksg:samples",
"modules/svg",
"//third_party/imgui",
]
if (skia_use_vulkan) {
deps += [
Roll spirv-tools and spirv-headers and use upstream GN files This will allow rolling spirv-tools and spirv-headers without additional manual changes to fix Skia's copy of their BUILD.gn files. Roll third_party/externals/spirv-headers/ c0df742ec..bcf55210f (59 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+log/c0df742ec0b8..bcf55210f13a $ git log c0df742ec..bcf55210f --date=short --no-merges --format='%ad %ae %s' 2020-07-03 dneto Support SPV_KHR_expect_assume 2020-07-03 dneto Support SPV_KHR_linkonce_odr 2021-03-01 alanbaker Change operand name in OpReadClockKHR to match extension 2021-02-13 dmalyshau Add Naga as SPIR-V generation tool 2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max 2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation 2021-01-19 dneto Header generator: Check enumerant ordering 2021-01-27 ben.ashbaugh add generated headers 2021-01-27 ben.ashbaugh add None as a possible value for DebugInfoFlags 2021-01-25 caio.oliveira Add SPV_KHR_workgroup_memory_explicit_layout 2021-01-20 dneto Push FPDenormMode, FPOperationMode to the end 2021-01-20 dmitry.sidorov Apply suggestions to Intel extensions PR 2020-12-16 dmitry.sidorov Update generated files 2020-12-16 dmitry.sidorov Add SPV_INTEL_long_constant_composite extension 2020-12-16 dmitry.sidorov Add SPV_INTEL_loop_fuse extension 2020-11-23 dmitry.sidorov Add SPV_INTEL_fpga_cluster_attributes and SPV_INTEL_fp_fast_math_mode 2020-11-23 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls extension 2020-11-16 dmitry.sidorov Update SPV_INTEL_kernel_attributes extension 2020-11-09 dmitry.sidorov Update SPV_INTEL_function_pointers extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_float_controls2 extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_vector_compute extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_fpga_memory_accesses extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_io_pipes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_variable_length_array extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_usm_storage_classes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_arbitrary_precision_integers extensions 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_inline_assembly extension 2020-11-03 dmitry.sidorov Upstream SPV_INTEL_fpga_buffer_location extension 2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension 2020-11-26 dkoch remove HitTKHR 2020-11-12 dneto MeshShadingNV enables builtins PrimitiveId, Layer, and ViewportIndex 2020-10-16 dkoch de-alias/reassign OpIgnoreIntersectionKHR/OpTerminateRayKHR 2020-06-29 alele Raytracing and Rayquery updates for final 2020-06-15 alele Updated headers for new trace/executeCallable and acceleration structure cast. 2020-11-05 orbea cmake: Install cmake files to CMAKE_INSTALL_DATADIR 2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175) 2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174) 2020-10-23 john Bump revision to 4, for SPIR-V 1.5. 2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170) 2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172) 2020-10-12 hwguy.siplus Register the Xenia emulator as a generator (#171) 2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169) 2020-09-10 syoussefi Register the ANGLE compiler (#168) 2020-09-08 cepheus Rebuild of latest headers, which slightly moves OpTerminateInvocation 2020-08-03 44190824+mmerecki Reserve SPIR-V token range for upcoming Intel extensions. (#165) 2020-07-29 alanbaker Update BUILD.bazel and BUILD.gn (#166) 2020-07-29 alanbaker Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164) 2020-07-29 johnkslang Update the registry in spir-v.xml to modernize and split out opcodes. (#156) 2020-07-21 alanbaker Support SPV_KHR_terminate_invocation (#163) 2020-07-19 vkushwaha Add changes for SPV_EXT_shader_atomic_float 2020-06-26 dj2 Register the Tint compiler 2020-06-01 dneto spir-v.xml: Use plain ASCII quotes in comment 2020-05-29 cepheus Rebuild headers against the previous grammar commit. 2020-05-29 dmitry.sidorov Apply suggestions 2020-04-05 dmitry.sidorov Add Intel specific definitions from KhronosGroup/SPIRV-LLVM-Translator 2020-05-29 cepheus Header build from previous grammar update. 2020-05-25 michael.kinsner Propose bit allocation mechanism for the FP Fast Math Mode bitfield, following from the mechanism previously added for the loop control bitfield. 2020-05-20 dneto Update example to use unified1 headers 2020-04-05 dmitry.sidorov Add SPV_INTEL_function_pointers preview extension Roll third_party/externals/spirv-tools/ e95fbfb1f..5d8c40399 (488 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/e95fbfb1f509..5d8c40399e1a $ git log e95fbfb1f..5d8c40399 --date=short --no-merges --format='%ad %ae %s' 2021-03-11 cwallez BUILD.gn: fix typo for 'cflags' (#4169) 2021-03-10 cwallez Suppress warning (#4168) 2021-03-10 alastair.donaldson spirv-fuzz: Avoid unnecessary dependency (#4165) 2021-03-10 dgkoch Add `void` in function declaration to keep some compilers happy (#4160) 2021-03-09 cwallez Fix -Wextra-semi-stmt -Wsuggest-destructor-override -Wdeprecated-copy-dtor (#4164) 2021-03-08 46493288+sfricke-samsung spirv-val: Vulkan 64-bit OpAtomicStore check (#4163) 2021-03-05 vasniktel spirv-fuzz: Fix the bug in TransformationReplaceBranchFromDeadBlockWithExit (#4140) 2021-03-05 vasniktel spirv-fuzz: Fix PartialCount (#4159) 2021-03-03 afd spirv-fuzz: Handle Vulkan SPIR-V versions (#4156) 2021-03-03 vasniktel spirv-fuzz: Add persistent state to the fuzzer (#4137) 2021-03-02 alanbaker Require an OpSelectionMerge before an OpSwitch (#4154) 2021-03-01 stevenperron Use standard function to get stdin to binary mode. (#4141) 2021-02-26 bclayton Fixes for the vscode language server extension (#4150) 2021-02-19 atte.seppala spirv-opt: Don't call GenerateCopy for mismatched image types (#4126) 2021-02-18 jaebaek Start SPIRV-Tools v2021.0 2021-02-18 jaebaek Finalize SPIRV-Tools v2020.7 2021-02-16 jaebaek Update CHANGES 2021-02-11 greg Generate differentiated error codes for buffer oob checking (#4144) 2021-02-10 dj2 Update a few virtuals to overrides. (#4143) 2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133) 2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134) 2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132) 2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119) 2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122) 2021-01-28 stevenperron Mark module as modified if convert-to-half removes decorations. (#4127) 2021-01-28 jaebaek Set correct scope and line info for DebugValue (#4125) 2021-01-27 caio.oliveira Validate SPV_KHR_workgroup_memory_explicit_layout (#4128) 2021-01-27 alanbaker Validate VK_KHR_zero_initialize_workgroup_memory (#4124) 2021-01-27 46493288+sfricke-samsung spirv-val: Add Vulkan image gather offset VUID (#4118) 2021-01-27 alanbaker Add cmake to windows path for kokoro (#4129) 2021-01-25 46493288+sfricke-samsung spirv-val: Label Vulkan atomic semantics VUIDs (#4120) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04662 (#4123) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04683 (#4121) 2021-01-22 machenbach Remove obsolete GN config (#4110) 2021-01-20 46493288+sfricke-samsung spirv-val: Add Vulkan EXT builtins (#4115) 2021-01-20 dneto Support pending Intel extensions (#4116) 2021-01-19 dneto Validate Sampled=1 for Vulkan ImageQuerySizeLod, ImageQueryLevels, ImageQueryLod (#4103) 2021-01-19 46493288+sfricke-samsung spirv-val: Add Vulkan Memory Scope VUs (#4106) 2021-01-18 bclayton Migrate all Kokoro build scripts over to use the docker VM image (#4114) 2021-01-15 46493288+sfricke-samsung spirv-val: Add Vulkan Addressing Model check (#4107) 2021-01-14 rharrison Remove WebGPU support (#4108) 2021-01-14 46493288+sfricke-samsung spirv-val: Vulkan atomic storage class (#4079) 2021-01-13 jaebaek Avoid integrity check failures caused by propagating line instructions (#4096) 2021-01-13 pierremoreau Linker usability improvements (#4084) 2021-01-12 dj2 Revert "Generate differentiated error codes for buffer oob checking (#4097)" (#4100) 2021-01-11 greg Generate differentiated error codes for buffer oob checking (#4097) 2021-01-07 dneto use std::string::empty() to test for emptiness (#4098) 2021-01-07 46493288+sfricke-samsung spirv-val: Label standalone Vulkan VUID (#4091) 2021-01-06 46493288+sfricke-samsung spirv-val: Add Vulkan decroation VUID (#4090) 2021-01-06 stevenperron Fix binding number calculation in desc sroa (#4095) (...) 2020-05-19 vasniktel spirv-fuzz: Remove FuzzerPassAddUsefulConstructs (#3341) 2020-05-19 vasniktel Add support for StorageBuffer (#3348) 2020-05-19 462213+sl1pkn07 Prevent Effcee install his things when build spirv-tools with testing enabled (#3256) 2020-05-19 stevenperron Don't register edges twice in merge return (#3350) 2020-05-14 stevenperron Revert "Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342)" (#3345) 2020-05-14 afdx spirv-reduce: Remove unused struct members (#3329) 2020-05-14 andreperezmaselco.developer Add adjust branch weights transformation (#3336) 2020-05-13 stevenperron Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342) 2020-05-13 jaebaek [spirv-opt] refactor inlining pass (#3328) 2020-05-13 afdx spirv-reduce: Remove unused uniforms and similar (#3321) 2020-05-13 afdx spirv-fuzz: Fix to fact manager (#3339) 2020-05-13 afdx spirv-fuzz: Get rid of unnecessary template method (#3340) 2020-05-12 stevenperron Do merge return if the return is not at the end of the function. (#3337) 2020-05-06 jaebaek Preserve debug info for wrap-opkill (#3331) 2020-05-05 jbolz Validate ShaderCallKHR memory scope (#3332) 2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (#3316) 2020-04-30 paulthomson reduce: increase default step limit (#3327) 2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (#3325) 2020-04-28 stevenperron Delete nullptr in function bb list immedietly (#3326) 2020-04-28 jaebaek Set DebugScope for termination instructions (#3323) 2020-04-28 afdx spirv-fuzz: Do not outline regions that end with a loop header (#3312) 2020-04-27 bclayton vscode: Handle '|' chains on BitEnum / ValueEnum (#3309) 2020-04-27 jaebaek Add debug information analysis (#3305) 2020-04-27 dneto Add spvtools::opt::Operand::AsLiteralUint64 (#3320) 2020-04-27 afdx spirv-fuzz: Pass on validator options during shrinking (#3317) 2020-04-27 afdx spirv-fuzz: Clamp statically out-of-bounds accesses in code donation (#3315) 2020-04-27 afdx spirv-fuzz: Fix memory management in the fact manager (#3313) 2020-04-27 afdx spirv-fuzz: Do not replace the Sample argument in OpImageTexelPointer (#3311) 2020-04-23 afdx Allow various validation options to be passed to spirv-opt (#3314) 2020-04-23 Chaitanyas0101 typo fix: in README.md exectuable->executable (#3306) 2020-04-20 afdx spirv-fuzz: Make handling of synonym facts more efficient (#3301) 2020-04-15 stevenperron Remove unreachable code. (#3304) 2020-04-15 afdx spirv-fuzz: Fix to outliner (#3302) 2020-04-14 afdx spirv-fuzz: Do not outline regions that produce pointer outputs (#3291) 2020-04-14 afdx spirv-fuzz: Handle OpRuntimeArray when replacing ids with synonyms (#3292) 2020-04-14 afdx spirv-fuzz: Handle image storage class in donation (#3290) 2020-04-14 afdx spirv-fuzz: Respect rules for OpSampledImage (#3287) 2020-04-14 afdx spirv-fuzz: Fix comment. (#3300) 2020-04-14 stevenperron Sampled images as read-only storage (#3295) 2020-04-14 alanbaker Remove implicit fallthrough (#3298) 2020-04-14 stevenperron Add tests for recently added command line option (#3297) 2020-04-14 dneto If SPIRV-Headers is in our tree, include it as subproject (#3299) 2020-04-13 stevenperron Struct CFG analysus and single block loop (#3293) 2020-04-13 jaebaek Preserve debug info in eliminate-dead-functions (#3251) 2020-04-13 stevenperron Update acorn version (#3294) 2020-04-09 stevenperron Handle more cases in dead member elim (#3289) 2020-04-09 h.baensch.92 Fix pch macro to ignore clang-cl (#3283) 2020-04-07 afdx spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 afdx spirv-fuzz: Handle more general SPIR-V in donation (#3280) 2020-04-06 afdx spirv-fuzz: Improve support for compute shaders in donation (#3277) Created with: roll-dep third_party/externals/spirv-headers third_party/externals/spirv-tools Bug: dawn:706 Change-Id: I4ca1acd84b4905cf5454e146a917e36fc8c2d399 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381237 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Stephen White <senorblanco@google.com> Reviewed-by: Eric Boren <borenet@google.com>
2021-03-08 14:25:34 +00:00
"//third_party/externals/spirv-tools:spvtools",
Roll spirv-tools and spirv-headers and use upstream GN files This will allow rolling spirv-tools and spirv-headers without additional manual changes to fix Skia's copy of their BUILD.gn files. Roll third_party/externals/spirv-headers/ c0df742ec..bcf55210f (59 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+log/c0df742ec0b8..bcf55210f13a $ git log c0df742ec..bcf55210f --date=short --no-merges --format='%ad %ae %s' 2020-07-03 dneto Support SPV_KHR_expect_assume 2020-07-03 dneto Support SPV_KHR_linkonce_odr 2021-03-01 alanbaker Change operand name in OpReadClockKHR to match extension 2021-02-13 dmalyshau Add Naga as SPIR-V generation tool 2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max 2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation 2021-01-19 dneto Header generator: Check enumerant ordering 2021-01-27 ben.ashbaugh add generated headers 2021-01-27 ben.ashbaugh add None as a possible value for DebugInfoFlags 2021-01-25 caio.oliveira Add SPV_KHR_workgroup_memory_explicit_layout 2021-01-20 dneto Push FPDenormMode, FPOperationMode to the end 2021-01-20 dmitry.sidorov Apply suggestions to Intel extensions PR 2020-12-16 dmitry.sidorov Update generated files 2020-12-16 dmitry.sidorov Add SPV_INTEL_long_constant_composite extension 2020-12-16 dmitry.sidorov Add SPV_INTEL_loop_fuse extension 2020-11-23 dmitry.sidorov Add SPV_INTEL_fpga_cluster_attributes and SPV_INTEL_fp_fast_math_mode 2020-11-23 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls extension 2020-11-16 dmitry.sidorov Update SPV_INTEL_kernel_attributes extension 2020-11-09 dmitry.sidorov Update SPV_INTEL_function_pointers extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_float_controls2 extension 2020-11-09 dmitry.sidorov Upstream SPV_INTEL_vector_compute extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_fpga_memory_accesses extension 2020-11-06 dmitry.sidorov Upstream SPV_INTEL_io_pipes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_variable_length_array extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_usm_storage_classes extension 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_arbitrary_precision_integers extensions 2020-11-05 dmitry.sidorov Upstream SPV_INTEL_inline_assembly extension 2020-11-03 dmitry.sidorov Upstream SPV_INTEL_fpga_buffer_location extension 2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension 2020-11-26 dkoch remove HitTKHR 2020-11-12 dneto MeshShadingNV enables builtins PrimitiveId, Layer, and ViewportIndex 2020-10-16 dkoch de-alias/reassign OpIgnoreIntersectionKHR/OpTerminateRayKHR 2020-06-29 alele Raytracing and Rayquery updates for final 2020-06-15 alele Updated headers for new trace/executeCallable and acceleration structure cast. 2020-11-05 orbea cmake: Install cmake files to CMAKE_INSTALL_DATADIR 2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175) 2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174) 2020-10-23 john Bump revision to 4, for SPIR-V 1.5. 2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170) 2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172) 2020-10-12 hwguy.siplus Register the Xenia emulator as a generator (#171) 2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169) 2020-09-10 syoussefi Register the ANGLE compiler (#168) 2020-09-08 cepheus Rebuild of latest headers, which slightly moves OpTerminateInvocation 2020-08-03 44190824+mmerecki Reserve SPIR-V token range for upcoming Intel extensions. (#165) 2020-07-29 alanbaker Update BUILD.bazel and BUILD.gn (#166) 2020-07-29 alanbaker Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164) 2020-07-29 johnkslang Update the registry in spir-v.xml to modernize and split out opcodes. (#156) 2020-07-21 alanbaker Support SPV_KHR_terminate_invocation (#163) 2020-07-19 vkushwaha Add changes for SPV_EXT_shader_atomic_float 2020-06-26 dj2 Register the Tint compiler 2020-06-01 dneto spir-v.xml: Use plain ASCII quotes in comment 2020-05-29 cepheus Rebuild headers against the previous grammar commit. 2020-05-29 dmitry.sidorov Apply suggestions 2020-04-05 dmitry.sidorov Add Intel specific definitions from KhronosGroup/SPIRV-LLVM-Translator 2020-05-29 cepheus Header build from previous grammar update. 2020-05-25 michael.kinsner Propose bit allocation mechanism for the FP Fast Math Mode bitfield, following from the mechanism previously added for the loop control bitfield. 2020-05-20 dneto Update example to use unified1 headers 2020-04-05 dmitry.sidorov Add SPV_INTEL_function_pointers preview extension Roll third_party/externals/spirv-tools/ e95fbfb1f..5d8c40399 (488 commits) https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/e95fbfb1f509..5d8c40399e1a $ git log e95fbfb1f..5d8c40399 --date=short --no-merges --format='%ad %ae %s' 2021-03-11 cwallez BUILD.gn: fix typo for 'cflags' (#4169) 2021-03-10 cwallez Suppress warning (#4168) 2021-03-10 alastair.donaldson spirv-fuzz: Avoid unnecessary dependency (#4165) 2021-03-10 dgkoch Add `void` in function declaration to keep some compilers happy (#4160) 2021-03-09 cwallez Fix -Wextra-semi-stmt -Wsuggest-destructor-override -Wdeprecated-copy-dtor (#4164) 2021-03-08 46493288+sfricke-samsung spirv-val: Vulkan 64-bit OpAtomicStore check (#4163) 2021-03-05 vasniktel spirv-fuzz: Fix the bug in TransformationReplaceBranchFromDeadBlockWithExit (#4140) 2021-03-05 vasniktel spirv-fuzz: Fix PartialCount (#4159) 2021-03-03 afd spirv-fuzz: Handle Vulkan SPIR-V versions (#4156) 2021-03-03 vasniktel spirv-fuzz: Add persistent state to the fuzzer (#4137) 2021-03-02 alanbaker Require an OpSelectionMerge before an OpSwitch (#4154) 2021-03-01 stevenperron Use standard function to get stdin to binary mode. (#4141) 2021-02-26 bclayton Fixes for the vscode language server extension (#4150) 2021-02-19 atte.seppala spirv-opt: Don't call GenerateCopy for mismatched image types (#4126) 2021-02-18 jaebaek Start SPIRV-Tools v2021.0 2021-02-18 jaebaek Finalize SPIRV-Tools v2020.7 2021-02-16 jaebaek Update CHANGES 2021-02-11 greg Generate differentiated error codes for buffer oob checking (#4144) 2021-02-10 dj2 Update a few virtuals to overrides. (#4143) 2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133) 2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134) 2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132) 2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119) 2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122) 2021-01-28 stevenperron Mark module as modified if convert-to-half removes decorations. (#4127) 2021-01-28 jaebaek Set correct scope and line info for DebugValue (#4125) 2021-01-27 caio.oliveira Validate SPV_KHR_workgroup_memory_explicit_layout (#4128) 2021-01-27 alanbaker Validate VK_KHR_zero_initialize_workgroup_memory (#4124) 2021-01-27 46493288+sfricke-samsung spirv-val: Add Vulkan image gather offset VUID (#4118) 2021-01-27 alanbaker Add cmake to windows path for kokoro (#4129) 2021-01-25 46493288+sfricke-samsung spirv-val: Label Vulkan atomic semantics VUIDs (#4120) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04662 (#4123) 2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04683 (#4121) 2021-01-22 machenbach Remove obsolete GN config (#4110) 2021-01-20 46493288+sfricke-samsung spirv-val: Add Vulkan EXT builtins (#4115) 2021-01-20 dneto Support pending Intel extensions (#4116) 2021-01-19 dneto Validate Sampled=1 for Vulkan ImageQuerySizeLod, ImageQueryLevels, ImageQueryLod (#4103) 2021-01-19 46493288+sfricke-samsung spirv-val: Add Vulkan Memory Scope VUs (#4106) 2021-01-18 bclayton Migrate all Kokoro build scripts over to use the docker VM image (#4114) 2021-01-15 46493288+sfricke-samsung spirv-val: Add Vulkan Addressing Model check (#4107) 2021-01-14 rharrison Remove WebGPU support (#4108) 2021-01-14 46493288+sfricke-samsung spirv-val: Vulkan atomic storage class (#4079) 2021-01-13 jaebaek Avoid integrity check failures caused by propagating line instructions (#4096) 2021-01-13 pierremoreau Linker usability improvements (#4084) 2021-01-12 dj2 Revert "Generate differentiated error codes for buffer oob checking (#4097)" (#4100) 2021-01-11 greg Generate differentiated error codes for buffer oob checking (#4097) 2021-01-07 dneto use std::string::empty() to test for emptiness (#4098) 2021-01-07 46493288+sfricke-samsung spirv-val: Label standalone Vulkan VUID (#4091) 2021-01-06 46493288+sfricke-samsung spirv-val: Add Vulkan decroation VUID (#4090) 2021-01-06 stevenperron Fix binding number calculation in desc sroa (#4095) (...) 2020-05-19 vasniktel spirv-fuzz: Remove FuzzerPassAddUsefulConstructs (#3341) 2020-05-19 vasniktel Add support for StorageBuffer (#3348) 2020-05-19 462213+sl1pkn07 Prevent Effcee install his things when build spirv-tools with testing enabled (#3256) 2020-05-19 stevenperron Don't register edges twice in merge return (#3350) 2020-05-14 stevenperron Revert "Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342)" (#3345) 2020-05-14 afdx spirv-reduce: Remove unused struct members (#3329) 2020-05-14 andreperezmaselco.developer Add adjust branch weights transformation (#3336) 2020-05-13 stevenperron Revert "[spirv-opt] refactor inlining pass (#3328)" (#3342) 2020-05-13 jaebaek [spirv-opt] refactor inlining pass (#3328) 2020-05-13 afdx spirv-reduce: Remove unused uniforms and similar (#3321) 2020-05-13 afdx spirv-fuzz: Fix to fact manager (#3339) 2020-05-13 afdx spirv-fuzz: Get rid of unnecessary template method (#3340) 2020-05-12 stevenperron Do merge return if the return is not at the end of the function. (#3337) 2020-05-06 jaebaek Preserve debug info for wrap-opkill (#3331) 2020-05-05 jbolz Validate ShaderCallKHR memory scope (#3332) 2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (#3316) 2020-04-30 paulthomson reduce: increase default step limit (#3327) 2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (#3325) 2020-04-28 stevenperron Delete nullptr in function bb list immedietly (#3326) 2020-04-28 jaebaek Set DebugScope for termination instructions (#3323) 2020-04-28 afdx spirv-fuzz: Do not outline regions that end with a loop header (#3312) 2020-04-27 bclayton vscode: Handle '|' chains on BitEnum / ValueEnum (#3309) 2020-04-27 jaebaek Add debug information analysis (#3305) 2020-04-27 dneto Add spvtools::opt::Operand::AsLiteralUint64 (#3320) 2020-04-27 afdx spirv-fuzz: Pass on validator options during shrinking (#3317) 2020-04-27 afdx spirv-fuzz: Clamp statically out-of-bounds accesses in code donation (#3315) 2020-04-27 afdx spirv-fuzz: Fix memory management in the fact manager (#3313) 2020-04-27 afdx spirv-fuzz: Do not replace the Sample argument in OpImageTexelPointer (#3311) 2020-04-23 afdx Allow various validation options to be passed to spirv-opt (#3314) 2020-04-23 Chaitanyas0101 typo fix: in README.md exectuable->executable (#3306) 2020-04-20 afdx spirv-fuzz: Make handling of synonym facts more efficient (#3301) 2020-04-15 stevenperron Remove unreachable code. (#3304) 2020-04-15 afdx spirv-fuzz: Fix to outliner (#3302) 2020-04-14 afdx spirv-fuzz: Do not outline regions that produce pointer outputs (#3291) 2020-04-14 afdx spirv-fuzz: Handle OpRuntimeArray when replacing ids with synonyms (#3292) 2020-04-14 afdx spirv-fuzz: Handle image storage class in donation (#3290) 2020-04-14 afdx spirv-fuzz: Respect rules for OpSampledImage (#3287) 2020-04-14 afdx spirv-fuzz: Fix comment. (#3300) 2020-04-14 stevenperron Sampled images as read-only storage (#3295) 2020-04-14 alanbaker Remove implicit fallthrough (#3298) 2020-04-14 stevenperron Add tests for recently added command line option (#3297) 2020-04-14 dneto If SPIRV-Headers is in our tree, include it as subproject (#3299) 2020-04-13 stevenperron Struct CFG analysus and single block loop (#3293) 2020-04-13 jaebaek Preserve debug info in eliminate-dead-functions (#3251) 2020-04-13 stevenperron Update acorn version (#3294) 2020-04-09 stevenperron Handle more cases in dead member elim (#3289) 2020-04-09 h.baensch.92 Fix pch macro to ignore clang-cl (#3283) 2020-04-07 afdx spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 afdx spirv-fuzz: Handle more general SPIR-V in donation (#3280) 2020-04-06 afdx spirv-fuzz: Improve support for compute shaders in donation (#3277) Created with: roll-dep third_party/externals/spirv-headers third_party/externals/spirv-tools Bug: dawn:706 Change-Id: I4ca1acd84b4905cf5454e146a917e36fc8c2d399 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381237 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Stephen White <senorblanco@google.com> Reviewed-by: Eric Boren <borenet@google.com>
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",
]
}
}
}
if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac)) {
test_app("HelloWorld") {
sources = [ "example/HelloWorld.cpp" ]
libs = []
deps = [
":flags",
":gpu_tool_utils",
":sk_app",
":skia",
":tool_utils",
]
}
}
if (skia_qt_path != "" && (is_win || is_linux || is_mac)) {
action_foreach("generate_mocs") {
script = "gn/call.py"
sources = [ "tools/mdbviz/MainWindow.h" ]
outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp" ]
args = [
"$skia_qt_path" + "/bin/moc",
"{{source}}",
"-o",
"gen/mdbviz/{{source_name_part}}_moc.cpp",
]
}
action_foreach("generate_resources") {
script = "gn/call.py"
sources = [ "tools/mdbviz/resources.qrc" ]
outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp" ]
args = [
"$skia_qt_path" + "/bin/rcc",
"{{source}}",
"-o",
"gen/mdbviz/{{source_name_part}}_res.cpp",
]
}
test_app("mdbviz") {
if (is_win) {
# on Windows we need to disable some exception handling warnings due to the Qt headers
cflags = [ "/Wv:18" ] # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017
}
sources = [
"tools/UrlDataManager.cpp",
"tools/debugger/DebugCanvas.cpp",
"tools/debugger/DebugLayerManager.cpp",
"tools/debugger/DrawCommand.cpp",
"tools/debugger/JsonWriteBuffer.cpp",
"tools/mdbviz/MainWindow.cpp",
"tools/mdbviz/Model.cpp",
"tools/mdbviz/main.cpp",
# generated files
"$target_gen_dir/mdbviz/MainWindow_moc.cpp",
"$target_gen_dir/mdbviz/resources_res.cpp",
]
lib_dirs = [ "$skia_qt_path/lib" ]
libs = [
"Qt5Core.lib",
"Qt5Gui.lib",
"Qt5Widgets.lib",
]
include_dirs = [
"$skia_qt_path/include",
"$skia_qt_path/include/QtCore",
"$skia_qt_path/include/QtWidgets",
]
deps = [
":generate_mocs",
":generate_resources",
":skia",
]
}
}
Strengthen is_official_build, update docs. This makes is_official_build turn off all development targets and features in Skia, including building third-party dependencies from source. This will intentionally break some external users, who will find themselves no longer able to find third-party headers or link against third-party libraries. These users have been building with our testing third-party dependencies unknowingly. They'll need to either explicitly turn back on building each dependency from source (skia_use_system_foo=false) or disable that dependency entirely (skia_use_foo=false). is_skia_standalone is now basically !is_official_build, so I've propagated that through, removing is_skia_standalone. In a few places we were using it as a stand-in for defined(ndk), so I've just written defined(ndk) there. Duh. gn_to_bp: is_offical_build's new strength also makes gn_to_bp.py simpler to write. In spirit, Android builds are official Skia builds that also build DM and nanobench. It seems that SkJumper (src/jumper/*) is (unintentionally) enabled on Android. Switching to an is_official_build would have disabled that. But as that accidental launch seems to have gone fine, I've kept it explicitly enabled. In the end, no changes to Android.bp or its SkUserConfig.h. The -Mini builder no longer needs to explicitly disable tools. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73 Reviewed-on: https://skia-review.googlesource.com/9190 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-03 14:21:30 +00:00
if (is_android && defined(ndk) && ndk != "") {
copy("gdbserver") {
sources = [ "$ndk/$ndk_gdbserver" ]
outputs = [ "$root_out_dir/gdbserver" ]
}
}
skia_executable("cpu_modules") {
sources = [ "tools/cpu_modules.cpp" ]
deps = [
":skia",
"modules/particles",
]
}
if (skia_use_icu && skia_use_harfbuzz) {
test_app("editor") {
is_shared_library = is_android
deps = [ "modules/skplaintexteditor:editor_app" ]
}
test_app("text_editor") {
is_shared_library = is_android
deps = [ "experimental/sktext:text_editor" ]
}
}
skia_executable("image_diff_metric") {
sources = [ "tools/image_diff_metric.cpp" ]
deps = [ ":skia" ]
}
group("modules_testonly") {
testonly = true
deps = []
if (is_wasm) {
deps += [ "modules/canvaskit:viewer_wasm" ]
}
}
if (skia_build_fuzzers) {
template("libfuzzer_app") {
skia_executable(target_name) {
output_dir = root_build_dir
check_includes = false
forward_variables_from(invoker, "*", [ "is_shared_library" ])
if (!defined(configs)) {
configs = []
}
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",
]
deps = [ "modules/svg" ]
}
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",
]
deps = [ "modules/svg" ]
}
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 = [
"modules/svg",
"//third_party/libpng",
]
}
libfuzzer_app("api_draw_functions") {
sources = [
"fuzz/FuzzDrawFunctions.cpp",
"fuzz/oss_fuzz/FuzzDrawFunctions.cpp",
]
deps = []
}
libfuzzer_app("api_ddl_threading") {
sources = [
"fuzz/FuzzDDLThreading.cpp",
"fuzz/oss_fuzz/FuzzDDLThreading.cpp",
]
deps = []
}
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 = []
}
libfuzzer_app("api_triangulation") {
sources = [
"fuzz/FuzzTriangulation.cpp",
"fuzz/oss_fuzz/FuzzTriangulation.cpp",
]
deps = []
}
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 = [
"modules/svg",
"//third_party/libpng",
]
}
libfuzzer_app("api_regionop") {
sources = [
"fuzz/FuzzRegionOp.cpp",
"fuzz/oss_fuzz/FuzzRegionOp.cpp",
]
deps = []
}
if (skia_enable_gpu) {
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 = [
"modules/svg",
"//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 = [
"modules/svg",
"//third_party/libpng",
]
}
libfuzzer_app("api_skparagraph") {
sources = [
"fuzz/FuzzSkParagraph.cpp",
"fuzz/oss_fuzz/FuzzSkParagraph.cpp",
"tools/Resources.cpp",
]
deps = [ "modules/skparagraph" ]
}
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 = [
"modules/svg",
"//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",
"modules/svg",
]
}
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" ]
deps = [ "modules/svg" ]
}
libfuzzer_app("skruntimeeffect") {
sources = [ "fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp" ]
deps = []
}
libfuzzer_app("skp") {
sources = [ "fuzz/oss_fuzz/FuzzSKP.cpp" ]
deps = []
}
}
}
if (is_ios && skia_use_metal && skia_enable_gpu &&
!skia_enable_flutter_defines) {
group("minimal_ios_mtl_skia_app") {
deps = [ "experimental/minimal_ios_mtl_skia_app" ]
}
}
if (is_ios && skia_enable_skottie && !skia_enable_flutter_defines) {
group("skottie_ios") {
deps = [ "tools/skottie_ios_app" ]
}
}
skia_executable("skia_c_api_example") {
sources = [ "experimental/c-api-example/skia-c-example.c" ]
include_dirs = [ "." ]
deps = [ ":skia" ]
}