-void DiffusionEffect::add_self_to_effect_chain(EffectChain *chain, const std::vector<Effect *> &inputs) {
- assert(inputs.size() == 1);
- blur->add_self_to_effect_chain(chain, inputs);
+ Node *blur_node = graph->add_node(blur);
+ Node *overlay_matte_node = graph->add_node(overlay_matte);
+ graph->replace_receiver(self, overlay_matte_node);
+ graph->connect_nodes(input, blur_node);
+ graph->connect_nodes(blur_node, overlay_matte_node);
+ graph->replace_sender(self, overlay_matte_node);