From 777b57471f45a7c5fabfb21309d6bc1ebef700da Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Fri, 16 Jun 2023 17:49:54 +0200 Subject: [PATCH] Reformat markdown documents --- CHANGELOG.md | 46 +++++++++++++++++++++++----------------------- README.md | 32 ++++++++++++++------------------ 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77369940..4e457636 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,38 +73,38 @@ # 0.3.0 -* On MacOS, the contents scale is updated when set_buffer() is called, to adapt when the window is on a new screen (#68). -* **Breaking:** Split the `GraphicsContext` type into `Context` and `Surface` (#64). -* On Web, cache the document in the `Context` type (#66). -* **Breaking:** Introduce a new "owned buffer" for no-copy presentation (#65). -* Enable support for multi-threaded WASM (#77). -* Fix buffer resizing on X11 (#69). -* Add a set of functions for handling buffer damage (#99). -* Add a `fetch()` function for getting the window contents (#104). -* Bump MSRV to 1.64 (#81). +- On MacOS, the contents scale is updated when set_buffer() is called, to adapt when the window is on a new screen (#68). +- **Breaking:** Split the `GraphicsContext` type into `Context` and `Surface` (#64). +- On Web, cache the document in the `Context` type (#66). +- **Breaking:** Introduce a new "owned buffer" for no-copy presentation (#65). +- Enable support for multi-threaded WASM (#77). +- Fix buffer resizing on X11 (#69). +- Add a set of functions for handling buffer damage (#99). +- Add a `fetch()` function for getting the window contents (#104). +- Bump MSRV to 1.64 (#81). # 0.2.1 -* Bump `windows-sys` to 0.48 +- Bump `windows-sys` to 0.48 # 0.2.0 -* Add support for Redox/Orbital. -* Add support for BSD distributions. -* Ported Windows backend from `winapi` to `windows-sys`. -* **Breaking:** Take a reference to a window instead of owning the window. -* Add a `from_raw` function for directly using raw handles. -* Improvements for Wayland support. -* Support for HiDPI on macOS. -* **Breaking:** Add feature flags for `x11` and `wayland` backends. -* Use static dispatch instead of dynamic dispatch for the backends. -* Add `libxcb` support to the X11 backend. -* Use X11 MIT-SHM extension, if available. +- Add support for Redox/Orbital. +- Add support for BSD distributions. +- Ported Windows backend from `winapi` to `windows-sys`. +- **Breaking:** Take a reference to a window instead of owning the window. +- Add a `from_raw` function for directly using raw handles. +- Improvements for Wayland support. +- Support for HiDPI on macOS. +- **Breaking:** Add feature flags for `x11` and `wayland` backends. +- Use static dispatch instead of dynamic dispatch for the backends. +- Add `libxcb` support to the X11 backend. +- Use X11 MIT-SHM extension, if available. # 0.1.1 -* Added WASM support (Thanks to [Liamolucko](https://github.com/Liamolucko)!) -* CALayer is now used for Mac OS backend, which is more flexible about what happens in the windowing library (Thanks to [lunixbochs](https://github.com/lunixbochs)!) +- Added WASM support (Thanks to [Liamolucko](https://github.com/Liamolucko)!) +- CALayer is now used for Mac OS backend, which is more flexible about what happens in the windowing library (Thanks to [lunixbochs](https://github.com/lunixbochs)!) # 0.1.0 diff --git a/README.md b/README.md index 9b52f846..96355a18 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -Overview -== +# Softbuffer Enables software rendering via drawing an image straight to a window. @@ -7,8 +6,7 @@ Softbuffer integrates with the [`raw-window-handle`](https://crates.io/crates/ra to allow writing pixels to a window in a cross-platform way while using the very high quality dedicated window management libraries that are available in the Rust ecosystem. -Alternatives -== +## Alternatives [minifb](https://crates.io/crates/minifb) also allows putting a 2D buffer/image on a window in a platform-independent way. Minifb's approach to doing window management itself, however, is problematic code duplication. We already have very high quality libraries for this in the Rust ecosystem @@ -24,21 +22,21 @@ hardware accelerated graphics stack in any way, and is thus more portable to ins hardware acceleration (e.g. VMs, older computers, computers with misconfigured drivers). Softbuffer should be used over pixels when its GPU-accelerated post-processing effects are not needed. -License & Credits -== +## License & Credits 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. -Platform support: -== +## Platform support: + Some, but not all, platforms supported in [raw-window-handle](https://crates.io/crates/raw-window-handle) are supported by Softbuffer. Pull requests are welcome to add new platforms! **Nonetheless, all major desktop platforms that winit uses on desktop are supported.** For now, the priority for new platforms is: -1) to have at least one platform on each OS working (e.g. one of Win32 or WinRT, or one of Xlib, Xcb, and Wayland) and -2) for that one platform on each OS to be the one that winit uses. + +1. to have at least one platform on each OS working (e.g. one of Win32 or WinRT, or one of Xlib, Xcb, and Wayland) and +2. for that one platform on each OS to be the one that winit uses. (PRs will be accepted for any platform, even if it does not follow the above priority.) @@ -59,13 +57,12 @@ For now, the priority for new platforms is: ❔: Immature\ ❌: Absent -WebAssembly ------------ +## WebAssembly To run an example with the web backend: `cargo run-wasm --example winit` -Example -== +## Example + ```rust,no_run use std::num::NonZeroU32; use std::rc::Rc; @@ -138,8 +135,8 @@ fn main() { } ``` -MSRV Policy -== +## MSRV Policy + This crate's Minimum Supported Rust Version (MSRV) is **1.70**. Changes to the MSRV will be accompanied by a minor version bump. @@ -163,7 +160,6 @@ same MSRV policy. [`rust-windowing`]: https://github.com/rust-windowing -Changelog ---------- +## Changelog See the [changelog](CHANGELOG.md) for a list of this package's versions and the changes made in each version.