diff options
author | 2020-09-09 14:47:36 +0200 | |
---|---|---|
committer | 2020-09-09 14:47:36 +0200 | |
commit | 0724fb8ebf7c60b396843d021b949cc9061b4c3e (patch) | |
tree | e538d3b83d399acccf62577f4eebc459d44b5ef8 /graphics/src/window | |
parent | 5bfa4805a944abe82700287f0af0117462d6d21c (diff) | |
parent | 49076c6ac2983e2076dae64f68a2e801904d7ce9 (diff) | |
download | iced-0724fb8ebf7c60b396843d021b949cc9061b4c3e.tar.gz iced-0724fb8ebf7c60b396843d021b949cc9061b4c3e.tar.bz2 iced-0724fb8ebf7c60b396843d021b949cc9061b4c3e.zip |
Merge branch 'master' from upstream into embedded
Diffstat (limited to 'graphics/src/window')
-rw-r--r-- | graphics/src/window/compositor.rs | 4 | ||||
-rw-r--r-- | graphics/src/window/gl_compositor.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs index aa625f43..7674f227 100644 --- a/graphics/src/window/compositor.rs +++ b/graphics/src/window/compositor.rs @@ -1,4 +1,4 @@ -use crate::{Color, Viewport}; +use crate::{Color, Error, Viewport}; use iced_native::mouse; use raw_window_handle::HasRawWindowHandle; @@ -19,7 +19,7 @@ pub trait Compositor: Sized { /// Creates a new [`Backend`]. /// /// [`Backend`]: trait.Backend.html - fn new(settings: Self::Settings) -> (Self, Self::Renderer); + fn new(settings: Self::Settings) -> Result<(Self, Self::Renderer), Error>; /// Crates a new [`Surface`] for the given window. /// diff --git a/graphics/src/window/gl_compositor.rs b/graphics/src/window/gl_compositor.rs index 2ba39d6e..1f37642e 100644 --- a/graphics/src/window/gl_compositor.rs +++ b/graphics/src/window/gl_compositor.rs @@ -1,4 +1,4 @@ -use crate::{Color, Size, Viewport}; +use crate::{Color, Error, Size, Viewport}; use iced_native::mouse; use core::ffi::c_void; @@ -41,7 +41,7 @@ pub trait GLCompositor: Sized { unsafe fn new( settings: Self::Settings, loader_function: impl FnMut(&str) -> *const c_void, - ) -> (Self, Self::Renderer); + ) -> Result<(Self, Self::Renderer), Error>; /// Returns the amount of samples that should be used when configuring /// an OpenGL context for this [`Compositor`]. |