Skip to content

Commit 9023b09

Browse files
committed
Updated rest of the code to use softbuffer name instead of swbuf
1 parent ddb1b9b commit 9023b09

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ example, it occasionally segfaults on some platforms and is missing key features
1010
icon. While it would be possible to add these features to minifb, it makes more sense to instead use the standard
1111
window handling systems.
1212

13-
swbuf integrates with the [raw-window-handle](https://crates.io/crates/raw-window-handle) crate
13+
Softbuffer integrates with the [raw-window-handle](https://crates.io/crates/raw-window-handle) crate
1414
to allow writing to a window in a cross-platform way while using the very high quality dedicated window management
1515
libraries that are available in the Rust ecosystem.
1616

17-
What about [pixels](https://crates.io/crates/pixels)? Pixels accomplishes a very similar goal to swbuf,
17+
What about [pixels](https://crates.io/crates/pixels)? Pixels accomplishes a very similar goal to Softbuffer,
1818
however there are two key differences. Pixels provides some capacity for GPU-accelerated post-processing of what is
19-
displayed, while swbuf does not. Due to not having this post-processing, swbuf does not rely on the GPU or
19+
displayed, while Softbuffer does not. Due to not having this post-processing, Softbuffer does not rely on the GPU or
2020
hardware accelerated graphics stack in any way, and is thus more portable to installations that do not have access to
21-
hardware acceleration (e.g. VMs, older computers, computers with misconfigured drivers). swbuf should be used over
21+
hardware acceleration (e.g. VMs, older computers, computers with misconfigured drivers). Softbuffer should be used over
2222
pixels when its GPU-accelerated post-processing effects are not needed.
2323

2424

@@ -31,7 +31,7 @@ from the minifb library to do platform-specific work.
3131
Platform support:
3232
==
3333
Some, but not all, platforms supported in [raw-window-handle](https://crates.io/crates/raw-window-handle) are supported
34-
by swbuf. Pull requests are welcome to add new platforms! **Nonetheless, all major desktop platforms that winit uses
34+
by Softbuffer. Pull requests are welcome to add new platforms! **Nonetheless, all major desktop platforms that winit uses
3535
on desktop are supported.**
3636

3737
For now, the priority for new platforms is:
@@ -55,7 +55,7 @@ For now, the priority for new platforms is:
5555
Example
5656
==
5757
```rust,no_run
58-
use swbuf::GraphicsContext;
58+
use Softbuffer::GraphicsContext;
5959
use winit::event::{Event, WindowEvent};
6060
use winit::event_loop::{ControlFlow, EventLoop};
6161
use winit::window::WindowBuilder;

examples/animation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use instant::Instant;
22
#[cfg(not(target_arch = "wasm32"))]
33
use rayon::prelude::*;
44
use std::f64::consts::PI;
5-
use swbuf::GraphicsContext;
5+
use softbuffer::GraphicsContext;
66
use winit::event::{Event, WindowEvent};
77
use winit::event_loop::{ControlFlow, EventLoop};
88
use winit::window::WindowBuilder;

examples/fruit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use image::GenericImageView;
2-
use swbuf::GraphicsContext;
2+
use softbuffer::GraphicsContext;
33
use winit::event::{Event, WindowEvent};
44
use winit::event_loop::{ControlFlow, EventLoop};
55
use winit::window::WindowBuilder;

examples/winit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use swbuf::GraphicsContext;
1+
use softbuffer::GraphicsContext;
22
use winit::event::{Event, WindowEvent};
33
use winit::event_loop::{ControlFlow, EventLoop};
44
use winit::window::WindowBuilder;

examples/winit_wrong_sized_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use swbuf::GraphicsContext;
1+
use softbuffer::GraphicsContext;
22
use winit::event::{Event, WindowEvent};
33
use winit::event_loop::{ControlFlow, EventLoop};
44
use winit::window::WindowBuilder;

src/wayland/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub(super) struct WaylandBuffer {
2828

2929
impl WaylandBuffer {
3030
pub fn new(shm: &wl_shm::WlShm, width: i32, height: i32, qh: &QueueHandle<State>) -> Self {
31-
let name = unsafe { CStr::from_bytes_with_nul_unchecked("swbuf\0".as_bytes()) };
31+
let name = unsafe { CStr::from_bytes_with_nul_unchecked("softbuffer\0".as_bytes()) };
3232
let tempfile_fd = memfd_create(name, MemFdCreateFlag::MFD_CLOEXEC)
3333
.expect("Failed to create memfd to store buffer.");
3434
let tempfile = unsafe { File::from_raw_fd(tempfile_fd) };

0 commit comments

Comments
 (0)