From 0a12590b6f500394194ccd7588af8c6729426d71 Mon Sep 17 00:00:00 2001 From: Wyatt Herkamp Date: Fri, 7 Oct 2022 09:03:41 -0400 Subject: Update `wgpu` to `0.14` and `wgpu_glyph` to `0.18` --- wgpu/Cargo.toml | 6 +++--- wgpu/src/window/compositor.rs | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'wgpu') diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 586f97d3..92ebdcd0 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -28,10 +28,10 @@ spirv = ["wgpu/spirv"] webgl = ["wgpu/webgl"] [dependencies] -wgpu = "0.13" -wgpu_glyph = "0.17" +wgpu = "0.14" +wgpu_glyph = "0.18" glyph_brush = "0.7" -raw-window-handle = "0.4" +raw-window-handle = "0.5.0" log = "0.4" guillotiere = "0.6" futures = "0.3" diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index a36d2a87..c34fa735 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -4,9 +4,10 @@ use futures::stream::{self, StreamExt}; use iced_graphics::compositor; use iced_native::futures; -use raw_window_handle::HasRawWindowHandle; +use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle}; use std::marker::PhantomData; +use wgpu::CompositeAlphaMode; /// A window graphics backend for iced powered by `wgpu`. #[allow(missing_debug_implementations)] @@ -27,7 +28,7 @@ impl Compositor { /// Requests a new [`Compositor`] with the given [`Settings`]. /// /// Returns `None` if no compatible graphics adapter could be found. - pub async fn request( + pub async fn request( settings: Settings, compatible_window: Option<&W>, ) -> Option { @@ -123,7 +124,7 @@ impl iced_graphics::window::Compositor for Compositor { type Renderer = Renderer; type Surface = wgpu::Surface; - fn new( + fn new( settings: Self::Settings, compatible_window: Option<&W>, ) -> Result<(Self, Self::Renderer), Error> { @@ -138,7 +139,7 @@ impl iced_graphics::window::Compositor for Compositor { Ok((compositor, Renderer::new(backend))) } - fn create_surface( + fn create_surface( &mut self, window: &W, ) -> wgpu::Surface { @@ -162,6 +163,7 @@ impl iced_graphics::window::Compositor for Compositor { present_mode: self.settings.present_mode, width, height, + alpha_mode: CompositeAlphaMode::Auto, }, ); } -- cgit From bea5882c58edac0bd5300d53b31ee4ac295bda25 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 1 Nov 2022 19:17:08 +0100 Subject: Remove inconsistent `wgpu` imports --- wgpu/src/window/compositor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'wgpu') diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index c34fa735..6d0c36f6 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -7,7 +7,6 @@ use iced_native::futures; use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle}; use std::marker::PhantomData; -use wgpu::CompositeAlphaMode; /// A window graphics backend for iced powered by `wgpu`. #[allow(missing_debug_implementations)] @@ -163,7 +162,7 @@ impl iced_graphics::window::Compositor for Compositor { present_mode: self.settings.present_mode, width, height, - alpha_mode: CompositeAlphaMode::Auto, + alpha_mode: wgpu::CompositeAlphaMode::Auto, }, ); } -- cgit From 8f6af6bbfc7a14e9dc71b20ccb9045597bbccbad Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 1 Nov 2022 19:18:47 +0100 Subject: Fix inconsistent version format for `raw-window-handle` dependency --- wgpu/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wgpu') diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 92ebdcd0..55eec73f 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -31,7 +31,7 @@ webgl = ["wgpu/webgl"] wgpu = "0.14" wgpu_glyph = "0.18" glyph_brush = "0.7" -raw-window-handle = "0.5.0" +raw-window-handle = "0.5" log = "0.4" guillotiere = "0.6" futures = "0.3" -- cgit