Repository navigation
fix(2dsk): Stop referencing Graphics3DGL from Graphics2DSK - #24770
Conversation
|
Claude finished @MartinZikmund's task in 3m 58s —— View job Claude finished reviewing this PRTodo list
Verdict: shipThis is a clean, well-scoped root-cause fix — 1 low-severity finding, 0 blocking issues. Summary of what I checked:
Finding posted inline ( Not independently re-validated in this environment (per PR description, these rely on CI): Android Release AOT and net11 iOS linker builds, and the "strict analyzer + |
Graphics2DSK references Graphics3DGL without a package dependency (unoplatform/uno#24699), and the .NET 11 iOS CoreTypeMap linker step fails on the unresolved assembly with MT2390. CI builds now add the reference to net11.0-ios heads until unoplatform/uno#24770 ships. Refs #2283 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012LP9CJvBWmdHb4JUSTF6DN
|
Claude finished @MartinZikmund's task in 2m 42s —— View job Claude's reviewTodo list
Verdict: ship — 0 new findingsThis PR is in good shape. Re-reviewing the current state of all 7 changed files against
Checked specifically for this pass:
No cross-cutting concerns outside what's already been discussed on the thread. Android Release AOT and net11 iOS linker validation still rely on CI/uno.templates per the PR description — not independently re-run here. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new GL runtime test leaves native resources loaded and can contaminate subsequent tests.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Removes Graphics2DSK’s hard dependency on the optional Graphics3DGL assembly while preserving reflective GL fallback.
Changes:
- Moves the GL island implementation into Graphics3DGL.
- Resolves the island reflectively and updates logging dependencies.
- Adds dependency and runtime regression tests.
Review result: 1 unresolved bug.
| File | Description |
|---|---|
Given_SKCanvasElement.skia.cs |
Adds dependency and GL fallback tests. |
AssemblyInfo.cs |
Grants Graphics2DSK logging access. |
Uno.WinUI.Graphics3DGL.csproj |
Adds SkiaSharp and restores mobile targeting. |
SkiaGLCanvasElement.cs |
Moves the GL island into Graphics3DGL. |
Uno.WinUI.Graphics2DSK.Crossruntime.csproj |
Removes Graphics3DGL and Silk references. |
SKCanvasElement.cs |
Reflectively creates and invalidates the GL island. |
Uno.UI.Build.csproj |
Removes the obsolete reference-build property. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
ed620d8 to
fae970f
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 4
Open (4)
Because the island type is located viaType.GetTypefrom a string and (per the PR description) is… · New Because the island type is located viaType.GetTypefrom a string and (per the PR description) is… · New This uses the collection-expression[...]syntax, which requires a sufficiently new C# language… · New Clear WindowContent in finally to prevent GL resource leaks
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (7)
SKCanvasElementswitches toUno.Foundation.Logging(and uses.Info(...)), but it still… · NewSkiaGLCanvasElementis activated purely viaType.GetTypeon an assembly-qualified string and is… · NewSkiaGLCanvasElementis activated purely viaType.GetTypeon an assembly-qualified string and is… · New This uses the collection-expression[...]syntax, which requires a sufficiently new C# language… Because the island type is located viaType.GetTypefrom a string and (per the PR description) is… Because the island type is located viaType.GetTypefrom a string and (per the PR description) is… Clear WindowContent in finally to prevent GL resource leaks
|
Claude finished @MartinZikmund's task in 1m 39s —— View job Todo list
Verdict: ship — 0 new findingsRe-diffed Confirmed still holding for all 7 files:
One pre-existing pattern I checked but am not flagging: Not independently re-executed here (relies on CI per the PR description): Android Release AOT, net11 iOS linker ( |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24770/wasm-skia-net9/index.html |
|
The build 237195 found UI Test snapshots differences: Details
|
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The unresolved mobile regression and missing Android AOT/iOS validation require human review.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (7)
SKCanvasElementswitches toUno.Foundation.Logging(and uses.Info(...)), but it still…SkiaGLCanvasElementis activated purely viaType.GetTypeon an assembly-qualified string and is…SkiaGLCanvasElementis activated purely viaType.GetTypeon an assembly-qualified string and is… This uses the collection-expression[...]syntax, which requires a sufficiently new C# language… Because the island type is located viaType.GetTypefrom a string and (per the PR description) is… Because the island type is located viaType.GetTypefrom a string and (per the PR description) is… Clear WindowContent in finally to prevent GL resource leaks
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24770/wasm-skia-net9/index.html |
|
The build 237386 found UI Test snapshots differences: Details
|
The GL-island fallback made Graphics2DSK reference Graphics3DGL, which its package doesn't depend on. JIT targets tolerated it, but Android AOT and the .NET 11 iOS linker (CoreTypeMap, MT2390) resolve every reference and failed on every default app. SkiaGLCanvasElement moves into Graphics3DGL and takes its render and unavailable callbacks as delegates. SKCanvasElement creates it by name when Graphics3DGL is present and falls back to the software surface otherwise. Logging moves to Uno.Foundation.Logging, dropping the undeclared Uno.Core.Extensions.Logging.Singleton and M.E.Logging.Abstractions refs. Fixes #24699 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ku9VqS7Jf4TTnjPGrRAVff
This reverts commit 01e809a. Graphics2DSK no longer references Graphics3DGL, so the reference build no longer pulls in its mobile TFMs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ku9VqS7Jf4TTnjPGrRAVff
Covers #24699: Graphics2DSK must not reference Graphics3DGL or Silk, and the GL island must stay resolvable by name and render (or report GL as unavailable) through its delegate contract. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ku9VqS7Jf4TTnjPGrRAVff
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G7PsEU6gSpLZXrYuK8WWpt
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G7PsEU6gSpLZXrYuK8WWpt
Graphics3DGL registers a public IGLIsland extension that renders through an IGLIslandRenderer; Graphics2DSK supplies the Skia-on-GL renderer. Drops the by-name reflection lookup (trimming-safe) and Graphics3DGL's SkiaSharp reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CKYPsdeNEWd1CARAojRx7H
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CKYPsdeNEWd1CARAojRx7H
GLIsland was CROSSRUNTIME-only, so an app referencing Graphics3DGL on Android/iOS loaded an assembly without the IGLIsland registration and SKCanvasElement fell back to the software surface. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EEXDUBVaCc4XeD4iLqTA43
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EEXDUBVaCc4XeD4iLqTA43
bed238c to
ebdaf00
Compare
|
Claude finished @MartinZikmund's task in 17s —— View job Review of the latest push (
|
|
The build 237847 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
…e heads This reverts commit 184e2ae. Uno 7.0.0-dev.1574 contains unoplatform/uno#24770, so Uno.WinUI.Graphics2DSK no longer references Uno.WinUI.Graphics3DGL and the Android AOT build no longer needs it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
First build with unoplatform/uno#24770, so Uno.WinUI.Graphics2DSK no longer needs an undeclared Uno.WinUI.Graphics3DGL on Android. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Picks up unoplatform/uno#24770, which fixes Android Release AOT of Uno.WinUI.Graphics2DSK (unoplatform/uno#24699). Co-Authored-By: Claude Opus 5.5 <[email protected]>



GitHub Issue: closes #24699
PR Type
What is the current behavior? 🤔
The GL-island fallback (b6b81f2, #24153) made
Uno.WinUI.Graphics2DSK.dllreferenceUno.WinUI.Graphics3DGL(andSilk.NET.OpenGL) throughSkiaGLCanvasElement : GLCanvasElement. The package doesn't depend on either, and the Uno.Sdk only adds Graphics3DGL for Desktop and WinAppSDK heads. JIT targets tolerate the missing assembly, but eager resolvers don't:Could not load file or assembly 'Uno.WinUI.Graphics3DGL'MT2390: The linker step 'CoreTypeMap' failed while processing Uno.WinUI.Graphics2DSK: Unable to resolve the assembly reference Uno.WinUI.Graphics3DGL(seen in feat!: Replace net9.0 with net11.0 in templates and CI validation uno.templates#2281)What is the new behavior? 🚀
Graphics2DSK.dllno longer references Graphics3DGL or Silk.Uno.Graphics:IGLIsland(an element rendering into its own offscreen GL framebuffer) andIGLIslandRenderer(what draws into it).IGLIslandasGLIsland : GLCanvasElementand registers it with[assembly: ApiExtension], on every non-WinAppSDK target (Skia, Android, iOS/tvOS).SKCanvasElementasksApiExtensibilityfor an island and passes aSkiaGLIslandRenderer(the formerSkiaGLCanvasElementdrawing code, still in 2DSK). Without Graphics3DGL nothing is registered and it uses the software surface as before. TheNoInliningisolation tricks are gone.Uno.Core.Extensions.LoggingtoUno.Foundation.Logging, a declaredUno.WinUIdependency. Those refs had also only arrived transitively through Graphics3DGL. This needs a newInternalsVisibleTo, the same oneUno.UI.Lottiealready has.BuildGraphics3DGLSkiaOnly): the reference build only needed it because 2DSK pulled Graphics3DGL's mobile TFMs into its graph.Fix, revert and tests are separate commits.
Validation
Runtime tests, Skia Desktop (
net11.0-desktop). The guard tests fail before the fix and pass after:When_Graphics3DGL_Not_Referenced_By_Graphics2DSKWhen_GL_Island_Registered_By_Graphics3DGLWhen_GL_Island_Renders_Or_Reports_UnavailableGiven_SKCanvasElementtestsAndroid AOT and net11 iOS weren't reproduced locally. CI plus the uno.templates net11 matrix will confirm them.
PR Checklist ✅
IGLIsland/IGLIslandRendererare extension plumbing)🤖 Generated with Claude Code
https://claude.ai/code/session_01EEXDUBVaCc4XeD4iLqTA43