Update to softbuffer
0.3, tracking up to age
sets of primitives
#2190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should perform better on Windows, Wayland, and X11, and the same of macOS. (rust-windowing/softbuffer#95 would allow macOS to also perform better here.)
I've done basic testing on Wayland and Windows. I haven't tested X11 or macOS yet. I'm not sure how best to check the profile the performance impact.
The latest version of softbuffer is 0.4, which uses raw-window-handle 0.6. That probably will need #2169, and maybe an update to wgpu (which has updated to raw-window-handle 0.6, but hasn't released a change with that yet).
It should also be possible to make use of Softbuffer's
present_with_damage
, if we can get damage regions relative to the last present (not necessarily the same buffer). Some backends can benefit from that.I did run into an issue with buffer age in softbuffer, which I seem to have made a small mistake in the Wayland implementation of (rust-windowing/softbuffer#191). If everything else is fine, I can probably do a patch release with that for both Softbuffer 0.3 and 0.4. But currently this uses a git dependency with that patch.