summaryrefslogtreecommitdiffstats
path: root/graphics/src/gradient.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-06-29 08:09:45 +0200
committerLibravatar GitHub <noreply@github.com>2023-06-29 08:09:45 +0200
commitc6b583113da7c9d9ceaeb5a3bf676ae62d8931e1 (patch)
treeed833fab41f64c57a7522fea400ea42eec788e9f /graphics/src/gradient.rs
parent8d65e40a1174ecb8225ce9973575bced36e7aeb5 (diff)
parent6921564c9f66e8103e19ec658099c5f5c32e8cc5 (diff)
downloadiced-c6b583113da7c9d9ceaeb5a3bf676ae62d8931e1.tar.gz
iced-c6b583113da7c9d9ceaeb5a3bf676ae62d8931e1.tar.bz2
iced-c6b583113da7c9d9ceaeb5a3bf676ae62d8931e1.zip
Merge pull request #1932 from iced-rs/generic-graphics-primitive
Backend-specific primitives
Diffstat (limited to 'graphics/src/gradient.rs')
-rw-r--r--graphics/src/gradient.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs
index 3f5d0509..4db565d8 100644
--- a/graphics/src/gradient.rs
+++ b/graphics/src/gradient.rs
@@ -7,6 +7,7 @@ use crate::color;
use crate::core::gradient::ColorStop;
use crate::core::{self, Color, Point, Rectangle};
+use bytemuck::{Pod, Zeroable};
use half::f16;
use std::cmp::Ordering;
@@ -135,7 +136,7 @@ impl Linear {
}
/// Packed [`Gradient`] data for use in shader code.
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone, PartialEq, Zeroable, Pod)]
#[repr(C)]
pub struct Packed {
// 8 colors, each channel = 16 bit float, 2 colors packed into 1 u32