summaryrefslogtreecommitdiffstats
path: root/glow
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-19 20:01:55 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-19 20:01:55 +0200
commit4aed0fa4b6d63b739b5557ef16f6077988cd2758 (patch)
tree2b773d818e745ee33015f904b8a748c50d7f2cfc /glow
parenta0ac09122a68d9be7d11e5cc765f52cb526ae913 (diff)
downloadiced-4aed0fa4b6d63b739b5557ef16f6077988cd2758.tar.gz
iced-4aed0fa4b6d63b739b5557ef16f6077988cd2758.tar.bz2
iced-4aed0fa4b6d63b739b5557ef16f6077988cd2758.zip
Rename `window::Backend` to `Compositor`
Diffstat (limited to 'glow')
-rw-r--r--glow/src/window.rs4
-rw-r--r--glow/src/window/compositor.rs (renamed from glow/src/window/backend.rs)10
2 files changed, 7 insertions, 7 deletions
diff --git a/glow/src/window.rs b/glow/src/window.rs
index a8edb016..aac5fb9e 100644
--- a/glow/src/window.rs
+++ b/glow/src/window.rs
@@ -1,4 +1,4 @@
//! Display rendering results on windows.
-mod backend;
+mod compositor;
-pub use backend::Backend;
+pub use compositor::Compositor;
diff --git a/glow/src/window/backend.rs b/glow/src/window/compositor.rs
index 34245f35..8f770065 100644
--- a/glow/src/window/backend.rs
+++ b/glow/src/window/compositor.rs
@@ -6,20 +6,20 @@ use raw_window_handle::HasRawWindowHandle;
/// A window graphics backend for iced powered by `glow`.
#[allow(missing_debug_implementations)]
-pub struct Backend {
+pub struct Compositor {
connection: surfman::Connection,
device: surfman::Device,
gl_context: surfman::Context,
gl: Option<glow::Context>,
}
-impl iced_native::window::Backend for Backend {
+impl iced_native::window::Compositor for Compositor {
type Settings = Settings;
type Renderer = Renderer;
type Surface = ();
type SwapChain = Viewport;
- fn new(settings: Self::Settings) -> Backend {
+ fn new(_settings: Self::Settings) -> Self {
let connection = surfman::Connection::new().expect("Create connection");
let adapter = connection
@@ -40,7 +40,7 @@ impl iced_native::window::Backend for Backend {
.create_context(&context_descriptor)
.expect("Create context");
- Backend {
+ Self {
connection,
device,
gl_context,
@@ -179,7 +179,7 @@ impl iced_native::window::Backend for Backend {
}
}
-impl Drop for Backend {
+impl Drop for Compositor {
fn drop(&mut self) {
self.device
.destroy_context(&mut self.gl_context)