Skip to content

Commit ca4e52c

Browse files
authored
[skia-sync] Merge upstream chrome/m153 (#348)
[skia-sync] Merge upstream chrome/m153 (#348) Requires: mono/SkiaSharp#4826 Changes: 9f0d864...168702d Merge Google Skia chrome/m153 into the SkiaSharp fork while preserving the fork's native ABI, dependency overrides, and upstream merge ancestry. ~~ Preserve the fork and merge ancestry ~~ Create a genuine two-parent merge from fork commit 9f0d864 and upstream commit 9d07e5b. This ancestry is required by subsequent upstream syncs and must not be replaced by a squash or rebase. The merge retains the 108 C API and Xamarin fork patches. Generated P/Invoke bindings are unchanged, no C API exports are added or removed, and SK_C_INCREMENT remains zero. Of the 90 files in the upstream fork delta, 87 remain unchanged; only DEPS, .disabled.go.mod, and .disabled.go.sum require adaptation. ~~ Retain native dependency authority ~~ Preserve the fork URL, revision, and enabled or commented state for every third_party/externals dependency in DEPS. Only upstream infrastructure metadata advances. Accept agents/shared at e75efa5158 as an unconditional git-sync-deps checkout used by Skia's agent configuration. It is not linked into the native GN products. Keep agents/internal as dictionary-valued metadata excluded by the fork dependency synchronization tool. ~~ Bound the observable behavior change ~~ Linux fontconfig matching now attempts FcFontMatch before using the sorted fallback. This path is reachable through SkiaSharp's existing font-manager APIs, so applications relying on the exact fallback face can observe different font metrics or glyphs. The Ganesh YUVA subset correction is not reachable through the current C and managed exports. The shared Ganesh and Graphite glyph-atlas refactor changes internal packing without changing exported layouts or signatures. Source builds passed on Linux x64 and macOS ARM64. Independent regeneration produced no binding diff, and the companion build completed its native, managed, package, test, visual, and sample stages successfully. Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2 parents 9f0d864 + 168702d commit ca4e52c

389 files changed

Lines changed: 19952 additions & 33580 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.disabled.go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/trietmn/go-wiki v1.0.1
1313
github.com/vektra/mockery/v2 v2.52.2
1414
go.chromium.org/luci v0.0.0-20251208084510-e9565e513ef0
15-
go.skia.org/infra v0.0.0-20260723151640-d47334d0785d
15+
go.skia.org/infra v0.0.0-20260814151344-57107b5a16cb
1616
golang.org/x/oauth2 v0.30.0
1717
google.golang.org/api v0.248.0
1818
google.golang.org/protobuf v1.36.10

.disabled.go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFh
344344
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
345345
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
346346
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
347-
go.skia.org/infra v0.0.0-20260723151640-d47334d0785d h1:1TXIrBN0yb/Fk3cqVbMapUMfeY+4ulwb7slPXTRcDnk=
348-
go.skia.org/infra v0.0.0-20260723151640-d47334d0785d/go.mod h1:UnvP4XqoBuJ0XkO7YhnU+EX7t3bzhfu4Gj8y1G0SN1o=
347+
go.skia.org/infra v0.0.0-20260814151344-57107b5a16cb h1:AxnBO4a3BmGCYncJHG/J2urYrBd4stDG0CPnBI4ZG8w=
348+
go.skia.org/infra v0.0.0-20260814151344-57107b5a16cb/go.mod h1:UnvP4XqoBuJ0XkO7YhnU+EX7t3bzhfu4Gj8y1G0SN1o=
349349
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
350350
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
351351
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Alexandre Mutel <alexandre_mutel@live.com>
2525
Amazon, Inc <*@amazon.com>
2626
Anthony Catel <paraboul@gmail.com>
2727
Andrew Kurushin <ajax16384@gmail.com>
28+
Ashkan Hosseini <ashkan.hoss@gmail.com>
2829
Bharat Ahuja <ahujabharat93@gmail.com>
2930
Biswapriyo Nath <nathbappai@gmail.com>
3031
Brian Salomon <briansalomon@gmail.com>

BUILD.gn

Lines changed: 98 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ config("skia_public") {
6969
if (skia_build_fuzzers) {
7070
defines += [ "SK_BUILD_FOR_FUZZER" ]
7171
}
72+
if (skia_enable_threadlocal_strikecache) {
73+
defines += [ "SK_ENABLE_THREADLOCAL_STRIKECACHE" ]
74+
}
7275

7376
# Some older versions of the Clang toolchain change the visibility of
7477
# symbols decorated with API_AVAILABLE macro to be visible. Users of such
@@ -1398,7 +1401,8 @@ if (is_debug) {
13981401

13991402
if (skia_use_fontations || skia_use_rust_png_decode ||
14001403
skia_use_rust_png_encode || skia_use_rust_bmp_decode ||
1401-
skia_use_rust_ico_decode || skia_use_rust_icc || skia_use_rust_exif) {
1404+
skia_use_rust_ico_decode || skia_use_rust_icc || skia_use_rust_exif ||
1405+
skia_use_rust_jpeg_decode || skia_use_rust_jpeg_encode) {
14021406
# Collect all Rust targets, sources, outputs based on what's enabled
14031407
_rust_targets = []
14041408
_rust_sources = []
@@ -1409,7 +1413,8 @@ if (skia_use_fontations || skia_use_rust_png_decode ||
14091413
_needs_cxx =
14101414
skia_use_fontations || skia_use_rust_png_decode ||
14111415
skia_use_rust_png_encode || skia_use_rust_bmp_decode ||
1412-
skia_use_rust_ico_decode || skia_use_rust_icc || skia_use_rust_exif
1416+
skia_use_rust_ico_decode || skia_use_rust_icc || skia_use_rust_exif ||
1417+
skia_use_rust_jpeg_decode || skia_use_rust_jpeg_encode
14131418
if (_needs_cxx) {
14141419
_rust_targets += [ "@crates//:cxx_cc" ]
14151420
_rust_sources += [
@@ -1567,6 +1572,27 @@ if (skia_use_fontations || skia_use_rust_png_decode ||
15671572
]
15681573
}
15691574

1575+
if (skia_use_rust_jpeg_decode || skia_use_rust_jpeg_encode) {
1576+
_rust_targets += [ "//experimental/rust_jpeg/ffi:ffi_rs" ]
1577+
_rust_sources += [
1578+
"experimental/rust_jpeg/ffi/BUILD.bazel",
1579+
"experimental/rust_jpeg/ffi/FFI.rs",
1580+
]
1581+
_rust_outputs += [
1582+
"$root_out_dir/librust_jpeg_ffi_rs.a",
1583+
"$root_out_dir/experimental/rust_jpeg/ffi/FFI.rs.h",
1584+
"$root_out_dir/experimental/rust_jpeg/ffi/FFI.rs.cc",
1585+
]
1586+
_rust_output_mappings += [
1587+
rebase_path("//bazel-bin/experimental/rust_jpeg/ffi/libffi_rs.a",
1588+
root_build_dir) + "=librust_jpeg_ffi_rs.a",
1589+
rebase_path("//bazel-bin/experimental/rust_jpeg/ffi/FFI.rs.h",
1590+
root_build_dir) + "=experimental/rust_jpeg/ffi/FFI.rs.h",
1591+
rebase_path("//bazel-bin/experimental/rust_jpeg/ffi/FFI.rs.cc",
1592+
root_build_dir) + "=experimental/rust_jpeg/ffi/FFI.rs.cc",
1593+
]
1594+
}
1595+
15701596
# Single unified action that builds all Rust FFI library targets
15711597
action("rust_all_ffi_bazel_build") {
15721598
script = "gn/bazel_build.py"
@@ -1602,6 +1628,9 @@ if (skia_use_fontations || skia_use_rust_png_decode ||
16021628
if (skia_use_rust_exif) {
16031629
_all_rust_libs += [ "$root_out_dir/librust_exif_ffi_rs.a" ]
16041630
}
1631+
if (skia_use_rust_jpeg_decode || skia_use_rust_jpeg_encode) {
1632+
_all_rust_libs += [ "$root_out_dir/librust_jpeg_ffi_rs.a" ]
1633+
}
16051634

16061635
public_configs = [ ":rust_ffi_libs_config" ]
16071636
all_dependent_configs = [ ":rust_ffi_libs_config" ]
@@ -1630,6 +1659,9 @@ if (skia_use_fontations || skia_use_rust_png_decode ||
16301659
if (skia_use_rust_exif) {
16311660
_all_rust_libs += [ "$root_out_dir/librust_exif_ffi_rs.a" ]
16321661
}
1662+
if (skia_use_rust_jpeg_decode || skia_use_rust_jpeg_encode) {
1663+
_all_rust_libs += [ "$root_out_dir/librust_jpeg_ffi_rs.a" ]
1664+
}
16331665
libs = _all_rust_libs
16341666

16351667
# Allow multiple definitions because Bazel's rust_static_library includes
@@ -1885,6 +1917,54 @@ optional("ico_decode_rust") {
18851917
libs = [ "c++" ]
18861918
}
18871919

1920+
if (skia_use_rust_jpeg_decode || skia_use_rust_jpeg_encode) {
1921+
config("rust_jpeg_cxx_bridge_public_config") {
1922+
include_dirs = [ "$root_out_dir" ]
1923+
}
1924+
config("rust_jpeg_cxx_bridge_private_config") {
1925+
include_dirs = [ "." ]
1926+
}
1927+
skia_source_set("rust_jpeg_cxx_bridge") {
1928+
deps = [ ":rust_all_ffi_bazel_build" ]
1929+
public = [ "${root_out_dir}/experimental/rust_jpeg/ffi/FFI.rs.h" ]
1930+
sources = [ "${root_out_dir}/experimental/rust_jpeg/ffi/FFI.rs.cc" ]
1931+
public_configs = [ ":rust_jpeg_cxx_bridge_public_config" ]
1932+
configs = [ ":rust_jpeg_cxx_bridge_private_config" ]
1933+
}
1934+
}
1935+
1936+
optional("jpeg_decode_rust") {
1937+
public_defines = [ "SK_CODEC_DECODES_JPEG_WITH_RUST" ]
1938+
enabled = skia_use_rust_jpeg_decode
1939+
public = skia_codec_rust_jpeg_public
1940+
sources = skia_codec_rust_jpeg
1941+
sources_for_tests = [ "tests/SkJpegRustCodecTest.cpp" ]
1942+
deps = [
1943+
":jpeg_encode_rust",
1944+
":rust_ffi_libs",
1945+
":rust_jpeg_cxx_bridge",
1946+
"modules/skcms",
1947+
]
1948+
libs = [ "c++" ]
1949+
if (skia_use_jpeg_gainmaps) {
1950+
public_defines += [ "SK_CODEC_DECODES_JPEG_GAINMAPS" ]
1951+
deps += [ ":xml" ]
1952+
sources += skia_codec_jpeg_xmp
1953+
}
1954+
}
1955+
1956+
optional("jpeg_encode_rust") {
1957+
public_defines = [ "SK_CODEC_ENCODES_JPEG_WITH_RUST" ]
1958+
enabled = skia_use_rust_jpeg_encode
1959+
public = skia_encode_rust_jpeg_public
1960+
sources = skia_encode_rust_jpeg_srcs
1961+
deps = [
1962+
":rust_ffi_libs",
1963+
":rust_jpeg_cxx_bridge",
1964+
]
1965+
libs = [ "c++" ]
1966+
}
1967+
18881968
optional("webp_decode") {
18891969
enabled = skia_use_libwebp_decode
18901970
public_defines = [ "SK_CODEC_DECODES_WEBP" ]
@@ -2959,6 +3039,7 @@ if (skia_enable_tools) {
29593039
":fontmgr_mac_ct_tests",
29603040
":fontscanner_tests",
29613041
":ico_decode_rust_tests",
3042+
":jpeg_decode_rust_tests",
29623043
":png_decode_libpng_tests",
29633044
":png_decode_rust_tests",
29643045
":png_encode_rust_tests",
@@ -2981,6 +3062,12 @@ if (skia_enable_tools) {
29813062
"//third_party/libwebp",
29823063
"//third_party/zlib",
29833064
]
3065+
if (skia_use_rust_jpeg_decode) {
3066+
deps += [ ":jpeg_decode_rust" ]
3067+
}
3068+
if (skia_use_rust_jpeg_encode) {
3069+
deps += [ ":jpeg_encode_rust" ]
3070+
}
29843071
}
29853072
}
29863073

@@ -3328,6 +3415,7 @@ if (skia_enable_tools) {
33283415
"modules/jsonreader",
33293416
"modules/skottie:fuzz",
33303417
"modules/skparagraph",
3418+
"modules/skshaper",
33313419
"modules/svg",
33323420
]
33333421
if (skia_use_rust_bmp_decode) {
@@ -3911,7 +3999,10 @@ if (skia_build_fuzzers) {
39113999
"fuzz/FuzzSkParagraph.cpp",
39124000
"fuzz/oss_fuzz/FuzzSkParagraph.cpp",
39134001
]
3914-
deps = [ "modules/skparagraph" ]
4002+
deps = [
4003+
"modules/skparagraph",
4004+
"modules/skshaper",
4005+
]
39154006
}
39164007

39174008
libfuzzer_app("api_svg_canvas") {
@@ -4037,7 +4128,10 @@ if (skia_build_fuzzers) {
40374128

40384129
libfuzzer_app("svg_dom") {
40394130
sources = [ "fuzz/oss_fuzz/FuzzSVG.cpp" ]
4040-
deps = [ "modules/svg" ]
4131+
deps = [
4132+
"modules/skshaper",
4133+
"modules/svg",
4134+
]
40414135
}
40424136

40434137
libfuzzer_app("skruntimeblender") {

DEPS

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vars = {
99
# Three lines of non-changing comments so that
1010
# the commit queue can handle CLs rolling different
1111
# dependencies without interference from each other.
12-
'infra_revision': 'd47334d0785d47ea913b41efd0038430e193525c',
12+
'infra_revision': '57107b5a16cbfe5a9fa0c3e0a81146eabc1cd506',
1313

1414
# ninja CIPD package version.
1515
# https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja
@@ -20,7 +20,7 @@ vars = {
2020
'googlefonts_testdata_version': 'version:20230913',
2121

2222
# Pre-built task drivers from this repo, used for CI.
23-
'task_drivers_revision': 'git_revision:348e064d2951b8209dd3dc77e89b8bc5d57242af',
23+
'task_drivers_revision': 'git_revision:782dfac458428f99c91f1b09ccb4f88dadc06c1c',
2424

2525
'checkout_agents_internal': False,
2626
}
@@ -116,4 +116,11 @@ deps = {
116116
'url': 'https://skia.googlesource.com/buildbot.git@' + Var('infra_revision'),
117117
'condition': 'False',
118118
},
119+
120+
'agents/shared': 'https://chromium.googlesource.com/chromium/agents/@e75efa515896f6bf1dea92eaffbcf8ee711a65d8',
121+
122+
'agents/internal': {
123+
'url': 'https://chrome-internal.googlesource.com/chrome/agents-internal/@11c700b10e171091b4f0f3cf3bf95f13dee85c93',
124+
'condition': 'checkout_agents_internal',
125+
},
119126
}

MODULE.bazel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,19 @@ crate.spec(
156156
package = "image",
157157
rev = "5d0418d0eff747c829d52738c092581312f775c9",
158158
)
159+
crate.spec(
160+
package = "jpeg-encoder",
161+
version = "=0.6.0",
162+
)
163+
crate.spec(
164+
package = "zune-jpeg",
165+
version = "=0.5.16-rc1",
166+
)
167+
crate.spec(
168+
features = ["std"],
169+
package = "zune-core",
170+
version = "=0.5.3",
171+
)
159172
crate.spec(
160173
package = "moxcms",
161174
version = "=0.8.0",
@@ -326,6 +339,10 @@ download_windows_amd64_toolchain(name = "clang_windows_amd64")
326339
cipd_deps = use_extension("//bazel:cipd_deps.bzl", "cipd_deps")
327340
use_repo(
328341
cipd_deps,
342+
"cpython_linux_amd64",
343+
"cpython_mac_amd64",
344+
"cpython_mac_arm64",
345+
"cpython_windows_amd64",
329346
"git_linux_amd64",
330347
"gn_linux_amd64",
331348
"gn_mac_amd64",

MODULE.bazel.lock

Lines changed: 331 additions & 211 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PRESUBMIT.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,12 +500,12 @@ def _CheckBannedAPIs(input_api, output_api):
500500
(r'std::stold\(', 'std::strtold(), which does not throw'),
501501
# go/cstyle#Disallowed_Stdlib
502502
(r'std::barrier', ''),
503-
(r'std::condition_variable', ''),
503+
(r'std::condition_variable', '', 'PipelineManager'),
504504
(r'std::counting_semaphore', ''),
505505
(r'std::future', ''),
506506
(r'std::jthread', ''),
507507
(r'std::latch', ''),
508-
(r'std::mutex', 'SkMutex'),
508+
(r'std::mutex', 'SkMutex', ['^example/', 'PipelineManager']),
509509
(r'std::shared_mutex', 'SkSharedMutex'),
510510
(r'std::stop_token', ''),
511511
(r'std::thread', '', ['^tests/', 'SkExecutor']),

RELEASE_NOTES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@ Skia Graphics Release Notes
22

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

5+
Milestone 153
6+
-------------
7+
* `SkLogHandler` has been added as a global callback interface to intercept Skia's internal logs. Clients can implement this interface and install it via `SkLogHandler::SetInstance` to receive all messages generated through the `SKIA_LOG` macros. `SkLogHandler` uses `sk_sp` for shared ownership, allowing clients to maintain a reference to the handler.
8+
* `SkImageFilters::RuntimeShader` factories now take an optional
9+
`restrictOutputToInputBounds` parameter (default `false`). When `true`, the
10+
caller promises that the SkSL evaluates to transparent black wherever its child
11+
shaders are transparent black, allowing the filter's output to be restricted to
12+
the union of its inputs' bounds instead of being unbounded. This lets effects
13+
composed after the runtime shader (e.g. a blur using a non-decal tile mode)
14+
observe the intended content bounds.
15+
* Added the `skia_enable_threadlocal_strikecache` GN build argument
16+
(which defines `SK_ENABLE_THREADLOCAL_STRIKECACHE`) to enable
17+
thread-local `SkStrikeCache` instances
18+
* Graphite's `PipelineManager` can now make use of the `SkExecutor` passed in via `ContextOptions`. If provided, the `SkExecutor` will be used to compile Pipelines.
19+
20+
* * *
21+
522
Milestone 152
623
-------------
724
* Add skgpu::graphite::ContextOptions::fAvoidDepth. Enabling this will lead

agents/skills/skia-gn-workflow/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ If a build requires Rust dependencies (in `third_party`), use `bazelisk` to mana
7171
- **iOS**: `./bin/gn gen -q out/ios --args='target_os="ios" target_cpu="arm64"'`
7272
- **Windows**: Use `clang_win="<path_to_llvm>"` to build with clang-cl (highly recommended).
7373

74+
### 4. Other Build Notes
75+
- Unless otherwise instructed, build with: `ninja --quiet -C {OUT_DIR} {TARGET}`. If given an `ninja` command that is missing `--quiet`, you *must* add `--quiet`.
76+
7477
## Tool Reference
7578

7679
### `dm` (Correctness Testing)

0 commit comments

Comments
 (0)