diff options
author | 2020-04-19 21:55:23 +0200 | |
---|---|---|
committer | 2020-04-19 21:55:23 +0200 | |
commit | 592cc685067c36cbba87e4db14f4ebc71d65b951 (patch) | |
tree | fec66717a6558ddfa31a90352724be13e6a2dfd9 /wgpu/src/widget/canvas/layer.rs | |
parent | bb424e54c5083402225a0fdda6130de575592dca (diff) | |
download | iced-592cc685067c36cbba87e4db14f4ebc71d65b951.tar.gz iced-592cc685067c36cbba87e4db14f4ebc71d65b951.tar.bz2 iced-592cc685067c36cbba87e4db14f4ebc71d65b951.zip |
Remove `Layer` trait and simplify `Canvas`
Diffstat (limited to 'wgpu/src/widget/canvas/layer.rs')
-rw-r--r-- | wgpu/src/widget/canvas/layer.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/wgpu/src/widget/canvas/layer.rs b/wgpu/src/widget/canvas/layer.rs deleted file mode 100644 index a46b7fb1..00000000 --- a/wgpu/src/widget/canvas/layer.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! Produce, store, and reuse geometry. -mod cache; - -pub use cache::Cache; - -use crate::Primitive; -use iced_native::Size; - -use std::sync::Arc; - -/// A layer that can be presented at a [`Canvas`]. -/// -/// [`Canvas`]: ../struct.Canvas.html -pub trait Layer: std::fmt::Debug { - /// Draws the [`Layer`] in the given bounds and produces a [`Primitive`] as - /// a result. - /// - /// The [`Layer`] may choose to store the produced [`Primitive`] locally and - /// only recompute it when the bounds change, its contents change, or is - /// otherwise explicitly cleared by other means. - /// - /// [`Layer`]: trait.Layer.html - /// [`Primitive`]: ../../../enum.Primitive.html - fn draw(&self, bounds: Size) -> Arc<Primitive>; -} |