mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 17:28:12 +08:00
Delete the orphaned graphic accessor, introspection helper, and fn type macro
This commit is contained in:
@@ -985,20 +985,6 @@ mod test {
|
|||||||
element
|
element
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Grab all of the values of the input every time it occurs in the graph.
|
|
||||||
pub fn grab_all_input<'a, Input: NodeInputDecleration + 'a>(&'a self, runtime: &'a NodeRuntime) -> impl Iterator<Item = Input::Result> + 'a
|
|
||||||
where
|
|
||||||
Input::Result: Send + Sync + Clone + 'static,
|
|
||||||
{
|
|
||||||
self.protonodes_by_name
|
|
||||||
.get(&Input::identifier())
|
|
||||||
.map_or([].as_slice(), |x| x.as_slice())
|
|
||||||
.iter()
|
|
||||||
.filter_map(|inputs| inputs.get(Input::INDEX))
|
|
||||||
.filter_map(|input_monitor_node| runtime.executor.introspect(input_monitor_node).ok())
|
|
||||||
.filter_map(Instrumented::downcast::<Input>) // Some might not resolve (e.g. generics that don't work properly)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Grab all of the values of a LEVELED input, which introspects as its
|
/// Grab all of the values of a LEVELED input, which introspects as its
|
||||||
/// whole legacy list rather than as one element. `T` is the introspected
|
/// whole legacy list rather than as one element. `T` is the introspected
|
||||||
/// element type, which differs from the declared one where a conversion
|
/// element type, which differs from the declared one where a conversion
|
||||||
|
|||||||
@@ -69,18 +69,6 @@ macro_rules! future {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! fn_type {
|
|
||||||
($type:ty) => {
|
|
||||||
$crate::Type::Fn(Box::new(concrete!(())), Box::new(concrete!($type)))
|
|
||||||
};
|
|
||||||
($in_type:ty, $type:ty, alias: $outname:ty) => {
|
|
||||||
$crate::Type::Fn(Box::new(concrete!($in_type)), Box::new(concrete!($type, $outname)))
|
|
||||||
};
|
|
||||||
($in_type:ty, $type:ty) => {
|
|
||||||
$crate::Type::Fn(Box::new(concrete!($in_type)), Box::new(concrete!($type)))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! fn_type_fut {
|
macro_rules! fn_type_fut {
|
||||||
($type:ty) => {
|
($type:ty) => {
|
||||||
|
|||||||
@@ -584,13 +584,6 @@ impl<'e> Graphic<'e> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn as_vector_mut(&mut self) -> Option<&mut Vector> {
|
|
||||||
match self {
|
|
||||||
Graphic::Vector(vector) => Some(vector),
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn as_raster(&self) -> Option<&Raster<CPU>> {
|
pub fn as_raster(&self) -> Option<&Raster<CPU>> {
|
||||||
match self {
|
match self {
|
||||||
Graphic::RasterCPU(raster) => Some(raster),
|
Graphic::RasterCPU(raster) => Some(raster),
|
||||||
|
|||||||
Reference in New Issue
Block a user