Merge pull request #149 from rust-windowing/update-wayland

wayland: Update to wayland-client 0.31
This commit is contained in:
Ian Douglas Scott 2023-09-09 16:42:57 -07:00 committed by GitHub
commit 36618b63eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 9 deletions

View file

@ -33,7 +33,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
rust_version: ['1.64.0', stable, nightly] rust_version: ['1.65.0', stable, nightly]
platform: platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest, } - { target: x86_64-pc-windows-msvc, os: windows-latest, }
- { target: i686-pc-windows-msvc, os: windows-latest, } - { target: i686-pc-windows-msvc, os: windows-latest, }
@ -79,9 +79,13 @@ jobs:
targets: ${{ matrix.platform.target }} targets: ${{ matrix.platform.target }}
components: clippy, rust-src components: clippy, rust-src
- name: Install libwayland
if: (matrix.platform.os == 'ubuntu-latest')
run: sudo apt-get update && sudo apt-get install libwayland-dev
- name: Install GCC Multilib - name: Install GCC Multilib
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686') if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
run: sudo apt-get update && sudo apt-get install gcc-multilib run: sudo apt-get install gcc-multilib
- name: Build crate - name: Build crate
shell: bash shell: bash
@ -94,7 +98,7 @@ jobs:
!contains(matrix.platform.target, 'redox') && !contains(matrix.platform.target, 'redox') &&
!contains(matrix.platform.target, 'freebsd') && !contains(matrix.platform.target, 'freebsd') &&
!contains(matrix.platform.target, 'netbsd') && !contains(matrix.platform.target, 'netbsd') &&
matrix.rust_version != '1.64.0' matrix.rust_version != '1.65.0'
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES
- name: Run tests - name: Run tests

View file

@ -10,7 +10,7 @@ repository = "https://github.com/rust-windowing/softbuffer"
keywords = ["framebuffer", "windowing"] keywords = ["framebuffer", "windowing"]
categories = ["game-development", "graphics", "gui", "multimedia", "rendering"] categories = ["game-development", "graphics", "gui", "multimedia", "rendering"]
exclude = ["examples"] exclude = ["examples"]
rust-version = "1.64.0" rust-version = "1.65.0"
[[bench]] [[bench]]
name = "buffer_mut" name = "buffer_mut"
@ -36,9 +36,9 @@ drm-sys = { version = "0.4.0", default-features = false, optional = true }
memmap2 = { version = "0.7.1", optional = true } memmap2 = { version = "0.7.1", optional = true }
nix = { version = "0.26.1", optional = true } nix = { version = "0.26.1", optional = true }
tiny-xlib = { version = "0.2.1", optional = true } tiny-xlib = { version = "0.2.1", optional = true }
wayland-backend = { version = "0.1.0", features = ["client_system"], optional = true } wayland-backend = { version = "0.3.0", features = ["client_system"], optional = true }
wayland-client = { version = "0.30.0", optional = true } wayland-client = { version = "0.31.0", optional = true }
wayland-sys = "0.30.0" wayland-sys = "0.31.0"
x11rb = { version = "0.12.0", features = ["allow-unsafe-code", "shm"], optional = true } x11rb = { version = "0.12.0", features = ["allow-unsafe-code", "shm"], optional = true }
[target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox", target_os = "linux", target_os = "freebsd"))))'.dependencies] [target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox", target_os = "linux", target_os = "freebsd"))))'.dependencies]

View file

@ -2,7 +2,7 @@ use memmap2::MmapMut;
use std::{ use std::{
ffi::CStr, ffi::CStr,
fs::File, fs::File,
os::unix::prelude::{AsRawFd, FromRawFd}, os::unix::prelude::{AsFd, AsRawFd, FromRawFd},
slice, slice,
sync::{ sync::{
atomic::{AtomicBool, Ordering}, atomic::{AtomicBool, Ordering},
@ -107,7 +107,7 @@ impl WaylandBuffer {
let map = unsafe { map_file(&tempfile) }; let map = unsafe { map_file(&tempfile) };
// Create wayland shm pool and buffer // Create wayland shm pool and buffer
let pool = shm.create_pool(tempfile.as_raw_fd(), pool_size, qh, ()); let pool = shm.create_pool(tempfile.as_fd(), pool_size, qh, ());
let released = Arc::new(AtomicBool::new(true)); let released = Arc::new(AtomicBool::new(true));
let buffer = pool.create_buffer( let buffer = pool.create_buffer(
0, 0,