summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Wyatt Herkamp <wherkamp@kingtux.me>2022-10-07 09:03:41 -0400
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-01 19:20:23 +0100
commit0a12590b6f500394194ccd7588af8c6729426d71 (patch)
treef22e03c0033e06c930e5162a92b07904576f25f9
parentac6a3cf8eb77df69cbb6538900786faca778cf05 (diff)
downloadiced-0a12590b6f500394194ccd7588af8c6729426d71.tar.gz
iced-0a12590b6f500394194ccd7588af8c6729426d71.tar.bz2
iced-0a12590b6f500394194ccd7588af8c6729426d71.zip
Update `wgpu` to `0.14` and `wgpu_glyph` to `0.18`
-rw-r--r--examples/integration_wgpu/src/main.rs3
-rw-r--r--graphics/Cargo.toml2
-rw-r--r--graphics/src/window/compositor.rs6
-rw-r--r--wgpu/Cargo.toml6
-rw-r--r--wgpu/src/window/compositor.rs10
5 files changed, 16 insertions, 11 deletions
diff --git a/examples/integration_wgpu/src/main.rs b/examples/integration_wgpu/src/main.rs
index 69d46c3e..ed03f77a 100644
--- a/examples/integration_wgpu/src/main.rs
+++ b/examples/integration_wgpu/src/main.rs
@@ -16,6 +16,7 @@ use winit::{
event_loop::{ControlFlow, EventLoop},
};
+use crate::wgpu::CompositeAlphaMode;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::JsCast;
#[cfg(target_arch = "wasm32")]
@@ -119,6 +120,7 @@ pub fn main() {
width: physical_size.width,
height: physical_size.height,
present_mode: wgpu::PresentMode::AutoVsync,
+ alpha_mode: CompositeAlphaMode::Auto,
},
);
@@ -213,6 +215,7 @@ pub fn main() {
width: size.width,
height: size.height,
present_mode: wgpu::PresentMode::AutoVsync,
+ alpha_mode: CompositeAlphaMode::Auto
},
);
diff --git a/graphics/Cargo.toml b/graphics/Cargo.toml
index 49d4d9c6..18fef54f 100644
--- a/graphics/Cargo.toml
+++ b/graphics/Cargo.toml
@@ -20,7 +20,7 @@ opengl = []
[dependencies]
glam = "0.10"
-raw-window-handle = "0.4"
+raw-window-handle = "0.5"
thiserror = "1.0"
[dependencies.bytemuck]
diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs
index 0c4cadcd..52255666 100644
--- a/graphics/src/window/compositor.rs
+++ b/graphics/src/window/compositor.rs
@@ -2,7 +2,7 @@
//! surfaces.
use crate::{Color, Error, Viewport};
-use raw_window_handle::HasRawWindowHandle;
+use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
use thiserror::Error;
/// A graphics compositor that can draw to windows.
@@ -17,7 +17,7 @@ pub trait Compositor: Sized {
type Surface;
/// Creates a new [`Compositor`].
- fn new<W: HasRawWindowHandle>(
+ fn new<W: HasRawWindowHandle + HasRawDisplayHandle>(
settings: Self::Settings,
compatible_window: Option<&W>,
) -> Result<(Self, Self::Renderer), Error>;
@@ -25,7 +25,7 @@ pub trait Compositor: Sized {
/// Crates a new [`Surface`] for the given window.
///
/// [`Surface`]: Self::Surface
- fn create_surface<W: HasRawWindowHandle>(
+ fn create_surface<W: HasRawWindowHandle + HasRawDisplayHandle>(
&mut self,
window: &W,
) -> Self::Surface;
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<Theme> Compositor<Theme> {
/// Requests a new [`Compositor`] with the given [`Settings`].
///
/// Returns `None` if no compatible graphics adapter could be found.
- pub async fn request<W: HasRawWindowHandle>(
+ pub async fn request<W: HasRawWindowHandle + HasRawDisplayHandle>(
settings: Settings,
compatible_window: Option<&W>,
) -> Option<Self> {
@@ -123,7 +124,7 @@ impl<Theme> iced_graphics::window::Compositor for Compositor<Theme> {
type Renderer = Renderer<Theme>;
type Surface = wgpu::Surface;
- fn new<W: HasRawWindowHandle>(
+ fn new<W: HasRawWindowHandle + HasRawDisplayHandle>(
settings: Self::Settings,
compatible_window: Option<&W>,
) -> Result<(Self, Self::Renderer), Error> {
@@ -138,7 +139,7 @@ impl<Theme> iced_graphics::window::Compositor for Compositor<Theme> {
Ok((compositor, Renderer::new(backend)))
}
- fn create_surface<W: HasRawWindowHandle>(
+ fn create_surface<W: HasRawWindowHandle + HasRawDisplayHandle>(
&mut self,
window: &W,
) -> wgpu::Surface {
@@ -162,6 +163,7 @@ impl<Theme> iced_graphics::window::Compositor for Compositor<Theme> {
present_mode: self.settings.present_mode,
width,
height,
+ alpha_mode: CompositeAlphaMode::Auto,
},
);
}