-
Notifications
You must be signed in to change notification settings - Fork 808
fix(CompositionEffectBrush): avoid infinite invalidation loop #20642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20642/wasm-skia-net9/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20642/docs/index.html |
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
@Mergifyio backport release/stable/6.0 |
✅ Backports have been created
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR prevents an infinite invalidation loop in CompositionEffectBrush
by batching updates to the HasBackdropBrushInput
property.
- Introduces a temporary flag to collect backdrop brush input state during effect generation.
- Delays the actual property update until after filter generation in
UpdatePaint
. - Adds debug logging in the setter of
HasBackdropBrushInput
to trace changes.
Comments suppressed due to low confidence (2)
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs:24
- [nitpick] The name
_hasBackdropBrushInputPrivate
is a bit unclear; consider renaming to something like_pendingBackdropBrushInput
to better convey its purpose.
private bool _hasBackdropBrushInputPrivate; // this one is reset and set during effect generation ...
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs:1615
- There are no existing unit tests covering this new invalidation buffering logic. Consider adding tests that verify
HasBackdropBrushInput
only changes once per paint cycle and that the infinite invalidation loop is resolved.
HasBackdropBrushInput = _hasBackdropBrushInputPrivate;
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20642/docs/index.html |
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20642/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20642/docs/index.html |
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20642/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20642/docs/index.html |
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20642/wasm-skia-net9/index.html |
…6.0/pr-20642 fix(CompositionEffectBrush): avoid infinite invalidation loop (backport #20642)
GitHub Issue (If applicable): closes #20634
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):