Fix the Draw Canvas internal node and make it run automatically
Also investigate why, even when rendering Vello, we don't have fast raster drawing like we used to.
The general idea behind the Draw Canvas node is this: right now, we render to an SVG string that gets stuffed into the DOM. SVG has a <foreignObject><foreignObject> tag that lets you stuff HTML into SVG. The Draw Canvas node, I believe, tells our SVG renderer (string generator) to instead create a <foreignObject><canvas /><foreignObject> so we have a canvas to draw to, instead of producing a <image src="..." /> with a base64 PNG (which is super slow because of compressed PNG encoding, base64 encoding, transfer to DOM, insertion into DOM, and decoding and rendering by the browser). In some way I'm not familiar with, this node also runs the necessary JS to target and draw to that <canvas /> element.
This node also had to be inserted manually, back when it worked. We need this to be done automatically so the user doesn't have to think about it. But only when rendering to the viewport, not when rendering to produce an SVG for export as a file. That, specifically, is controlled by the RenderParams struct's for_export field: https://github.com/GraphiteEditor/Graphite/blob/master/node-graph/gcore/src/graphic_element/renderer.rs#L228
I'm still of the opinion that perhaps the renderer should be in charge of generating and writing to the <canvas /> instead of that being the responsibility of the Render Canvas node, though. But @TrueDoctor seemed to strongly prefer this route, despite it requiring a lot of infrastructure that we have so far lacked. I'd still encourage us to explore the option of simply making this a part of the renderer, though.
@0HyperCube we may discuss this in a call and I'd be happy to clear up and form consensus with your concerns, but that is better done privately than in the venue of closing an issue under ongoing development by one of our active GSoC contributors, whom I must imagine is confused seeing this closed without prior discussion. I encourage you to still assist with issue triage/management but we need to make sure we're on the same page and in agreement before closing issues in order to run a smooth ship. Thank you.
Made obsolete by #2903.