From a3734da9daa6dee434d0147a13656cfb9d69a419 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Wed, 5 Dec 2018 09:31:51 +0100 Subject: [PATCH] gbm: update to gbm 0.5 --- Cargo.toml | 2 +- src/backend/drm/gbm/egl.rs | 2 +- src/backend/drm/gbm/surface.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2eb11b9..da4bdb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ libloading = "0.4.0" wayland-client = { version = "0.21.1", features = ["egl"], optional = true } winit = { version = "0.18.0", optional = true } drm = { version = "^0.3.4", optional = true } -gbm = { version = "^0.4.0", optional = true, default-features = false, features = ["drm-support"] } +gbm = { version = "^0.5.0", optional = true, default-features = false, features = ["drm-support"] } glium = { version = "0.19.0", optional = true, default-features = false } input = { version = "0.4.1", optional = true } udev = { version = "0.2.0", optional = true } diff --git a/src/backend/drm/gbm/egl.rs b/src/backend/drm/gbm/egl.rs index 6fdd0ff..cf9268b 100644 --- a/src/backend/drm/gbm/egl.rs +++ b/src/backend/drm/gbm/egl.rs @@ -88,6 +88,6 @@ unsafe impl NativeSurface for GbmSurface { } fn swap_buffers(&self) -> ::std::result::Result<(), SwapBuffersError> { - self.page_flip() + unsafe { self.page_flip() } } } diff --git a/src/backend/drm/gbm/surface.rs b/src/backend/drm/gbm/surface.rs index 9bcf2b9..c6b578c 100644 --- a/src/backend/drm/gbm/surface.rs +++ b/src/backend/drm/gbm/surface.rs @@ -35,7 +35,7 @@ impl GbmSurfaceInternal { // drop and release the old buffer } - pub fn page_flip(&self) -> ::std::result::Result<(), SwapBuffersError> { + pub unsafe fn page_flip(&self) -> ::std::result::Result<(), SwapBuffersError> { let res = { let nb = self.next_buffer.take(); let res = nb.is_some(); @@ -287,7 +287,7 @@ impl GbmSurface { /// *Note*: This might trigger a full modeset on the underlying device, /// potentially causing some flickering. In that case this operation is /// blocking until the crtc is in the desired state. - pub fn page_flip(&self) -> ::std::result::Result<(), SwapBuffersError> { + pub unsafe fn page_flip(&self) -> ::std::result::Result<(), SwapBuffersError> { self.0.page_flip() }