Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
chore(rendering-skia): update gradient layer and tests for new fields
Richie McIlroyb7f3cac2e2d8
diff --git a/crates/rendering-skia/src/bin/test_background.rs b/crates/rendering-skia/src/bin/test_background.rsindex 8ed54cfba..f6e4ecc65 100644--- a/crates/rendering-skia/src/bin/test_background.rs+++ b/crates/rendering-skia/src/bin/test_background.rs@@ -136,6 +136,10 @@ fn test_gradient_background(from: [65535, 0, 0], // Redto: [0, 0, 65535], // Blueangle: 45,+ noise_intensity: None,+ noise_scale: None,+ animated: None,+ animation_speed: None,},border: None,};@@ -201,6 +205,10 @@ fn test_gradient_angles(from: [65535, 32768, 0], // Orangeto: [32768, 0, 65535], // Purpleangle,+ noise_intensity: None,+ noise_scale: None,+ animated: None,+ animation_speed: None,},border: None,};@@ -266,6 +274,10 @@ fn test_caching(from: [0, 65535, 0],to: [0, 0, 65535],angle: 90,+ noise_intensity: None,+ noise_scale: None,+ animated: None,+ animation_speed: None,},border: None,};@@ -312,6 +324,10 @@ fn test_caching(from: [65535, 0, 0],to: [65535, 65535, 0],angle: 45,+ noise_intensity: None,+ noise_scale: None,+ animated: None,+ animation_speed: None,},border: None,};diff --git a/crates/rendering-skia/src/layers/background.rs b/crates/rendering-skia/src/layers/background.rsindex bd603ca1d..90fd81b09 100644--- a/crates/rendering-skia/src/layers/background.rs+++ b/crates/rendering-skia/src/layers/background.rs@@ -27,9 +27,9 @@ impl From<BackgroundSource> for Background {fn from(source: BackgroundSource) -> Self {match source {BackgroundSource::Color { value, .. } => Background::Color(value),- BackgroundSource::Gradient { from, to, angle } => {- Background::Gradient { from, to, angle }- }+ BackgroundSource::Gradient {+ from, to, angle, ..+ } => Background::Gradient { from, to, angle },BackgroundSource::Image { path } => {if let Some(path) = path {Background::Image {@@ -344,6 +344,10 @@ mod tests {from: [65535, 0, 0],to: [0, 0, 65535],angle: 45,+ noise_intensity: None,+ noise_scale: None,+ animated: None,+ animation_speed: None,};let gradient_bg = Background::from(gradient_source);assert!(matches!(