diff options
| author | 2022-11-03 04:33:54 +0100 | |
|---|---|---|
| committer | 2022-11-03 04:33:54 +0100 | |
| commit | 20a0577034b40a6bbabee9bbbfc085f3fd5016c0 (patch) | |
| tree | ff23320c3955226685cd4da64a2a4c7830cdb932 /graphics/src/layer | |
| parent | d53e2624255680448282fb6f767c7eb732a74a9f (diff) | |
| download | iced-20a0577034b40a6bbabee9bbbfc085f3fd5016c0.tar.gz iced-20a0577034b40a6bbabee9bbbfc085f3fd5016c0.tar.bz2 iced-20a0577034b40a6bbabee9bbbfc085f3fd5016c0.zip  | |
Reuse last buffer in `Frame` if `mesh_style` matches
Diffstat (limited to 'graphics/src/layer')
| -rw-r--r-- | graphics/src/layer/mesh.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/src/layer/mesh.rs b/graphics/src/layer/mesh.rs index 0946317e..a2232a1f 100644 --- a/graphics/src/layer/mesh.rs +++ b/graphics/src/layer/mesh.rs @@ -1,7 +1,7 @@  //! A collection of triangle primitives. -use crate::{Color, Point, Rectangle, triangle};  use crate::gradient::Gradient; +use crate::{triangle, Color, Point, Rectangle};  /// A mesh of triangles.  #[derive(Debug, Clone, Copy)] @@ -19,16 +19,16 @@ pub struct Mesh<'a> {      pub style: &'a Style,  } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)]  /// Supported shaders for primitives.  pub enum Style {      /// Fill a primitive with a solid color.      Solid(Color),      /// Fill a primitive with an interpolated color. -    Gradient(Gradient) +    Gradient(Gradient),  } -impl <'a> Into<Style> for Gradient { +impl<'a> Into<Style> for Gradient {      fn into(self) -> Style {          match self {              Gradient::Linear(linear) => {  | 
