1020 document compositionoptionsuseregiondirtyrectclipping being disabled by default#1026
Conversation
Update the embedded Linux page with a new section explaining the benefits of dirty rect clipping and how to enable it.
There was a problem hiding this comment.
Pull request overview
This PR updates Avalonia documentation to explain the Avalonia 12.1 change where CompositionOptions.UseRegionDirtyRectClipping is disabled by default, and to guide users on enabling it (especially for embedded Linux scenarios).
Changes:
- Adds a new embedded Linux section explaining when/why to enable region dirty-rect clipping and links back to performance guidance.
- Adds a new “Region dirty rect clipping” subsection to the performance optimization guide, including
MaxDirtyRectsnotes and cross-links. - Refreshes several existing performance guide sections for clarity and structure.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| docs/platform-specific-guides/embedded-linux/embedded-linux.md | Adds a rendering performance section focused on enabling region dirty-rect clipping for embedded Linux, plus cross-links and frontmatter metadata. |
| docs/app-development/performance.md | Adds/updates performance guidance including a new region dirty-rect clipping section and multiple editorial improvements across the page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| When content changes, Avalonia repaints the affected, or "dirty", regions of the screen rather than the whole frame. [`CompositionOptions.UseRegionDirtyRectClipping`](/api/avalonia/rendering/composition/compositionoptions) tracks those regions more precisely using a dirty rect system, but adds extra CPU time to process the render pass. | ||
|
|
||
| Compiled bindings resolve property paths at compile time, avoiding runtime reflection: | ||
| This option is **disabled by default** from Avalonia 12.1 to minimize loss of frame rate in complex scenes. |
There was a problem hiding this comment.
For clarity, the option was and is still null by default, which means "Avalonia chooses what's best", so we can change the behavior in future releases if we deem it more optimal (like we just did). In 12.1, Avalonia chooses that false is now the best.
(As long as we keep the docs up-to-date, I'm not sure that difference is worth explaining as this might confuse the user: after all, it's definitely "false by default" as far as they're concerned.)
This PR adds documentation to cover changes to
CompositionOptions.UseRegionDirtyRectClippingintroduced by AvaloniaUI/Avalonia#21553.