Consolidate and rename Graphene data types, and add many comments (#1620)

* Document ProtoNodeInput

* More comments

* Comment improvements

* Comment and split ProtoNodeInput::NodeLambda from ProtoNodeInput::Node

* Combine NodeImplementation into DocumentNodeImplementation

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
Keavon Chambers 2024-02-20 17:53:04 -08:00 committed by GitHub
parent dc7de4d973
commit a02b162e30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 468 additions and 467 deletions

View file

@ -157,20 +157,20 @@ fn begin_scope() -> DocumentNode {
DocumentNode {
name: "SetNode".to_string(),
manual_composition: Some(concrete!(WasmEditorApi)),
implementation: DocumentNodeImplementation::Unresolved(ProtoNodeIdentifier::new("graphene_core::ops::SomeNode")),
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_core::ops::SomeNode")),
..Default::default()
},
DocumentNode {
name: "LetNode".to_string(),
inputs: vec![NodeInput::node(NodeId(0), 0)],
implementation: DocumentNodeImplementation::Unresolved(ProtoNodeIdentifier::new("graphene_core::memo::LetNode<_>")),
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_core::memo::LetNode<_>")),
..Default::default()
},
DocumentNode {
name: "RefNode".to_string(),
manual_composition: Some(concrete!(WasmEditorApi)),
inputs: vec![NodeInput::lambda(NodeId(1), 0)],
implementation: DocumentNodeImplementation::Unresolved(ProtoNodeIdentifier::new("graphene_core::memo::RefNode<_, _>")),
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_core::memo::RefNode<_, _>")),
..Default::default()
},
]

View file

@ -52,7 +52,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::executor::MapGpuSingleImageNode<_>"
}
},
@ -76,7 +76,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -159,7 +159,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::RenderTextureNode<_, _>"
}
},
@ -185,7 +185,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -298,7 +298,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>"
}
},
@ -361,7 +361,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::HueSaturationNode<_, _, _>"
}
},
@ -412,7 +412,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::CreateGpuSurfaceNode"
}
},
@ -445,7 +445,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -481,7 +481,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -528,7 +528,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::VibranceNode<_>"
}
},
@ -587,7 +587,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::InvertRGBNode"
}
},
@ -656,7 +656,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::LoadResourceNode<_>"
}
},
@ -680,7 +680,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::DecodeImageNode"
}
},
@ -723,7 +723,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -802,7 +802,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::LevelsNode<_, _, _, _, _>"
}
},
@ -878,7 +878,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::transform::TransformNode<_, _, _, _, _>"
}
},
@ -944,7 +944,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::UploadTextureNode<_>"
}
},
@ -970,7 +970,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -1066,7 +1066,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -1297,7 +1297,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},

View file

@ -52,7 +52,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::executor::MapGpuSingleImageNode<_>"
}
},
@ -76,7 +76,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -159,7 +159,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::RenderTextureNode<_, _>"
}
},
@ -185,7 +185,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -298,7 +298,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>"
}
},
@ -361,7 +361,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::HueSaturationNode<_, _, _>"
}
},
@ -412,7 +412,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::CreateGpuSurfaceNode"
}
},
@ -445,7 +445,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -481,7 +481,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -528,7 +528,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::VibranceNode<_>"
}
},
@ -587,7 +587,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::InvertRGBNode"
}
},
@ -656,7 +656,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::LoadResourceNode<_>"
}
},
@ -680,7 +680,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::DecodeImageNode"
}
},
@ -723,7 +723,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -802,7 +802,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::LevelsNode<_, _, _, _, _>"
}
},
@ -878,7 +878,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::transform::TransformNode<_, _, _, _, _>"
}
},
@ -944,7 +944,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::UploadTextureNode<_>"
}
},
@ -970,7 +970,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -1066,7 +1066,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -1297,7 +1297,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},

View file

@ -52,7 +52,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::executor::MapGpuSingleImageNode<_>"
}
},
@ -76,7 +76,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -159,7 +159,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::RenderTextureNode<_, _>"
}
},
@ -185,7 +185,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -298,7 +298,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>"
}
},
@ -361,7 +361,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::HueSaturationNode<_, _, _>"
}
},
@ -412,7 +412,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::CreateGpuSurfaceNode"
}
},
@ -445,7 +445,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -481,7 +481,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -528,7 +528,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::VibranceNode<_>"
}
},
@ -587,7 +587,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::InvertRGBNode"
}
},
@ -656,7 +656,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::LoadResourceNode<_>"
}
},
@ -680,7 +680,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::DecodeImageNode"
}
},
@ -723,7 +723,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -802,7 +802,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::LevelsNode<_, _, _, _, _>"
}
},
@ -878,7 +878,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::transform::TransformNode<_, _, _, _, _>"
}
},
@ -944,7 +944,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::UploadTextureNode<_>"
}
},
@ -970,7 +970,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -1066,7 +1066,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -1297,7 +1297,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},

View file

@ -52,7 +52,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::executor::MapGpuSingleImageNode<_>"
}
},
@ -76,7 +76,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -159,7 +159,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::RenderTextureNode<_, _>"
}
},
@ -185,7 +185,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -298,7 +298,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>"
}
},
@ -361,7 +361,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::HueSaturationNode<_, _, _>"
}
},
@ -412,7 +412,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::CreateGpuSurfaceNode"
}
},
@ -445,7 +445,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -481,7 +481,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -528,7 +528,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::VibranceNode<_>"
}
},
@ -587,7 +587,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::InvertRGBNode"
}
},
@ -656,7 +656,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::LoadResourceNode<_>"
}
},
@ -680,7 +680,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::DecodeImageNode"
}
},
@ -723,7 +723,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -802,7 +802,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::LevelsNode<_, _, _, _, _>"
}
},
@ -878,7 +878,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::transform::TransformNode<_, _, _, _, _>"
}
},
@ -944,7 +944,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::UploadTextureNode<_>"
}
},
@ -970,7 +970,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -1066,7 +1066,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -1297,7 +1297,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},

View file

@ -52,7 +52,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::executor::MapGpuSingleImageNode<_>"
}
},
@ -76,7 +76,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -159,7 +159,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::RenderTextureNode<_, _>"
}
},
@ -185,7 +185,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -298,7 +298,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>"
}
},
@ -361,7 +361,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::HueSaturationNode<_, _, _>"
}
},
@ -412,7 +412,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::CreateGpuSurfaceNode"
}
},
@ -445,7 +445,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -481,7 +481,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -528,7 +528,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::VibranceNode<_>"
}
},
@ -587,7 +587,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::InvertRGBNode"
}
},
@ -656,7 +656,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::LoadResourceNode<_>"
}
},
@ -680,7 +680,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::DecodeImageNode"
}
},
@ -723,7 +723,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -802,7 +802,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::LevelsNode<_, _, _, _, _>"
}
},
@ -878,7 +878,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::transform::TransformNode<_, _, _, _, _>"
}
},
@ -944,7 +944,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::UploadTextureNode<_>"
}
},
@ -970,7 +970,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -1066,7 +1066,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -1297,7 +1297,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},

View file

@ -52,7 +52,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::executor::MapGpuSingleImageNode<_>"
}
},
@ -76,7 +76,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -159,7 +159,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::RenderTextureNode<_, _>"
}
},
@ -185,7 +185,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -298,7 +298,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>"
}
},
@ -361,7 +361,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::HueSaturationNode<_, _, _>"
}
},
@ -412,7 +412,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::CreateGpuSurfaceNode"
}
},
@ -445,7 +445,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -481,7 +481,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -528,7 +528,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::VibranceNode<_>"
}
},
@ -587,7 +587,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::InvertRGBNode"
}
},
@ -656,7 +656,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::LoadResourceNode<_>"
}
},
@ -680,7 +680,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_std::wasm_application_io::DecodeImageNode"
}
},
@ -723,7 +723,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::memo::MemoNode<_, _>"
}
},
@ -802,7 +802,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::raster::LevelsNode<_, _, _, _, _>"
}
},
@ -878,7 +878,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::transform::TransformNode<_, _, _, _, _>"
}
},
@ -944,7 +944,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "gpu_executor::UploadTextureNode<_>"
}
},
@ -970,7 +970,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IntoNode<_, &WgpuExecutor>"
}
},
@ -1066,7 +1066,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},
@ -1297,7 +1297,7 @@
}
],
"implementation": {
"Unresolved": {
"ProtoNode": {
"name": "graphene_core::ops::IdentityNode"
}
},