-
Notifications
You must be signed in to change notification settings - Fork 69
Improve the README #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
madsmtm
wants to merge
3
commits into
master
Choose a base branch
from
madsmtm/readme
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Improve the README #325
+52
−21
Conversation
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
It's more relevant to list actual features etc. at the top, than to list alternatives.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
662e552 to
819d5f4
Compare
819d5f4 to
91395ac
Compare
Provide motivation and recommend `tiny-skia` and `vello_cpu` for drawing primitives.
91395ac to
57835ec
Compare
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).