Skip to content

Commit

Permalink
Merge 'google/chrome/m116' into 'dev/update'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Apr 11, 2024
2 parents a000879 + d2c2112 commit 685ebdb
Show file tree
Hide file tree
Showing 1,304 changed files with 48,495 additions and 28,464 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ bin/sk.exe
bin/sk.version
third_party/ninja
third_party/rust-toolchain
bin/ninja
bin/ninja.exe
bin/ninja.version

Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ George Wright <[email protected]>
GiWan Go <[email protected]>
Google Inc. <*@google.com>
Herb Derby <[email protected]>
Ho Cheung <[email protected]>
Igalia <*@igalia.com>
Intel <*@intel.com>
Ion Rosca <[email protected]>
Expand Down
102 changes: 25 additions & 77 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -175,45 +175,13 @@ template("opts") {

is_x86 = current_cpu == "x64" || current_cpu == "x86"

opts("crc32") {
enabled = current_cpu == "arm64"
sources = skia_opts.crc32_sources
cflags = [ "-march=armv8-a+crc" ]
}

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" ]
if (!is_win) {
cflags += [
"-fomit-frame-pointer",
"-momit-leaf-frame-pointer",
]
} else {
cflags += [ "/Oy-" ]
}
}
}

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" ]
if (!is_win) {
cflags += [
"-fomit-frame-pointer",
"-momit-leaf-frame-pointer",
]
} else {
cflags += [ "/Oy-" ]
}
}
}

Expand All @@ -224,17 +192,6 @@ opts("avx") {
cflags = [ "/arch:AVX" ]
} else {
cflags = [ "-mavx" ]
if (!is_win) {
cflags += [
"-fomit-frame-pointer",
"-momit-leaf-frame-pointer",
]
} else {
cflags += [ "/Oy-" ]
}
if (is_mac && is_debug) {
cflags += [ "-fno-stack-check" ] # Work around skia:9709
}
}
}

Expand All @@ -245,17 +202,6 @@ opts("hsw") {
cflags = [ "/arch:AVX2" ]
} else {
cflags = [ "-march=haswell" ]
if (!is_win) {
cflags += [
"-fomit-frame-pointer",
"-momit-leaf-frame-pointer",
]
} else {
cflags += [ "/Oy-" ]
}
if (is_mac && is_debug) {
cflags += [ "-fno-stack-check" ] # Work around skia:9709
}
}
}

Expand All @@ -266,17 +212,6 @@ opts("skx") {
cflags = [ "/arch:AVX512" ]
} else {
cflags = [ "-march=skylake-avx512" ]
if (!is_win) {
cflags += [
"-fomit-frame-pointer",
"-momit-leaf-frame-pointer",
]
} else {
cflags += [ "/Oy-" ]
}
if (is_mac && is_debug) {
cflags += [ "-fno-stack-check" ] # Work around skia:9709
}
}
}

Expand Down Expand Up @@ -1303,12 +1238,6 @@ optional("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" ]
Expand All @@ -1319,6 +1248,22 @@ optional("pdf") {
deps += [ "//third_party/sfntly" ]
defines = [ "SK_PDF_USE_SFNTLY" ]
}

if (skia_use_libjpeg_turbo_decode) {
deps += [
":jpeg_decode",

# This is not a public_dep so we need to directly depend on it
# to use jpeg headers
"//third_party/libjpeg-turbo:libjpeg",
]
sources += [ "src/pdf/SkJpegInfo_libjpegturbo.cpp" ]
} else {
sources += [ "src/pdf/SkJpegInfo_none.cpp" ]
}
if (skia_use_libjpeg_turbo_encode) {
deps += [ ":jpeg_encode" ]
}
}

optional("xps") {
Expand Down Expand Up @@ -1377,10 +1322,11 @@ optional("typeface_freetype") {
}

optional("typeface_fontations") {
public_defines = [ "SK_TYPEFACE_FACTORY_FONTATIONS" ]
enabled = skia_use_fontations
sources = [
"src/ports/SkTypeface_fontations.cpp",
"src/ports/SkTypeface_fontations.h",
"src/ports/SkTypeface_fontations_priv.h",
]
}

Expand Down Expand Up @@ -1477,7 +1423,6 @@ skia_component("skia") {
":android_utils",
":avif",
":avx",
":crc32",
":fontmgr_factory",
":heif",
":hsw",
Expand All @@ -1488,7 +1433,6 @@ skia_component("skia") {
":raw",
":skvm_jit",
":skx",
":sse42",
":ssse3",
":vello",
":webp_decode",
Expand All @@ -1504,8 +1448,10 @@ skia_component("skia") {

sources = []
sources += skia_core_sources
sources += skia_utils_sources
sources += skia_utils_private
sources += skia_utils_chromium
sources += skia_effects_sources
sources += skia_colorfilters_sources
sources += skia_effects_imagefilter_sources
sources += skia_codec_core
sources += skia_codec_decode_bmp
Expand Down Expand Up @@ -1533,11 +1479,14 @@ skia_component("skia") {
if (skia_enable_sksl) {
deps += [ ":minify_sksl" ]
sources += skia_sksl_sources
sources += skia_colorfilters_sksl_sources

if (skia_enable_sksl_tracing) {
defines += [ "SKSL_ENABLE_TRACING" ]
sources += skia_sksl_tracing_sources
}
} else {
sources += skia_colorfilters_nosksl_sources
}

if (skia_build_for_debugger) {
Expand Down Expand Up @@ -1674,9 +1623,7 @@ skia_static_library("pathkit") {

deps = [
":avx",
":crc32",
":hsw",
":sse42",
":ssse3",
]

Expand Down Expand Up @@ -2372,6 +2319,7 @@ if (skia_enable_tools) {
}
test_app("imgcvt") {
sources = [ "tools/imgcvt.cpp" ]
configs = [ ":our_vulkan_headers" ]
deps = [
":skia",
"modules/skcms",
Expand Down
20 changes: 10 additions & 10 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling different
# dependencies without interference from each other.
'sk_tool_revision': 'git_revision:97f14b3b6c39e716df838991a156f67df0f785a8',
'sk_tool_revision': 'git_revision:850bcdd8dfedeb7f6b230453fc3e4dd9448d9297',

# ninja CIPD package version.
# https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja
Expand All @@ -19,12 +19,12 @@ vars = {
# ./tools/git-sync-deps
deps = {
"buildtools" : "https://chromium.googlesource.com/chromium/src/buildtools.git@b138e6ce86ae843c42a1a08f37903207bebcca75",
"third_party/externals/angle2" : "https://chromium.googlesource.com/angle/angle.git@3f633521356d65679acaba2918c014fcbd8c0a5e",
"third_party/externals/angle2" : "https://chromium.googlesource.com/angle/angle.git@84379a5294073b0f702fa0bbe909c93805cc870a",
"third_party/externals/brotli" : "https://skia.googlesource.com/external/github.com/google/brotli.git@6d03dfbedda1615c4cba1211f8d81735575209c8",
"third_party/externals/d3d12allocator" : "https://skia.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git@169895d529dfce00390a20e69c2f516066fe7a3b",
# Dawn requires jinja2 and markupsafe for the code generator, tint for SPIRV compilation, and abseil for string formatting.
# When the Dawn revision is updated these should be updated from the Dawn DEPS as well.
"third_party/externals/dawn" : "https://dawn.googlesource.com/dawn.git@cd1fb6876701b89ced4e101bf8da422ee4d364ec",
"third_party/externals/dawn" : "https://dawn.googlesource.com/dawn.git@0d5e76a2427f1c629a0d709ee0833da43bf79e84",
"third_party/externals/jinja2" : "https://chromium.googlesource.com/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6",
"third_party/externals/markupsafe" : "https://chromium.googlesource.com/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a",
"third_party/externals/abseil-cpp" : "https://skia.googlesource.com/external/github.com/abseil/abseil-cpp.git@cb436cf0142b4cbe47aae94223443df7f82e2920",
Expand All @@ -50,17 +50,17 @@ deps = {
"third_party/externals/perfetto" : "https://android.googlesource.com/platform/external/perfetto@93885509be1c9240bc55fa515ceb34811e54a394",
"third_party/externals/piex" : "https://android.googlesource.com/platform/external/piex.git@bb217acdca1cc0c16b704669dd6f91a1b509c406",
"third_party/externals/sfntly" : "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git@b55ff303ea2f9e26702b514cf6a3196a2e3e2974",
"third_party/externals/swiftshader" : "https://swiftshader.googlesource.com/SwiftShader@f549d5e6c6635ec8b75fb544a6bdc9f48bfb1dd3",
"third_party/externals/swiftshader" : "https://swiftshader.googlesource.com/SwiftShader@ae667fe96db9b7f76edea242015d61f293c7210e",
"third_party/externals/vulkanmemoryallocator" : "https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@7de5cc00de50e71a3aab22dea52fbb7ff4efceb6",
# vulkan-deps is a meta-repo containing several interdependent Khronos Vulkan repositories.
# When the vulkan-deps revision is updated, those repos (spirv-*, vulkan-*) should be updated as well.
"third_party/externals/vulkan-deps" : "https://chromium.googlesource.com/vulkan-deps@8a3971e5e9c5cddc437d1cf5e4ac1ed0728d6a49",
"third_party/externals/spirv-cross" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross@12542fc6fc05000e04742daf93892a0b10edbe80",
"third_party/externals/spirv-headers" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git@bdbfd019be6952fd8fa9bd5606a8798a7530c853",
"third_party/externals/spirv-tools" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git@e7c6084fd1d6d6f5ac393e842728d8be309688ca",
"third_party/externals/vulkan-deps" : "https://chromium.googlesource.com/vulkan-deps@90577eb35eea01011e237747e92ee1fbe199d4c3",
"third_party/externals/spirv-cross" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross@2d3a152081ca6e6bea7093940d0f81088fe4d01c",
"third_party/externals/spirv-headers" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git@6e09e44cd88a5297433411b2ee52f4cf9f50fa90",
"third_party/externals/spirv-tools" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git@a63ac9f73d29cd27cdb6e3388d98d1d934e512bb",
"third_party/externals/vello" : "https://skia.googlesource.com/external/github.com/linebender/vello.git@ef2630ad9c647b90863cb0915701d54725733968",
"third_party/externals/vulkan-headers" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers@9e61870ecbd32514113b467e0a0c46f60ed222c7",
"third_party/externals/vulkan-tools" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools@80b010b1e1b08c1f092fb2bfa337faadf8ea1ba3",
"third_party/externals/vulkan-headers" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers@c1a8560c5cf5e7bd6dbc71fe69b1a317411c36b8",
"third_party/externals/vulkan-tools" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools@ca8bb4ee3cc9afdeca4b49c5ef758bad7cce2c72",
#"third_party/externals/v8" : "https://chromium.googlesource.com/v8/v8.git@5f1ae66d5634e43563b2d25ea652dfb94c31a3b4",
"third_party/externals/wuffs" : "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git@a0041ac0310b3156b963e2f2bea09245f25ec073",
"third_party/externals/zlib" : "https://chromium.googlesource.com/chromium/src/third_party/zlib@3ca9f16f02950edffa391ec19cea856090158e9e",
Expand Down
3 changes: 2 additions & 1 deletion PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ def _CheckBazelBUILDFiles(input_api, output_api):
excluded_paths = ["infra/", "bazel/rbe/", "bazel/external/", "bazel/common_config_settings/",
"modules/canvaskit/go/", "experimental/", "bazel/platform", "third_party/",
"tests/", "resources/", "bazel/deps_parser/", "bazel/exporter_tool/",
"tools/gpu/gl/interface/", "bazel/utils/", "include/config/"]
"tools/gpu/gl/interface/", "bazel/utils/", "include/config/",
"bench/"]
is_excluded = any(affected_file_path.startswith(n) for n in excluded_paths)
if is_bazel and not is_excluded:
with open(affected_file_path, 'r') as file:
Expand Down
43 changes: 43 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@ Skia Graphics Release Notes

This file includes a list of high level updates for each milestone release.

Milestone 116
-------------
* `SkPromiseImageTexture` has been removed from the public API, as well as
`SkImages::PromiseTextureFrom` and `SkImages::PromiseTextureFromYUVA`, public consumers of that
data type.
* `SkDeferredDisplayList`, `SkDeferredDisplayListRecorder`, and `SkSurfaceCharacterization` have
been removed from the public API.
* The intermediate color computed by `SkBlenders::Arithmetic` is now always clamped to between 0 and 1 (inclusive), and then `enforcePremul` is applied when that parameter is true.
* Added a new public type, `SkColorTable`, to own the lookup tables passed into `SkColorFilters::Table`, which allows clients and the returned `SkColorFilter` to share the table memory instead of having to duplicate it in any wrapper types that lazily create Skia representations.
* The deprecated `SkImageFilters::Magnifier` factory that did *not* take a lens bounds parameter has been removed.
* `SkImageFilters::RuntimeShader` has variations that take a maximum sample radius, which is used to provide padded input images to the runtime effect so that boundary conditions are avoided.
* `SkImageFilters::AlphaThreshold` has been removed. Its only use was in ChromeOS and that usage has been replaced with a `Blend(kSrcIn, input, Picture(region))` filter graph to achieve the same effect.
* The single-argument `SkImageFilters::Image(sk_sp<SkImage>)` factory is removed. The `SkSamplingOptions` to use when rendering the image during filtering must be provided. `SkFilterMode::kLinear` is recommended over the previous bicubic default.
* `GrTextureGenerator` now has a subclass `GrExternalTextureGenerator` which can be subclassed by
clients and used with `SkImages::DeferredFromTextureGenerator` in order to create images from
textures that were created outside of skia. `GrTextureGenerator` has been removed from the public
API in favor of `GrExternalTextureGenerator`.
* SkPoint now uses float for its coordinates. This starts the process of removing SkScalar from Skia.
SkScalar was a typedef for float, so this has no practical impact on code that uses Skia.
* `SkSamplingOptions(SkFilterMode)` and `SkSamplingOptions(SkCubicResampler)` are no longer marked `explicit` so that samplings can be created inline more succinctly.
* `SkShaders` is now a namespace (was previously a non-constructable class with only static
functions). `SkPerlinNoiseShader::MakeFractalNoise` and `SkPerlinNoiseShader::MakeTurbulence` have
been moved to the `SkShaders` namespace and `SkPerlinNoiseShader` (the public non-constructable
class) has been slated for moving into private internals of Skia.
There are no functional differences in the moved functions, however the change of some #includes
in `include/core/SkShader.h`, `include/effects/SkGradientShader.h`, and
`include/effects/SkPerlinNoiseShader.h` may cause clients who were depending on the transitive
dependencies to now fail to compile.
* The following methods have been removed from SkSurface and relocated to other methods/functions:
- `SkSurface::asImage` -> `SkSurfaces::AsImage` (include/gpu/graphite/Surface.h)
- `SkSurface::flushAndSubmit` -> `GrDirectContext::flushAndSubmit`
- `SkSurface::flush` -> `GrDirectContext::flush`
- `SkSurface::makeImageCopy` -> `SkSurfaces::AsImageCopy` (include/gpu/graphite/Surface.h)
- `SkSurface::resolveMSAA` -> `SkSurfaces::ResolveMSAA()` (include/gpu/ganesh/SkSurfaceGanesh.h)

Additionally, `SkSurface::BackendSurfaceAccess` is now in the `SkSurfaces` namespace.
* The deprecated `SkTableColorFilter` class and its methods have been removed. Clients should use
`SkColorFilters::Table` and `SkColorFilters::TableARGB` (defined in include/core/SkColorFilter.h).
* The `SkYUVAPixmapInfo::SupportedDataTypes(const GrImageContext&)` constructor has been removed from
the public API.

* * *

Milestone 115
-------------
* Clients now need to register codecs which Skia should use to decode raw bytes. For example:
Expand Down
3 changes: 3 additions & 0 deletions bazel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ known_good_builds:
bazelisk build //modules/skottie:skottie_tool_cpu
bazelisk build //modules/skottie:skottie_tool_gpu
bazelisk build //modules/canvaskit:canvaskit --config=ck_full_webgl2_release
bazelisk build //modules/pathkit:pathkit --config=ck_full_webgl2_release

rbe_known_good_builds:
bazelisk build //:skia_public --config=for_linux_x64_with_rbe --remote_download_minimal
Expand All @@ -74,6 +75,8 @@ rbe_known_good_builds:
## https://github.com/emscripten-core/emscripten/pull/16640 to land
bazelisk build //modules/canvaskit:canvaskit --config=linux_rbe \
--config=ck_full_webgl2_debug --remote_download_minimal
bazelisk build //modules/pathkit:pathkit --config=linux_rbe \
--config=ck_full_webgl2_debug --remote_download_minimal

rbe_known_good_tests:
bazel test //tests/... --config=cpu_only_debug --config=linux_rbe \
Expand Down
1 change: 1 addition & 0 deletions bazel/cc_binary_with_flags.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ load("@skia_user_config//:linkopts.bzl", "DEFAULT_LINKOPTS")

_bool_flags = [
"//bazel/common_config_settings:use_harfbuzz",
"//bazel/common_config_settings:use_fontations",
"//bazel/common_config_settings:use_icu",
"//src/gpu/ganesh/vk:enable_secondary_draw_context",
"//src/gpu:enable_gpu_test_utils",
Expand Down
Loading

0 comments on commit 685ebdb

Please sign in to comment.