Add input caching to old blur implementation (#1018)
This commit is contained in:
parent
761cec54ef
commit
e6a8d5c573
|
|
@ -7,7 +7,7 @@ use std::collections::HashMap;
|
||||||
use graphene_core::raster::color::Color;
|
use graphene_core::raster::color::Color;
|
||||||
use graphene_core::raster::*;
|
use graphene_core::raster::*;
|
||||||
use graphene_core::structural::Then;
|
use graphene_core::structural::Then;
|
||||||
use graphene_core::value::{ForgetNode, ValueNode};
|
use graphene_core::value::{ClonedNode, ForgetNode, ValueNode};
|
||||||
use graphene_core::{Node, NodeIO, NodeIOTypes};
|
use graphene_core::{Node, NodeIO, NodeIOTypes};
|
||||||
|
|
||||||
use graphene_std::any::{ComposeTypeErased, DowncastBothNode, DowncastBothRefNode, DynAnyNode, IntoTypeErasedNode};
|
use graphene_std::any::{ComposeTypeErased, DowncastBothNode, DowncastBothRefNode, DynAnyNode, IntoTypeErasedNode};
|
||||||
|
|
@ -175,6 +175,9 @@ fn node_registry() -> HashMap<NodeIdentifier, HashMap<NodeIOTypes, NodeConstruct
|
||||||
let image = DowncastBothRefNode::<Image, Image>::new(args[2]);
|
let image = DowncastBothRefNode::<Image, Image>::new(args[2]);
|
||||||
let empty_image: ValueNode<Image> = ValueNode::new(Image::empty());
|
let empty_image: ValueNode<Image> = ValueNode::new(Image::empty());
|
||||||
let empty: TypeNode<_, (), Image> = TypeNode::new(empty_image.then(CloneNode::new()));
|
let empty: TypeNode<_, (), Image> = TypeNode::new(empty_image.then(CloneNode::new()));
|
||||||
|
use graphene_core::Node;
|
||||||
|
let radius = ClonedNode::new(radius.eval(()));
|
||||||
|
let sigma = ClonedNode::new(sigma.eval(()));
|
||||||
|
|
||||||
//let image = &image as &dyn for<'a> Node<'a, (), Output = &'a Image>;
|
//let image = &image as &dyn for<'a> Node<'a, (), Output = &'a Image>;
|
||||||
// dirty hack: we abuse that the cache node will ignore the input if it is evaluated a second time
|
// dirty hack: we abuse that the cache node will ignore the input if it is evaluated a second time
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue