@@ -5,8 +5,7 @@ use graph_craft::document::value::{RenderOutput, TaggedValue};
55use graph_craft:: document:: { DocumentNode , DocumentNodeImplementation , NodeId , NodeInput } ;
66use graph_craft:: proto:: GraphErrors ;
77use graph_craft:: wasm_application_io:: EditorPreferences ;
8- use graphene_std:: application_io:: { NodeGraphUpdateMessage , RenderConfig } ;
9- use graphene_std:: application_io:: { SurfaceFrame , TimingInformation } ;
8+ use graphene_std:: application_io:: { NodeGraphUpdateMessage , RenderConfig , TimingInformation } ;
109use graphene_std:: raster:: { CPU , Raster } ;
1110use graphene_std:: renderer:: { RenderMetadata , format_transform_matrix} ;
1211use graphene_std:: text:: FontCache ;
@@ -56,7 +55,6 @@ pub struct NodeGraphExecutor {
5655 futures : VecDeque < ( u64 , ExecutionContext ) > ,
5756 node_graph_hash : u64 ,
5857 previous_node_to_inspect : Option < NodeId > ,
59- last_svg_canvas : Option < SurfaceFrame > ,
6058}
6159
6260#[ derive( Debug , Clone ) ]
@@ -79,7 +77,6 @@ impl NodeGraphExecutor {
7977 node_graph_hash : 0 ,
8078 current_execution_id : 0 ,
8179 previous_node_to_inspect : None ,
82- last_svg_canvas : None ,
8380 } ;
8481 ( node_runtime, node_executor)
8582 }
@@ -384,19 +381,14 @@ impl NodeGraphExecutor {
384381 // Send to frontend
385382 responses. add ( FrontendMessage :: UpdateImageData { image_data } ) ;
386383 responses. add ( FrontendMessage :: UpdateDocumentArtwork { svg } ) ;
387- self . last_svg_canvas = None ;
388384 }
389- RenderOutputType :: CanvasFrame ( frame) => ' block: {
390- if self . last_svg_canvas == Some ( frame) {
391- break ' block;
392- }
385+ RenderOutputType :: CanvasFrame ( frame) => {
393386 let matrix = format_transform_matrix ( frame. transform ) ;
394387 let transform = if matrix. is_empty ( ) { String :: new ( ) } else { format ! ( " transform=\" {matrix}\" " ) } ;
395388 let svg = format ! (
396389 r#"<svg><foreignObject width="{}" height="{}"{transform}><div data-canvas-placeholder="{}" data-is-viewport="true"></div></foreignObject></svg>"# ,
397390 frame. resolution. x, frame. resolution. y, frame. surface_id. 0 ,
398391 ) ;
399- self . last_svg_canvas = Some ( frame) ;
400392 responses. add ( FrontendMessage :: UpdateDocumentArtwork { svg } ) ;
401393 }
402394 RenderOutputType :: Texture { .. } => { }
0 commit comments