Merged
Conversation
madsmtm
commented
Jan 27, 2026
Comment on lines
11
to
38
| ## How it works | ||
|
|
||
| ## License & Credits | ||
| Most platforms have a compositor of some sort (WindowServer on macOS, Desktop Window Manager on | ||
| Windows, the Wayland compositor, etc). This is a separate process that applications communicate | ||
| with over IPC, and it is responsible for taking the various surfaces that applications send to it | ||
| and mash ("composite") them together in the right way to render the user's desktop on the | ||
| connected monitors. | ||
|
|
||
| This library is dual-licensed under MIT or Apache-2.0, just like minifb and rust. Significant portions of code were taken | ||
| from the minifb library to do platform-specific work. | ||
| The role of Softbuffer then is to create a shared memory region (i.e. [`Buffer`]) that can be | ||
| written to from the CPU, and then handed to the compositor (in [`Buffer::present`]). Softbuffer | ||
| keeps a set of buffers around per surface to implement double-buffering (depending on platform | ||
| requirements). | ||
|
|
||
| Softbuffer strives to present buffers in a zero-copy manner. One interesting wrinkle here is that | ||
| the compositor is often GPU-accelerated, so on platforms without a unified memory architecture, | ||
| some copying is inherently necessary (though when possible, it is done in hardware using DMA). |
Member
Author
There was a problem hiding this comment.
I'm fairly confident in most this section, or at least confident that this is a good mental model for how Softbuffer should work internally, but would ideally like some more eyes on it.
Member
There was a problem hiding this comment.
This seems like a fairly good description to me.
662e552 to
819d5f4
Compare
91395ac to
57835ec
Compare
notgull
approved these changes
Jan 30, 2026
Member
notgull
left a comment
There was a problem hiding this comment.
This one has been a long time coming.
It's more relevant to list actual features etc. at the top, than to list alternatives.
Provide motivation and recommend `tiny-skia` and `vello_cpu` for drawing primitives.
57835ec to
0798573
Compare
Member
Author
|
Thanks for the reviews! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Move the list of alternatives and license lower, and instead write some high-level information on how to use Softbuffer and how it works (or at least how it should work once we're zero-copy on all platforms).