Optimize Rendering Push Performance Using MIT-SHM
What does the pull request do?
This pull request implements the use of MIT-SHM for pushing rendered images. It replaces the XPutImage method with XShmPutImage. This change significantly reduces Bitmap copying at the X11 layer, enhancing rendering push performance.
What is the current behavior?
Currently, only XPutImage is used for pushing rendered images in soft rendering mode.
What is the updated/expected behavior with this PR?
This pull request provides additional options, allowing developers to configure the use of MIT-SHM shared memory for pushing rendered images. This can effectively improve rendering performance and reduce rendering latency on low-performance devices.
How was the solution implemented (if it's not obvious)?
The solution involves using MIT-SHM to push rendered images, following the method outlined by @kekekeks in https://github.com/AvaloniaUI/Avalonia/discussions/16690#discussioncomment-10378881 .
Checklist
- [ ] Added unit tests (if possible)?
- [ ] Added XML documentation to any related classes?
- [ ] Consider submitting a PR to https://github.com/AvaloniaUI/avalonia-docs with user documentation
Breaking changes
Obsoletions / Deprecations
Fixed issues
You can test this PR using the following package version. 11.2.999-cibuild0052090-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052150-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052166-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052168-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052219-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052227-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052233-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052239-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.2.999-cibuild0052245-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
@kekekeks Can I ask any plan about this? The code I have now has some conflicts. If you plan to merge the code or do more advanced work, I will be motivated to solve the code conflicts.