Skip to content

1020 document compositionoptionsuseregiondirtyrectclipping being disabled by default#1026

Merged
luke-whos-here merged 8 commits into
mainfrom
1020-document-compositionoptionsuseregiondirtyrectclipping-being-disabled-by-default
Jun 16, 2026
Merged

1020 document compositionoptionsuseregiondirtyrectclipping being disabled by default#1026
luke-whos-here merged 8 commits into
mainfrom
1020-document-compositionoptionsuseregiondirtyrectclipping-being-disabled-by-default

Conversation

@luke-whos-here

Copy link
Copy Markdown
Contributor

This PR adds documentation to cover changes to CompositionOptions.UseRegionDirtyRectClipping introduced by AvaloniaUI/Avalonia#21553.

  • Adds a new section to the Performance Optimization guide to explain the impact of region dirty rect clipping, with instructions to enable the option if desired, and a note on setting max dirty rects.
  • Adds a new section to the Embedded Linux platform guide to call out that the option is beneficial to that platform, with instructions to enable the option.
  • Add crosslinks between the relevant sections.
  • Opportunistic general edits and updates on the Performance Optimization page, which was probably overdue for a revision anyway.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 MaxDirtyRects notes 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.

Comment thread docs/app-development/performance.md
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/platform-specific-guides/embedded-linux/embedded-linux.md Outdated
Comment thread docs/platform-specific-guides/embedded-linux/embedded-linux.md Outdated
Comment thread docs/app-development/performance.md Outdated
Comment thread docs/app-development/performance.md Outdated
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

Comment thread docs/platform-specific-guides/embedded-linux/embedded-linux.md Outdated
@luke-whos-here luke-whos-here merged commit 190ded1 into main Jun 16, 2026
1 check passed
@luke-whos-here luke-whos-here deleted the 1020-document-compositionoptionsuseregiondirtyrectclipping-being-disabled-by-default branch June 16, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document CompositionOptions.UseRegionDirtyRectClipping being disabled by default

3 participants