You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skia: native-element clip path cache is static, so it is shared across windows and raced by per-window render threadsΒ #24122
CompositionTarget's native-element clip cache is static, but every piece of state it caches belongs to a single composition target β i.e. to a single window:
The two neighbours under the same comment are instance fields, and the static pair is used exactly like them:
invalidated by a per-target event β a canvas recreation nulls the scaled path (:304),
keyed on this target's frame β _lastNativeClipPath != lastRenderedFrame.nativeElementClipPath (:348).
Consequences with more than one window open:
Cross-window cache corruption. Recreating window A's canvas nulls window B's cached scaled path, and two windows with different clip paths invalidate each other on every frame. The scaled path returned at :359 can describe the wrong window's native elements.
A data race on every Skia host that renders each window on its own thread (Win32, X11, and macOS once feat(macos): Dedicated Metal render threadΒ #23594 lands). One render thread can be at _lastScaledNativeClipPath = new() (:350) while another transforms into it (:354) or returns it (:359) β a torn or empty SKPath handed to the native clipping layer (on macOS, uno_window_clip_svg).
This is why it has gone unnoticed: with a single window there is one composition target, so static and instance behave identically.
Expected behavior π―
Each composition target caches its own scaled clip path, so native-element clipping in one window is unaffected by another, and concurrent per-window render threads do not share a mutable SKPath.
How to reproduce it (as minimally and precisely as possible) π¬
Open two windows that both host native elements with different clip geometry (e.g. two instances of the ContentPresenter/ContentPresenter_NativeEmbedding_ZIndex sample, or a WebView2/MediaPlayerElement in each), and animate or resize one. The other window's native-element clipping is recomputed against the wrong cache.
Code inspection is the primary evidence; the race is timing-dependent and does not reproduce deterministically.
Activity
MartinZikmund commentedon Oct 14, 2026
Closing as a duplicate of #24239. Any details that were only here have been copied over to #24239.
Jen-Uno commentedon Oct 28, 2026
This issue was closed as a duplicate, so there is nothing for QA to verify. Moving it from Ready for QA Review to Done on the Uno Team Backlog.