summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-19 14:23:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-19 14:23:28 +0200
commitd4743183d40c6044ce6fa39e2a52919a32912cda (patch)
treed2dec81cd9b419262cf2aa57ad793895ccacb320 /winit
parent33448508a524db6447b380cc236be6f0d5ca8a86 (diff)
downloadiced-d4743183d40c6044ce6fa39e2a52919a32912cda.tar.gz
iced-d4743183d40c6044ce6fa39e2a52919a32912cda.tar.bz2
iced-d4743183d40c6044ce6fa39e2a52919a32912cda.zip
Draft first working version of `iced_glow` :tada:
Diffstat (limited to 'winit')
-rw-r--r--winit/src/application.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index f6bc8fcc..4bc36586 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -78,7 +78,11 @@ pub trait Application: Sized {
/// [`update`](#tymethod.update).
///
/// A `Subscription` will be kept alive as long as you keep returning it!
- fn subscription(&self) -> Subscription<Self::Message>;
+ ///
+ /// By default, it returns an empty subscription.
+ fn subscription(&self) -> Subscription<Self::Message> {
+ Subscription::none()
+ }
/// Returns the widgets to display in the [`Application`].
///
@@ -177,9 +181,10 @@ pub trait Application: Sized {
let mut resized = false;
let clipboard = Clipboard::new(&window);
- let (mut backend, mut renderer) = Self::Backend::new(backend_settings);
+ let mut backend = Self::Backend::new(backend_settings.clone());
let surface = backend.create_surface(&window);
+ let mut renderer = backend.create_renderer(backend_settings);
let mut swap_chain = {
let physical_size = size.physical();