Redesign iced_wgpu layering architecture
This commit is contained in:
parent
99a904112c
commit
b05e61f5c8
36 changed files with 2781 additions and 2048 deletions
|
|
@ -3,8 +3,7 @@ pub mod pipeline;
|
|||
|
||||
pub use pipeline::Pipeline;
|
||||
|
||||
use crate::core::Rectangle;
|
||||
use crate::graphics::{Damage, Mesh};
|
||||
use crate::graphics::Mesh;
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
||||
|
|
@ -19,20 +18,3 @@ pub enum Custom {
|
|||
/// A custom pipeline primitive.
|
||||
Pipeline(Pipeline),
|
||||
}
|
||||
|
||||
impl Damage for Custom {
|
||||
fn bounds(&self) -> Rectangle {
|
||||
match self {
|
||||
Self::Mesh(mesh) => mesh.bounds(),
|
||||
Self::Pipeline(pipeline) => pipeline.bounds,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<Mesh> for Custom {
|
||||
type Error = &'static str;
|
||||
|
||||
fn try_from(mesh: Mesh) -> Result<Self, Self::Error> {
|
||||
Ok(Custom::Mesh(mesh))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue