Owned pixel buffer for no-copy presentation
This is based on the API that will be used for no-copy presentation. But wraps it in `set_buffer`. This also fixes the Wayland buffer code to set `self.width` and `self.height` on resize, and set the length of the shared memory file when the buffer is created. Co-authored-by: jtnunley <jtnunley01@gmail.com>
This commit is contained in:
parent
e5d546ff9e
commit
a09e4cf679
19 changed files with 1176 additions and 438 deletions
|
|
@ -14,7 +14,7 @@ rust-version = "1.64.0"
|
|||
|
||||
[features]
|
||||
default = ["x11", "wayland", "wayland-dlopen"]
|
||||
wayland = ["wayland-backend", "wayland-client", "nix", "fastrand"]
|
||||
wayland = ["wayland-backend", "wayland-client", "memmap2", "nix", "fastrand"]
|
||||
wayland-dlopen = ["wayland-sys/dlopen"]
|
||||
x11 = ["bytemuck", "nix", "x11rb", "x11-dl"]
|
||||
|
||||
|
|
@ -25,6 +25,7 @@ thiserror = "1.0.30"
|
|||
|
||||
[target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox"))))'.dependencies]
|
||||
bytemuck = { version = "1.12.3", optional = true }
|
||||
memmap2 = { version = "0.5.8", optional = true }
|
||||
nix = { version = "0.26.1", optional = true }
|
||||
wayland-backend = { version = "0.1.0", features = ["client_system"], optional = true }
|
||||
wayland-client = { version = "0.30.0", optional = true }
|
||||
|
|
@ -40,6 +41,7 @@ version = "0.45.0"
|
|||
features = ["Win32_Graphics_Gdi", "Win32_UI_WindowsAndMessaging", "Win32_Foundation"]
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
bytemuck = { version = "1.12.3", features = ["extern_crate_alloc"] }
|
||||
cocoa = "0.24.0"
|
||||
core-graphics = "0.22.3"
|
||||
foreign-types = "0.3.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue