HACK: patch out NaN paths
Signed-off-by: Nico Burns <nico@nicoburns.com>
diff --git a/sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs b/sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs
index dfa97e9..87f14cb 100644
--- a/sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs
+++ b/sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs
@@ -12,6 +12,7 @@
use alloc::sync::Arc;
use alloc::vec;
use alloc::vec::Vec;
+use vello_common::kurbo::Shape;
use core::fmt::{Debug, Formatter};
use crossbeam_channel::TryRecvError;
use rayon::{ThreadPool, ThreadPoolBuilder};
@@ -578,6 +579,12 @@
result_sender.send(task_idx, coarse_command).unwrap();
};
+ let path = if path.is_nan() {
+ crate::kurbo::Rect::new(0.0, 0.0, 1.0, 1.0).into_path(0.1)
+ } else {
+ path
+ };
+
self.strip_generator
.generate_filled_path(&path, fill_rule, transform, func);
}