[skia-sync] Merge upstream chrome/m148#265
Closed
mattleibow wants to merge 3 commits into
Closed
Conversation
Since the layouts are passed by pointer in the `nextInChain` field, their addresses need to stay valid until the BindGroupLayout is created. With vector, if it ever grew, that would not remain the case. Since there are usually only 0 to 1 immutable samplers, this likely never happened (and also why it uses a built-in storage for 1). Also removes the include for vector and uses TArray (we had been mixing both throughout the file). Bug: 520514458 Fixed: 523531990 Change-Id: I44c9566c68ab0e6c6d659ea77a423ddc50d53c76 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1264157 Reviewed-by: Thomas Smith <thomsmit@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> (cherry picked from commit 6a4be3a) Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1266356
There was a data race in SkTypeface_Mac where `onOpenStream` and `onOpenExistingStream` would race to read/write `fStream`. While `onOpenStream` would begin initializing `fStream` on one thread, a separate thread could be calling `onOpenExistingStream` to try to read `fStream` before it was done initializing. The issue was resolved by applying a mutex on `fStream`. The cl introducing this bug (https://skia-review.git.corp.google.com/c/skia/+/204720) was focused on caching the typefaces received with a global process wide `gTFCache` to save on performance and memory. The issue arose in that since the SkTypeface_Mac could be accessed across threads, it became thread unsafe. A test was added to this CL but removed as it was too large and took too long. It helps us keep it in the patch history for reference. Bug: b/520535595 Bug: 520535595 Fixed: 524508854 Change-Id: Id28aeed3d67a5a5246d22681f2c7ab0e6c133558 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1264296 Commit-Queue: Alexis Cruz-Ayala <alexisdavidc@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> (cherry picked from commit ba3ee9b) Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1274476
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated upstream merge of
chrome/m148.Skia upstream sync — release-line
release/4.148.x(m148 → m148 bug fixes)This is a bug-fix-only sync on the release line. The sync brings the
release/4.148.xbranch inmono/skiaup to the current tip of upstreamgoogle/skiachrome/m148. BecauseCURRENT == TARGET, no milestone bumpor build-config changes are involved.
Upstream merge
Merged
upstream/chrome/m148(tip46f2e16555cac1211f4087cf24728fd741ac6495)into
skia-sync/release-4.148.xon top of the previous m148 pin(
1a155bae3a— the tip ofrelease/4.148.xbefore this sync).New upstream commits pulled in (oldest → newest):
3a90f6662a[graphite] Use stable collection for static bindingssrc/gpu/graphite/dawn/DawnGraphicsPipeline.cpp46f2e16555[m148] Resolved a Data Race on fStream in SkTypeface_Macsrc/ports/SkTypeface_mac_ct.{cpp,h}The merge was created with
git merge --no-commit upstream/chrome/m148followed by
git commit, producing a proper two-parent merge commit(
d5c1f3f66dfc7c41f32240191b9a33bb55758f89) with attribution preserved.Conflicts resolved
None.
Automatic merge went well; stopped before committing as requested.No
git diff --checkissues, no conflict markers, and no SkiaSharp forkpatches needed re-application — neither upstream commit overlaps any file
we maintain in the fork.
C API fixes
None required. Both upstream commits touch only upstream-only sources:
src/ports/SkTypeface_mac_ct.{cpp,h}— Apple/CoreText typeface backend(not part of our
include/c//src/c/shim).src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp— Graphite/Dawn GPUbackend. SkiaSharp uses Ganesh, not Graphite, so this file is not built
into
libSkiaSharp.Our C API shim (
src/c/*.cpp,include/c/*.h) is unchanged.SK_C_INCREMENTremains0ininclude/c/sk_types.h, and theSkiaSharp-side regenerated bindings show no diff.
Source-file inventory
git difffrom the previous m148 pin to upstream's new tip shows no filesadded or removed under
src/orinclude/, so noBUILD.gnadjustmentsare needed and no upstream-side files were dropped.
Items needing human attention
None. This is a clean bug-fix sync with no unresolved questions.
Verification
git blameattributiongit diff --checkclean)ls src/c/*.cpp include/c/*.hmatches pre-merge)libSkiaSharp.so.148.0.0builds on Linux x64 from this submodule SHACreated by skia-upstream-sync.