mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +08:00
Instance tables refactor part 6: unwrap VectorData and ImageFrame from single-row to multi-row tables (#2684)
* Start refactoring the boolean operations code * Switch to iterators in the boolean operations code * Make boolean operations work on rows of a table, not Vecs of single-row tables * Remove more .transform() * Simplify brush code * Attempt to remove .transform() by using Instance<Image<Color>> in brush code, but a regression is introduced * Improve blend_image_closure * Simplify * Remove leading underscore from type arguments * Remove .transform() from ImageFrameTable<P> and fix Mask node behavior on stencils not fully overlapping its target image * Remove more .one_instance_ref() * Fully remove .one_instance_ref() and improve the 'Combine Channels' node robustness * Fully remove .once_instance_mut() * Fix tests * Remove .one_empty_image() * Make Instances<T>::default() return an empty table for images, but still not yet vector --------- Co-authored-by: hypercube <0hypercube@gmail.com>
This commit is contained in:
@@ -586,22 +586,22 @@ impl<'i, N: for<'a> Node<'a, I> + Copy, I: 'i> Copy for TypeNode<N, I, <N as Nod
|
||||
|
||||
// Into
|
||||
pub struct IntoNode<O>(PhantomData<O>);
|
||||
impl<_O> IntoNode<_O> {
|
||||
impl<O> IntoNode<O> {
|
||||
#[cfg(feature = "alloc")]
|
||||
pub const fn new() -> Self {
|
||||
Self(core::marker::PhantomData)
|
||||
}
|
||||
}
|
||||
impl<_O> Default for IntoNode<_O> {
|
||||
impl<O> Default for IntoNode<O> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
impl<'input, I: 'input, _O: 'input> Node<'input, I> for IntoNode<_O>
|
||||
impl<'input, I: 'input, O: 'input> Node<'input, I> for IntoNode<O>
|
||||
where
|
||||
I: Into<_O> + Sync + Send,
|
||||
I: Into<O> + Sync + Send,
|
||||
{
|
||||
type Output = ::dyn_any::DynFuture<'input, _O>;
|
||||
type Output = ::dyn_any::DynFuture<'input, O>;
|
||||
|
||||
#[inline]
|
||||
fn eval(&'input self, input: I) -> Self::Output {
|
||||
|
||||
Reference in New Issue
Block a user