Merge branch 'master' into fear/linear-gradients
This commit is contained in:
commit
921c94162e
26 changed files with 802 additions and 65 deletions
|
|
@ -4,7 +4,7 @@ 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;
|
||||
|
||||
|
|
@ -27,7 +27,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 +123,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 +138,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 +162,7 @@ impl<Theme> iced_graphics::window::Compositor for Compositor<Theme> {
|
|||
present_mode: self.settings.present_mode,
|
||||
width,
|
||||
height,
|
||||
alpha_mode: wgpu::CompositeAlphaMode::Auto,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue