summaryrefslogtreecommitdiffstats
path: root/wgpu
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 /wgpu
parenta0ac09122a68d9be7d11e5cc765f52cb526ae913 (diff)
downloadiced-4aed0fa4b6d63b739b5557ef16f6077988cd2758.tar.gz
iced-4aed0fa4b6d63b739b5557ef16f6077988cd2758.tar.bz2
iced-4aed0fa4b6d63b739b5557ef16f6077988cd2758.zip
Rename `window::Backend` to `Compositor`
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/window.rs4
-rw-r--r--wgpu/src/window/compositor.rs (renamed from wgpu/src/window/backend.rs)8
2 files changed, 6 insertions, 6 deletions
diff --git a/wgpu/src/window.rs b/wgpu/src/window.rs
index b7adad82..391d3e36 100644
--- a/wgpu/src/window.rs
+++ b/wgpu/src/window.rs
@@ -1,6 +1,6 @@
//! Display rendering results on windows.
-mod backend;
+mod compositor;
mod swap_chain;
-pub use backend::Backend;
+pub use compositor::Compositor;
pub use swap_chain::SwapChain;
diff --git a/wgpu/src/window/backend.rs b/wgpu/src/window/compositor.rs
index 92e81cd9..8950ffd4 100644
--- a/wgpu/src/window/backend.rs
+++ b/wgpu/src/window/compositor.rs
@@ -5,19 +5,19 @@ use raw_window_handle::HasRawWindowHandle;
/// A window graphics backend for iced powered by `wgpu`.
#[derive(Debug)]
-pub struct Backend {
+pub struct Compositor {
device: wgpu::Device,
queue: wgpu::Queue,
format: wgpu::TextureFormat,
}
-impl iced_native::window::Backend for Backend {
+impl iced_native::window::Compositor for Compositor {
type Settings = Settings;
type Renderer = Renderer;
type Surface = wgpu::Surface;
type SwapChain = SwapChain;
- fn new(settings: Self::Settings) -> Backend {
+ fn new(settings: Self::Settings) -> Self {
let (device, queue) = futures::executor::block_on(async {
let adapter = wgpu::Adapter::request(
&wgpu::RequestAdapterOptions {
@@ -43,7 +43,7 @@ impl iced_native::window::Backend for Backend {
.await
});
- Backend {
+ Self {
device,
queue,
format: settings.format,