Repository navigation
fix(skia): Bound SKCanvasVisual damage by its size (6.7) - #24793
Conversation
|
Claude finished @MartinZikmund's task in 3m 23s —— View job Code Review
SummaryVerdict: LGTM with minor suggestions — no blocking issues. Fix ( Test (
Findings (2 low-severity suggestions, both inline):
Neither finding is a correctness issue; the fix is sound and the test validates the right invariant. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24793/wasm-skia-net9/index.html |
|
The build 235998 did not find any UI Test snapshots differences. |
|
|
|
Claude finished @MartinZikmund's task in 1m 32s —— View job Code Review
SummaryVerdict: LGTM with minor suggestions — the new commit ( Prior suggestions (2 low-severity, both re-posted as inline comments): The two suggestions from the previous review pass are still unaddressed:
Neither is a correctness issue; the fix and core test logic are sound. The |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24793/wasm-skia-net9/index.html |
|
The build 236180 did not find any UI Test snapshots differences. |
|
@agneszitte merge this one please |
|
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. |
SKCanvasVisual clips its drawing to Size but did not declare PaintsWithinOwnSize, so the damage code fell back to the visual's whole clip. SKCanvasElement repaints every frame for Lottie, so any running ProgressRing, AnimatedIcon or AnimatedVisualPlayer damaged the entire window on every frame and defeated partial repaint. Master is unaffected: its SKCanvasVisual derives from BorderVisual. Static grid with one spinning ProgressRing, damage overlay: whole window -> the ring's box. Process CPU per 3 s: ~3.3 s -> ~1.4 s (6.5: ~0.7 s). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AzHtsXz33DcziPre7h3b9f
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AzHtsXz33DcziPre7h3b9f
Uno.Templates@*-* now resolves to 7.0.0-dev.17, so MyApp is built on 7.0 packages and the locally built 6.x RemoteControl client never connects. Mirrors the master ignore (37dc650). Refs #24800 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014RHVD5sbb5nMHzf8Lu24gZ
49cdbb3 to
95cd9b9
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: 2
Open (2)
What changed in this PR
Improves Skia compositor damage tracking for SKCanvasVisual so repaints are bounded to the visual’s size (avoiding full-window redraws), and adds a runtime test covering the regression.
Changes:
- Declare
SKCanvasVisual.PaintsWithinOwnSize => trueto allow damage tracking to clamp toSize. - Add a Skia-specific runtime test asserting invalidation damage remains within the canvas bounds.
- Disable a RemoteControl dev server integration test due to template/package version mismatch.
| File | Description |
|---|---|
| src/Uno.UI/Graphics/SKCanvasVisual.skia.cs | Flags SKCanvasVisual as painting within its own size to improve damage region bounding. |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Composition/Given_Visual_Damage.cs | Adds regression test validating bounded damage for SKCanvasVisual invalidations under Skia. |
| src/Uno.UI.RemoteControl.DevServer.Tests/AppLaunch/RealAppLaunchIntegrationTests.cs | Ignores an integration test due to Uno.Templates scaffolding against incompatible packages. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Claude finished @MartinZikmund's task in 1m 37s —— View job Code Review
SummaryVerdict: LGTM with minor suggestions — no new issues introduced; the two low-severity suggestions from prior review passes are still unaddressed. Fix ( Integration test ignore ( Persistent suggestions (2 low-severity, re-posted as inline comments):
Neither is a correctness issue; the fix is sound and the test validates the right invariant. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24793/wasm-skia-net9/index.html |
|
The build 237181 did not find any UI Test snapshots differences. |
|
|
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Verified: SKCanvasVisual's Paint clips to its own Size (ClipRect(0, 0, Size)), so declaring PaintsWithinOwnSize => true is correct. The PR's claim that master is unaffected holds on GitHub master (0599dad): there SKCanvasVisual derives from BorderVisual, and BorderVisual.skia.cs declares PaintsWithinOwnSize => true. Note that the local uno checkout is stale. There SKCanvasVisual still derives from SKCanvasVisualBase, so I checked GitHub master for this.
Findings:
- Undisclosed test disable (blocking for merge as written). src/Uno.UI.RemoteControl.DevServer.Tests/AppLaunch/RealAppLaunchIntegrationTests.cs gets the same
[Ignore]as #24787. It is not mentioned in the PR body. Please move it to its own PR or disclose the reason and re-enable condition. - Weakened test versus 6.8 (#24792). The 6.8 test asserts Left >= 10 and Top >= 10 as well as Right <= 70 and Bottom <= 70. The 6.7 version drops the lower bounds without explanation. The upper-bound check still catches the full-window repaint, but please restore the lower bounds unless 6.7 damage legitimately extends above or left of the canvas, in which case say why.
Validation: code review and master comparison only. I did not build or run tests. The PR body reports 10/10 on the 6.8 code, which is identical in SKCanvasVisual.skia.cs, not on this branch.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |

GitHub Issue: closes #24790
PR Type:
🐞 Bugfix (performance)
What changed? 🚀
SKCanvasVisualclips its drawing to itsSizebut didn't declarePaintsWithinOwnSize. So damage tracking couldn't bound it and fell back to the visual's whole clip, which is the window.SKCanvasElementrepaints every frame for Lottie, so any runningProgressRing,AnimatedIconorAnimatedVisualPlayermade every frame a full-window repaint, defeating damage regions entirely.This PR declares
PaintsWithinOwnSize => true. Master is unaffected: itsSKCanvasVisualderives fromBorderVisual, which already declares it.Measurements 📊
Static grid of Fluent
Buttons plus one 60×60ProgressRing, Skia Win32 at 250%:DamageRegionOverlay: the whole window was damaged every frame before this PR; with it, only the ring's box is.The remaining gap against 6.5 is tracked for the rendering owner in #24791.
PR Checklist ✅
Screenshots Compare Test Runresults.Validation
Given_Visual_Damage+Given_ProgressRing+Given_AnimatedVisualPlayer: 10/10 (the new test was shown to fail without the fix on 6.8, where the code is identical).Uno.UI.Skiabuilt withoutUnoFastDevBuild(6.8), so analyzers ran.🤖 Generated with Claude Code
https://claude.ai/code/session_01AzHtsXz33DcziPre7h3b9f