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/src/window/compositor.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'wgpu/src/window') 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