Skip to content

Update skia to milestone 122#170

Open
mattleibow wants to merge 1411 commits intoskiasharpfrom
dev/update-skia-m122
Open

Update skia to milestone 122#170
mattleibow wants to merge 1411 commits intoskiasharpfrom
dev/update-skia-m122

Conversation

@mattleibow
Copy link

@mattleibow mattleibow commented Mar 11, 2026

Update Skia to Chrome Milestone 122

Sequential merge of upstream chrome/m120 → m121 → m122 into the skiasharp branch.

Breaking changes addressed in C API shim:

  • Typeface factories removed (m120): SkTypeface::MakeDefault/RefDefault/MakeFromName/File/Stream/Data — C API stubs return nullptr; behavior moved to font manager
  • Font manager factories removed (m122): SkFontMgr::RefDefault/MakeDefault/Factory — implemented platform-specific singleton (SkFontMgr_New_CoreText, SkFontMgr_New_DirectWrite, etc.)
  • Empty typeface default (m122): SkFont(nullptr) now creates empty typeface — C API intercepts null to provide platform default via shared font manager singleton
  • GPU namespace moves (m120/m122): GrDirectContext::MakeGL/MakeVulkanGrDirectContexts::MakeGL/MakeVulkan
  • Mipmap type aliases removed (m121): GrMipmappedskgpu::Mipmapped
  • VK type change (m122): GrVkYcbcrConversionInfo from struct to type alias — DEF_STRUCT_MAPDEF_MAP with SK_VULKAN guard
  • Resource provider API (m122): skresources bool → ImageDecodeStrategy enum
  • SkCompatPaint (m122): Updated constructor to use default typeface instead of empty

Custom dependency pins restored:

Upstream m122 DEPS reverted our security bumps. Restored: libwebp 1.6.0, brotli 1.2.0, zlib, libpng, freetype, harfbuzz, libjpeg-turbo, expat.

Companion PR:

mono/SkiaSharp#3559

johnstiles-google and others added 30 commits January 4, 2024 16:39
This doesn't change any behavior, just fixes a mismatch between
function prototype and implementation. Issue detected here:
https://skia-review.googlesource.com/c/skia/+/793458/comment/b098fd75_4bd1191d/

Change-Id: I4ae48ed0d22dbb220c9310d91f8db2eee34ab43e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796396
Reviewed-by: Nolan Scobie <nscobie@google.com>
Commit-Queue: Nolan Scobie <nscobie@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Consolidates the variations across Layouts into policies described by
a new LayoutRules namespace holding rule functions.

Moves allocation logic into an append(alignment, size) function in the
header so it can be inlined.
Consolidates the write logic into a write<N,Half> and
writeArray<N,Half> template. Branching logic is based on both the
compile-time dimensions/Half-ness and the LayoutRules. In many cases
these LayoutRule checks are skipped due to the compile-time checks.

Shared logic in write() and writeArray() is extracted into a
LayoutTraits struct to define shared constants and conversion
functions.

Lastly, there are helpers to write[Array]<SkSLType> used by the public
type-safe functions. Looking at `objdump`, it appears most functions
are successfully inlined with mainly the more complex array-writing
and the general write(Uniform) variant existing as its own function.

The layout alignment and offset are now calculated directly from the
UniformManager's storage instead of doing a dry-run through
UniformOffsetCalculator that doesn't write, and then repeating the
logic but with an actual dst pointer.  UniformOffsetCalculator has
been updated to apply the LayoutRules based on the various
SkSLTypeFoo helper functions.

Simplifying the logic and allowing the writes to appears to lead to
some improvements in overall frametime in MotionMark scenes with high
draw counts: On my M1 mini, when running the Paths SKP in viewer
before this change, uniform extraction took 18% of the total time,
split 10% in ExtractPaintData and 8% in ExtractRenderStepData.
With this change, uniform extraction shrunk to about 9% of the frame
time. ExtractPaintData went to 7.5% and ExtractRenderStepData went to
1.5%. There's additional streamlining we can do in KeyHelpers to
make ExtractPaintData() less of a hot spot too.

Running nanobench has the Paths SKP drop from 2.55ms to 2.31ms, which
is commensurate with the Instruments hotspot reduction above. Other
improvements in MotionMark:
Paths: 2.5 -> 2.3 in grmtl
Arcs:  4.5 -> 4.2 ""
Suits: 6.1 -> 5.8 ""
Leaves: .6 -> .55 ""

Bug: b/317233287
Bug: b/317233303
Change-Id: Ie2659c4766ae4fa043b85961e2efe8147e460cee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/793356
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Land after [1].

[1] https://chromium-review.googlesource.com/c/chromium/src/+/5165370

Bug: b/317330945
Change-Id: I7089f8abe6c46aaf20765559ca9007e45cbae008
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796196
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
Enables the fStorageBufferSupport and fStorageBufferPreferred fields in
DawnCaps which will have the side-effect of enabling paint param and
render step uniforms to use SSBOs instead of uniform buffers.

Local testing has shown this has a huge impact on motionmark scores.

Bug: b/309013541
Change-Id: I67df8494fb528bc1a340c260e6845764e424da6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/778436
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
We've updated the bots' NDK, so we can start enforcing this rule.

Bug: b/318414038
Change-Id: I71102045b05df9df561c201f8f4aae8a919b4a59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796556
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
https://chromium.googlesource.com/vulkan-deps.git/+log/7b559e9f56e3..c8ff88bfeb04

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools/+log/0a9f3d1f2a8dd660bec005206a1b86136357d41c..c7affa1707b9c517ea028bf9070c97e6842a6749

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC egdaniel@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: egdaniel@google.com
Change-Id: I6be9e4385815f4f975f6be71d20b9e4a9ebbae9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796222
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
https://skia.googlesource.com/buildbot.git/+log/58247e808c13..6de9699bbab6

2024-01-04 yasinsonui@google.com Upgrading Testhaus to React 18
2024-01-04 borenet@google.com [task scheduler] Disable tracing
2024-01-04 yasinsonui@google.com Allow list required packages for upgrading Testhaus to React 18
2024-01-04 jeffyoon@google.com [bisect] Create a client for skia-bridge
2024-01-04 borenet@google.com [task scheduler] Reduce tracing frequency
2024-01-04 borenet@google.com [task scheduler] Reduce tracing sample proportion
2024-01-04 borenet@google.com Revert "[task scheduler] Add logging for non-IN_PROGRESS jobs"
2024-01-04 borenet@google.com [task scheduler] Fix race where we might start a Job multiple times
2024-01-04 jcgregorio@google.com Change dfbuilder to not assume that all commits exist.
2024-01-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra CIPD packages from b9d08e6f5a57 to 58247e808c13 (8 revisions)
2024-01-03 ashwinpv@google.com Add checkbox support for paramset-sk

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/infra-skia
Please CC lovisolo@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia Infra: https://bugs.chromium.org/p/skia/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: lovisolo@google.com
Change-Id: I9050066be6324fee51e37545230fae270267608e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796756
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Rename cargo package name to just fontations, instead of
fontations_bridge, which is a more suitable name. Roll some
dependencies and propagate a build define when the fontations
backend is being built (to match what the GN build does.)

Bug: b/301562314
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Fontations,Build-Mac-Clang-x86_64-Debug-Fontations,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Fontations,Test-Mac12-Clang-MacBookPro16.2-CPU-AppleIntel-x86_64-Debug-All-Fontations
Change-Id: I666ce7b4976d81b19307335c55c2b3ba110441c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796197
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
COLRv1 data may contain cycles. If a cycle was detected then drawing was
halted and an error returned. Instead, simply don't draw the cycle and
return normally without error.

Change-Id: I1119b3454f075f371093531a35752cb65c879c03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796597
Reviewed-by: Dominik Röttsches <drott@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
https://skia.googlesource.com/buildbot.git/+log/6de9699bbab6..251696c8011d

2024-01-05 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra CIPD packages from 58247e808c13 to 6de9699bbab6 (11 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC lovisolo@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: lovisolo@google.com
Change-Id: I8f0ec71b4697bb6d10f0777a5722433fcf7212ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796700
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
The SPIR-V code generator would attempt to synthesize u_skRTFlip in
every interface block that it found, under the (normally reasonable)
assumption that we would only have one interface block. We now only
attempt to synthesize u_skRTFlip one time.

Previously, this error was just reported as "symbol 'u_skRTFlip'
declared more than once" but due to http://review.skia.org/793576
we no longer have a ThreadContext set up while the SPIR-V code
generator executes. The ThreadContext is used to report this error
because `SymbolTable::add` has historically never taken a Context
reference. In a followup I will remove the reliance on
ThreadContext here. (This is, in fact, one of the last few places
where ThreadContext is used at all.)

Bug: oss-fuzz:65538
Change-Id: I5b81c00764da8cca0d4edad6da1aa85c953753e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796736
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Implement the `ColorPainter` trait in the FFI interface and pass draw
calls generated by Skrifa to the SkCanvas we're operating on.

Modify SkTypeface_fontations.cpp to not unconditionally generate bounds
and image from path, but instead, assign track glyph format using
ScalerContextBits and call the parent `GenerateImageFromPath()` function
for path drawing, as the DirectWrite backend does it.

Pass calls back up to the base SkScalerContext for handling
monochromatic glyphs from path.

Bug: b/301562314
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Fontations,Build-Mac-Clang-x86_64-Debug-Fontations,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Fontations,Test-Mac12-Clang-MacBookPro16.2-CPU-AppleIntel-x86_64-Debug-All-Fontations
Change-Id: Ibea9e29f3f4ae5de8b876d5167a6290cf73fae71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/774596
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
The majority of changes come from two basic facts:

1) GCC does not allow implicit conversion of scalars to vectors. To deal
   with this, I added promotion helper functions. These are zero-cost on
   clang. For a few functions that are called *often* with scalars, I
   added overloads to limit the noise later in the file.

2) GCC does not allow implicit conversion between integral vector types
   and the __mXXXi types that appear in intrinsic signatures. (It does
   allow float vectors to implicitly convert to __mXXX.) Therefore, all
   of the integer intrinsic arguments and return values need explicit
   casts. (Now that we've turned off lax-vector-conversions in clang,
   most of these were already fixed, but a few more are caught by GCC).

I've monitored code-gen before and after this change on both compilers.
clang had some trivial code motion (reordering of instructions within a
few stage functions), but no new overhead at all. GCC only had scalar RP
previously, and how has a vectorized implementation that's comparable to
clang's (many functions appear slightly worse, but not dramatically).

Bug: b/316617002
Bug: b/318414038
Change-Id: I9c88acbf8ecf0adfcb1225c81b9e8ec3644620c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/790319
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Bug: b/318817249
Change-Id: Ic5b4ac946287663f9fd6d0017f9ba30d3dde57b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The Parser's symbol-adding code now has two paths:
- add/addWithoutOwnership takes a Context&
- addOrDie/addWithoutOwnershipOrDie will abort on failure

We use the former calls in most places, and the latter calls in
cases where we expect failure is impossible (root symbol table
creation, adding array dimensions).

This should fix for the root-cause of the crash in oss-fuzz:65538.

Change-Id: I8a4d3fd46ee443a43af73c303e7d8cd2fa2f33e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796557
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
https://chromium.googlesource.com/vulkan-deps.git/+log/c8ff88bfeb04..dd0c87f2c1d5

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross/+log/f349c91274b91c1a7c173f2df70ec53080076191..cffc08a542b01dfd15f6ed7682251d002dbc4e64
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers/+log/80207f9da86423ce33aff8328a792fd715f3c08f..217e93c664ec6704ec2d8c36fa116c1a4a1e2d40

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC egdaniel@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: egdaniel@google.com
Change-Id: Id96645ac560853f8db11f19f7d397da4188d43f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796704
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This reverts commit c0a39cf.

Reason for revert: GCC x86 build failure, Win-MSVC test failure

Original change's description:
> Add GCC support to Raster Pipeline
>
> The majority of changes come from two basic facts:
>
> 1) GCC does not allow implicit conversion of scalars to vectors. To deal
>    with this, I added promotion helper functions. These are zero-cost on
>    clang. For a few functions that are called *often* with scalars, I
>    added overloads to limit the noise later in the file.
>
> 2) GCC does not allow implicit conversion between integral vector types
>    and the __mXXXi types that appear in intrinsic signatures. (It does
>    allow float vectors to implicitly convert to __mXXX.) Therefore, all
>    of the integer intrinsic arguments and return values need explicit
>    casts. (Now that we've turned off lax-vector-conversions in clang,
>    most of these were already fixed, but a few more are caught by GCC).
>
> I've monitored code-gen before and after this change on both compilers.
> clang had some trivial code motion (reordering of instructions within a
> few stage functions), but no new overhead at all. GCC only had scalar RP
> previously, and how has a vectorized implementation that's comparable to
> clang's (many functions appear slightly worse, but not dramatically).
>
> Bug: b/316617002
> Bug: b/318414038
> Change-Id: I9c88acbf8ecf0adfcb1225c81b9e8ec3644620c2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/790319
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

Bug: b/316617002
Bug: b/318414038
Change-Id: I45cfd730da7e70fdeb50d672b1cd7da25823cb4a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796673
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Change-Id: I383b15c025979cfa840d8028bc185926394157c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796738
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The Parser is the only class which actually builds the list of
ProgramElements (now that DSL has been removed). It can own
the list of ProgramElements directly, rather than indirecting
through ThreadContext.

Change-Id: I38ff4bc8ee46f375a81bd0f96ac1806b4d70de21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/795736
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
At some point, this vector became dead code. Nothing is adding into
it, so it's always empty. The program's shared-elements list is
built up after the Program is created, by the FindAndDeclare
transformation passes.

Change-Id: I7bc99189ff9bf14dfc380dc3e06b3079262b3235
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796856
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
When removing SK_RESOLVE_FILTERS_BEFORE_RESTORE, there were two failures
in Flutters tests. One was a rounding issue because a color filter now
was operating on the original values instead of the 8-bit values. The
other involved applying a "group opacity" optimization to a drawImage
call that also had an image filter and expecting that the
alpha-modulated output match the manually modulated original image.
This boils down to adding an alpha value on the SkPaint.

The Flutter test in question used a non-AA paint with nearest neighbor
filtering and a dst rect aligned on 1/2px boundaries. With the legacy
build flag enabled, both the opaque and the "group opacity" case would
draw the non-AA image to a new layer (possibly with alpha), and then
pass that to an erode/dilate filter. The non-AA rendering meant that
there were no pixels with partial coverage.

With the build flag removed, both cases skipped the auto layer within
SkCanvas. The opaque case deferred the src->dst transform and nearest
neighbor filtering into the erode/dilate evaluation. The use of
nearest neighbor filtering produced an equivalent result to the
original's non-AA snapping in the layer itself.

However, for the "group opacity" case, the alpha is now applied as
a color filter to the FilterResult before going to the erode/dilate
filter. This is deferred but because erode/dilate pass in the
kSampledRepeatedly flag, asShader() resolves the image. FilterResult
uses AA by default because it gives more stable behavior when images
are being processed by later filters, but in this case we now
introduce partial coverage on the border pixels because of the
half-pixel aligned dst rect in the deferred transform.

While this actually leads to more stable behavior in the erode/dilate
evaluation when dragging the GM around in viewer, it is definitely
a different output and triggering the assert failures in Flutter.

When the kSampledRepeatedly behavior was added, there were some
regressions in performance on some platforms (higher end where math
is probably cheaper than another image). The current check for
"any" deferred color filter is pretty aggressive. Something like
an alpha multiply is probably always worth deferring. It also
happens to avoid the aliasing issue that tickles the Flutter test.

Bug: b/40042615
Bug: b/40040587
Change-Id: I7f89bc47ac8c3c0ea4b53b8f4036f6a166e58fa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796876
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
As it turned out, this code only existed to be tested. We do clone
Expressions extensively, but there really isn't a pressing need to
clone a Statement or ProgramElement in its entirety.

Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Much like http://review.skia.org/796856, this member was never
modified, so it always remained in its default-constructed state
and didn't do anything meaningful. The program's Interface is
actually configured by the FindAndDeclare transform pass.

Change-Id: I0917f19e2c7130d2ab0d0bb1630a4371e640234e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796859
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Manual roll requested by kainino@google.com

https://dawn.googlesource.com/dawn.git/+log/7330dd2dfe64..9fbef511d79e

2023-12-26 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 3f9f34b48c80 to 3dfb2158b912 (2 revisions)
2023-12-26 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from a901b66f77bf to ddef466fc7d4 (1 revision)
2023-12-26 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from c8af75dde7f0 to 3f9f34b48c80 (1 revision)
2023-12-25 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 75058a70503d to a901b66f77bf (1 revision)
2023-12-25 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 3f5f4aa476b9 to c8af75dde7f0 (1 revision)
2023-12-24 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c3b062a5b7ab to 75058a70503d (5 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@google.com,kainino@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Graphite_Dawn_Vulkan;skia/skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn_Metal;skia/skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn_D3D12;skia/skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn_D3D11
Bug: None
Tbr: kainino@google.com
Change-Id: I5b6d28141fb6b572ea926b26d888524c398eb450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796220
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
https://chromium.googlesource.com/vulkan-deps.git/+log/dd0c87f2c1d5..4441d7f010ce

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools/+log/e21dc3deb042f6354320222903214f491b7b6ad0..2c0a644db855f40f100f9f39e5a8a8dfa2b0014d
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Utility-Libraries/+log/fce11d52fee0344bb10a098b0a398dff42cb5d51..4cfc176e3242b4dbdfd3f6c5680c5d8f2cb7db45

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC egdaniel@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: egdaniel@google.com
Change-Id: I7982416882e09590853aff6b7aa9377afc3db40d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796639
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skottie-base-skia
Please CC lovisolo@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: lovisolo@google.com
Change-Id: I7b3c276a7086a49c76138fa4fe003141fd5570f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796641
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/debugger-app-base-skia
Please CC lovisolo@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: lovisolo@google.com
Change-Id: Iabdce3e52e39fb0d0c9482518f4865d4e0bb5a1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796710
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/shaders-base-skia
Please CC lovisolo@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: lovisolo@google.com
Change-Id: I9496cb922421481f38dddd9b4adfa5aa04903f16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796642
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
…end"

This reverts commit 9612d6c.

Reason for revert: speculative revert for chrome and g3 failures

Original change's description:
> [Fontations-backend] Add COLRv0/v1 support to Fontations backend
>
> Implement the `ColorPainter` trait in the FFI interface and pass draw
> calls generated by Skrifa to the SkCanvas we're operating on.
>
> Modify SkTypeface_fontations.cpp to not unconditionally generate bounds
> and image from path, but instead, assign track glyph format using
> ScalerContextBits and call the parent `GenerateImageFromPath()` function
> for path drawing, as the DirectWrite backend does it.
>
> Pass calls back up to the base SkScalerContext for handling
> monochromatic glyphs from path.
>
> Bug: b/301562314
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Fontations,Build-Mac-Clang-x86_64-Debug-Fontations,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Fontations,Test-Mac12-Clang-MacBookPro16.2-CPU-AppleIntel-x86_64-Debug-All-Fontations
> Change-Id: Ibea9e29f3f4ae5de8b876d5167a6290cf73fae71
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/774596
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Dominik Röttsches <drott@google.com>

Bug: b/301562314
Change-Id: I2d3ba6cbf98da3dfad92d557dfc50eb758e79d8d
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Fontations,Build-Mac-Clang-x86_64-Debug-Fontations,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Fontations,Test-Mac12-Clang-MacBookPro16.2-CPU-AppleIntel-x86_64-Debug-All-Fontations
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/797237
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
https://chromium.googlesource.com/vulkan-deps.git/+log/4441d7f010ce..784f7328cede

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC egdaniel@google.com,skiabot@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: egdaniel@google.com
Change-Id: Ib2221ca92d3d1e29b90c0cc77a4e389bf1db2814
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796714
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
fmalita and others added 21 commits January 29, 2024 18:46
https://skia-review.googlesource.com/c/skia/+/761237 introduced an
explicit FontMgrRunIterator, which can trigger font fallback (previously
impossible with SkShaper_primitive).

This causes issues for clients which don't have a fallback-capable
fontmgr.

Allow clients to opt into using a TrivialFontRunIterator.

Bug: chromium:1520148
Change-Id: Ie8530d01f0c61daecb3c888c51e2c8a4c414738d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/805536
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
(cherry picked from commit 29b545e)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/806936
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Florin Malita <fmalita@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Adobe Reader takes issue with the color profiles produced from
SkColorSpace when applied to single channel images. While this is
investigated, disable embedding such color profiles on single channel
images.

Bug: chromium:1523360
Change-Id: I7039e3ebf0644679d9b024a84b6f4e72b009987b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/807597
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
(cherry picked from commit 76da7ec)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/807716
Reviewed-by: Brian Osman <brianosman@google.com>
Initially motivated by the drawing of Type3 glyphs into the PDF
document, which normally happens after the last page is ended and the
document is being finished. In order to properly target bookmarks it is
necessary to keep track of where marks (drawings) are made, which is a
position on a page. However, there may be marks (like those of a Type3
font) which are not bound with or drawn to any particular page. When
these are emitted there is no current page and attempting to access the
current page attributes currently results in a crash. This can also
happen if a user draws an attribute or tags a structure element node
while there is no currently active page.

The SkPDFDocument already abstracts the currently active page and any
marks made to it. Update this abstraction to handle the cases where
there is no currently active page. Also add a portable test by making
the test Jupiter glyph somewhat transparent to force a layer.

Bug: chromium:1523260
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/807817
Reverted-on: https://skia-review.googlesource.com/c/skia/+/808498
Change-Id: I4bb74ea3a023ea57f82ec6e1115ae33e1085a9f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/808660
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
(cherry picked from commit 909cf06)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/809603
Some printers have been found to have issues with ICC profiles that have
an empty profile description string. Ensure that generated ICC profiles
have non-empty descriptions.

Bug: chromium:329032158
Change-Id: I024e70313b9919a90baca2a04ddd0a189da59e7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/825723
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
(cherry picked from commit 18f41d3)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/826439
Change-Id: I70ba2400ca607f70fe7d3daadef40d131dbc9b32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/827560
Reviewed-by: Heather Miller <hcm@google.com>
Change-Id: I2e01c4bd906b715abe577da2e74467f712660ea7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/841202
Reviewed-by: Heather Miller <hcm@google.com>
Change-Id: Ideb02cf83177568ea614d7c5559adf8c215ba1c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/852349
Reviewed-by: Heather Miller <hcm@google.com>
M120 merge issues:
  Conflicting includes

Bug: b/360758697
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Change-Id: I46eb92ac6ed71646fb05a910f8d577ec851e3b3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/891636
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/894936
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
The callers of PatternHelper which are not updated here pass in a TArray
size as repeatCount, which already prevents overflow:
https://crsrc.org/c/third_party/skia/include/private/base/SkTArray.h?q=kMaxCapacity

Bug: b/361461526
Change-Id: I86c494cb00223f0bb8d68540d33d7230b60c9486
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/893916
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
(cherry picked from commit 07fcb9a)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/898036
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Check total index count in onCombineIfPossible.

Bug: b/360265320
Change-Id: I02f04593b60dcd2470580110d0a555ed4bf47280
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/890322
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
(cherry picked from commit fdc8c2d)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/894465
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
…aces

Bug: 355465305
Change-Id: Ifb87db5e8d0d0c29449e6a3e82254189e3f2d33b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/886696
Commit-Queue: Brian Osman <brianosman@google.com>
(cherry picked from commit 05097fb)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/892616
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: 355465305
Change-Id: Ife25289f7b3489701c67b7dc5d30e473019a1193
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/888376
Commit-Queue: Brian Osman <brianosman@google.com>
(cherry picked from commit d1b243b)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/892676
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
…cation size"

This reverts commit a59291e.

Reason for revert: unit test uses code not in m120.

Original change's description:
> [M120-LTS][SkSL:RP] Prevent overflow when computing slot allocation size
>
> Bug: 355465305
> Change-Id: Ife25289f7b3489701c67b7dc5d30e473019a1193
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/888376
> Commit-Queue: Brian Osman <brianosman@google.com>
> (cherry picked from commit d1b243b)
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/892676
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

Bug: 355465305
Change-Id: I27fe9fa6d769c84955bbbc2ca01c10305d4349b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/899717
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
…cation size"

This reverts commit 7ba220b.

Reason for revert: removing unit test that fails to compile in m120
since all that's needed is the actual SkSL::RP updates for the LTS
chrome release.

Original change's description:
> Revert "[M120-LTS][SkSL:RP] Prevent overflow when computing slot allocation size"
>
> This reverts commit a59291e.
>
> Reason for revert: unit test uses code not in m120.
>
> Original change's description:
> > [M120-LTS][SkSL:RP] Prevent overflow when computing slot allocation size
> >
> > Bug: 355465305
> > Change-Id: Ife25289f7b3489701c67b7dc5d30e473019a1193
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/888376
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > (cherry picked from commit d1b243b)
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/892676
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: 355465305
> Change-Id: I27fe9fa6d769c84955bbbc2ca01c10305d4349b2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/899717
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: 355465305
Change-Id: Iea2884487313206150f98becbbf22a5a286ff512
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/901140
Reviewed-by: Robert Phillips <robertphillips@google.com>
Merge google/skia chrome/m120 branch.

Conflicts resolved:
- DEPS: took upstream versions
- SkTypeface.cpp: kept custom RefDefault(), removed UniqueID(), added MakeEmpty()
- DrawMeshOp.cpp: took upstream overflow fix
- RELEASE_NOTES.md, infra/bots/jobs.json: took upstream
Merge google/skia chrome/m121 branch.

Conflicts resolved:
- GrDirectContext.cpp: took upstream (deprecated Metal void* overloads)
- DrawMeshOp.cpp: took upstream
- SkFontMgr_fontconfig.cpp: took upstream
- RELEASE_NOTES.md, infra/bots/jobs.json, tools/git-sync-deps: took upstream
Merge google/skia chrome/m122 branch.

All conflicts resolved by taking upstream:
- SkTypeface.h/cpp: removed legacy MakeDefault, RefDefault, MakeFromName/File/Stream/Data, UniqueID
- SkFontMgr.h: removed RefDefault, MakeDefault, Factory
- Various gn/build/infrastructure files: took upstream

Custom font manager and typeface defaults will be implemented in C API layer.
- sk_typeface: stub out removed factory methods (moved to fontmgr)
- sk_fontmgr: implement create/ref_default using platform-specific factories
- sk_font: translate empty typeface ↔ null for backwards compatibility
- gr_context: GrDirectContext::MakeVulkan → GrDirectContexts::MakeVulkan
- gr_context/sk_image: GrMipMapped → skgpu::Mipmapped
- Add required includes for GpuTypes.h and GrVkDirectContext.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- sk_typeface: stub out removed factory methods (moved to fontmgr)
- sk_fontmgr: implement create/ref_default using platform-specific factories
- sk_font: translate empty typeface ↔ null for backwards compatibility
- gr_context: GrDirectContext::MakeVulkan → GrDirectContexts::MakeVulkan
- gr_context/sk_image: GrMipMapped → skgpu::Mipmapped
- skresources: bool predecode → ImageDecodeStrategy enum
- Add required includes for GpuTypes.h and GrVkDirectContext.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- GrVkYcbcrConversionInfo: use DEF_MAP instead of DEF_STRUCT_MAP (now a type alias)
- GrDirectContext::MakeGL → GrDirectContexts::MakeGL
- Add include for GrGLDirectContext.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…aint

In Skia m122+, SkFont(nullptr) creates an empty typeface that draws
nothing. SkiaSharp preserves the legacy behavior where null means
'platform default' by routing through the shared font manager singleton.

Affected functions:
- sk_font_new() - now creates font with default typeface
- sk_font_new_with_values(nullptr, ...) - uses default typeface
- sk_font_set_typeface(font, nullptr) - sets default typeface
- SkCompatPaint() - initializes internal font with default typeface

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow
Copy link
Author

Companion PR: mono/SkiaSharp#3559

mattleibow and others added 6 commits March 12, 2026 01:37
These 6 functions were stubbed to return nullptr after the m122 upstream
removal. Since the C API has no ABI compatibility requirement, remove
them entirely rather than keeping useless stubs.

Removed:
- sk_typeface_create_default
- sk_typeface_ref_default
- sk_typeface_create_from_name
- sk_typeface_create_from_file
- sk_typeface_create_from_stream
- sk_typeface_create_from_data

All callers have been migrated to sk_fontmgr_* equivalents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose the upstream skresources::ImageDecodeStrategy enum as
skresources_image_decode_strategy_t with values LazyDecode and PreDecode.

New functions:
- skresources_file_resource_provider_make2(base_dir, strategy)
- skresources_data_uri_resource_provider_proxy_make2(rp, strategy)

Existing bool overloads kept for compatibility, delegating to the new
enum-based functions internally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SkFontMgr_New_Custom_Empty() requires skia_enable_fontmgr_custom_empty
which is disabled on WASM builds. Use SkFontMgr::RefEmpty() instead,
which is always available from core Skia and doesn't require any port
library to be linked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On WASM (and platforms with SK_FONTMGR_FREETYPE_EMBEDDED_AVAILABLE),
use SkFontMgr_New_Custom_Data instead of SkFontMgr::RefEmpty() as
the default platform font manager. The empty font manager returns
nullptr from onMakeFromData, making it impossible to create typefaces
from font data at runtime. The custom data font manager uses FreeType
and fully supports creating typefaces from data/streams.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Switch from SkFontMgr_New_Custom_Data (empty, no fonts) to
SkFontMgr_New_Custom_Embedded(&SK_EMBEDDED_FONTS) for platforms
with SK_FONTMGR_FREETYPE_EMBEDDED_AVAILABLE.

The WASM build compiles NotoMono-Regular.ttf into the binary via
embed_resources.py as the SK_EMBEDDED_FONTS symbol. Using the
embedded font manager ensures text rendering works out of the box
without requiring explicit font registration — matching the previous
behavior where WASM had a monospace fallback font.

The embedded font manager also supports creating additional typefaces
from data/streams via FreeType at runtime.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@4Darmygeometry
Copy link

Companion PR: mono/SkiaSharp#3559

PR that fix LoongArch64 LSX error: #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.