mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Extract gapplication_io from gcore (#2742)
move `gcore::application_io` into the new crate `gapplication-io`, remove features `wasm` and `wgpu` from `gcore`
This commit is contained in:
@@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0"
|
||||
[features]
|
||||
default = ["wasm", "imaginate"]
|
||||
gpu = []
|
||||
wgpu = ["gpu", "graph-craft/wgpu"]
|
||||
wasm = ["wasm-bindgen", "web-sys"]
|
||||
wgpu = ["gpu", "graph-craft/wgpu", "graphene-application-io/wgpu"]
|
||||
wasm = ["wasm-bindgen", "web-sys", "graphene-application-io/wasm"]
|
||||
imaginate = ["image/png", "base64", "web-sys", "wasm-bindgen-futures"]
|
||||
image-compare = []
|
||||
vello = ["dep:vello", "gpu", "graphene-core/vello"]
|
||||
@@ -23,6 +23,7 @@ dyn-any = { workspace = true }
|
||||
graph-craft = { workspace = true }
|
||||
wgpu-executor = { workspace = true }
|
||||
graphene-core = { workspace = true }
|
||||
graphene-application-io = { workspace = true }
|
||||
|
||||
# Workspace dependencies
|
||||
fastnoise-lite = { workspace = true }
|
||||
|
||||
@@ -10,4 +10,5 @@ pub mod vector;
|
||||
#[cfg(feature = "wasm")]
|
||||
pub mod wasm_application_io;
|
||||
|
||||
pub use graphene_application_io as application_io;
|
||||
pub use graphene_core::*;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
use graph_craft::document::value::RenderOutput;
|
||||
pub use graph_craft::document::value::RenderOutputType;
|
||||
pub use graph_craft::wasm_application_io::*;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use graphene_core::application_io::SurfaceHandle;
|
||||
use graphene_core::application_io::{ApplicationIo, ExportFormat, RenderConfig};
|
||||
use graphene_application_io::{ApplicationIo, ExportFormat, RenderConfig};
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use graphene_core::instances::Instances;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
@@ -127,7 +125,7 @@ async fn render_canvas(
|
||||
surface_handle: wgpu_executor::WgpuSurface,
|
||||
render_params: RenderParams,
|
||||
) -> RenderOutputType {
|
||||
use graphene_core::SurfaceFrame;
|
||||
use graphene_application_io::SurfaceFrame;
|
||||
|
||||
let footprint = render_config.viewport;
|
||||
let Some(exec) = editor.application_io.as_ref().unwrap().gpu_executor() else {
|
||||
@@ -172,7 +170,7 @@ async fn rasterize<T: WasmNotSend + 'n>(
|
||||
)]
|
||||
mut data: Instances<T>,
|
||||
footprint: Footprint,
|
||||
surface_handle: Arc<SurfaceHandle<HtmlCanvasElement>>,
|
||||
surface_handle: Arc<graphene_application_io::SurfaceHandle<HtmlCanvasElement>>,
|
||||
) -> RasterDataTable<CPU>
|
||||
where
|
||||
Instances<T>: GraphicElementRendered,
|
||||
|
||||
Reference in New Issue
Block a user