Instance tables refactor part 7: Remove RasterDataType and add Raster<CPU>/Raster<GPU>

This commit is contained in:
Keavon Chambers
2025-06-19 18:37:13 -07:00
parent 5cacab2e39
commit 6111440afd
34 changed files with 560 additions and 826 deletions
@@ -10,7 +10,7 @@ use graph_craft::document::value::TaggedValue;
use graph_craft::document::{NodeId, NodeInput};
use graphene_core::Color;
use graphene_core::raster::BlendMode;
use graphene_core::raster::image::RasterDataTable;
use graphene_core::raster_types::{CPU, GPU, RasterDataTable};
use graphene_core::text::{Font, TypesettingConfig};
use graphene_core::vector::style::Gradient;
use graphene_std::vector::{ManipulatorPointId, PointId, SegmentId, VectorModificationType};
@@ -207,7 +207,7 @@ pub fn new_vector_layer(subpaths: Vec<Subpath<PointId>>, id: NodeId, parent: Lay
}
/// Create a new bitmap layer.
pub fn new_image_layer(image_frame: RasterDataTable<Color>, id: NodeId, parent: LayerNodeIdentifier, responses: &mut VecDeque<Message>) -> LayerNodeIdentifier {
pub fn new_image_layer(image_frame: RasterDataTable<CPU>, id: NodeId, parent: LayerNodeIdentifier, responses: &mut VecDeque<Message>) -> LayerNodeIdentifier {
let insert_index = 0;
responses.add(GraphOperationMessage::NewBitmapLayer {
id,
@@ -425,8 +425,6 @@ impl<'a> NodeGraphLayer<'a> {
pub fn is_raster_layer(layer: LayerNodeIdentifier, network_interface: &mut NodeNetworkInterface) -> bool {
let layer_input_type = network_interface.input_type(&InputConnector::node(layer.to_node(), 1), &[]).0.nested_type().clone();
layer_input_type == concrete!(graphene_std::RasterDataType)
|| layer_input_type == concrete!(graphene_core::raster::image::RasterDataTable<graphene_core::Color>)
|| layer_input_type == concrete!(graphene_core::application_io::TextureDataTable)
layer_input_type == concrete!(RasterDataTable<CPU>) || layer_input_type == concrete!(RasterDataTable<GPU>)
}
}