mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 21:08:18 +00:00
Add input caching to old blur implementation (#1018)
This commit is contained in:
parent
761cec54ef
commit
e6a8d5c573
1 changed files with 4 additions and 1 deletions
|
@ -7,7 +7,7 @@ use std::collections::HashMap;
|
|||
use graphene_core::raster::color::Color;
|
||||
use graphene_core::raster::*;
|
||||
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_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 empty_image: ValueNode<Image> = ValueNode::new(Image::empty());
|
||||
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>;
|
||||
// dirty hack: we abuse that the cache node will ignore the input if it is evaluated a second time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue