Repository navigation
perf(media): Invert transforms without temporary objects - #26588
Conversation
Co-Authored-By: Martin Zikmund <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX
Co-Authored-By: Martin Zikmund <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Claude finished @MartinZikmund's task in 19s —— View job Review of #26588Verdict: ship. I found no blocking issues, so there are no inline comments. I read the diff and the surrounding code. I did not build or run tests. Issue count: 0 high, 0 medium, 2 nits. What I checked
Nits (non-blocking)
Cross-cutting
|
|
This pull request is merged. |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 247323 found UI Test snapshots differences: Details
|
GitHub Issue: Part of #24093
PR Type:
🔄 Refactoring
What changed? 🚀
Split out of #24094 (originally by @morning4coffe-dev), which now only carries the opt-in
XamlOptionalChangespart. This piece is always on, so it gets its own review.Adds direct inverse point/bounds operations (
GeneralTransform.TryTransformInverse/TryTransformBoundsInverse) for places that use the inverse once, so they no longer allocate a temporaryMatrixTransformor inverse transform. The publicGeneralTransform.InverseAPI is unchanged. Callers switched: Slider, ContextRequested, flyout pickers, WASM drag & drop.Upstream counterpart: 2739fe98.
Behaviour change: for a non-invertible transform, these paths now report
falseand callers fall back to the input coordinate. Previously they producedPoint(NaN, NaN), becauseMatrix3x2Extensions.Inverse()ignored the result ofMatrix3x2.Invert. This matches upstream'sE_FAILcontract forCTransform::TransformPoints(..., fInverse: true).Validation
Uno.UI.UnitTestsand SamplesApp (net11.0-desktop).Given_GeneralTransform_Inverse,Given_SliderandGiven_ContextRequested, 57/57.Performance
Headless Skia app with Fluent resources (x64, net10.0,
DOTNET_TieredCompilation=0), one process per scenario, 4 interleaved A/B rounds againstmaster. Allocations are UI-thread bytes and exact: amaster-vs-masternull run drifted 0.00%. A time change is bold only when it is larger than that scenario's null drift and the A/B ranges don't overlap; anything else is marked noise. Background load on the machine made some timings noisy.ContextRequestedEventArgs.TryGetPositionon a transformed elementBorder+ child (no templates)Tagset/getContextRequestedEventArgs.TryGetPositionon a transformed element allocates half as much (−600 B per call, the temporary inverse transform) and was about a third faster, though the time ranges overlapped. Untouched paths are unchanged.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX