diff --git a/piet-gpu/bin/android.rs b/piet-gpu/bin/android.rs index ac9ffa7..0f3abf0 100644 --- a/piet-gpu/bin/android.rs +++ b/piet-gpu/bin/android.rs @@ -4,7 +4,7 @@ //! //! Requires the [cargo-apk] tool. //! [cargo-apk]: https://crates.io/crates/cargo-apk -/* + use raw_window_handle::android::AndroidHandle; use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; @@ -107,12 +107,9 @@ impl GfxState { let mut ctx = PietGpuRenderContext::new(); render_scene(&mut ctx); - let n_paths = ctx.path_count(); - let n_pathseg = ctx.pathseg_count(); - let n_trans = ctx.pathseg_count(); - let scene = ctx.get_scene_buf(); - let renderer = Renderer::new(&session, scene, n_paths, n_pathseg, n_trans)?; + let mut renderer = Renderer::new(&session)?; + renderer.upload_render_ctx(&mut ctx)?; let submitted: Option = None; let current_frame = 0; @@ -175,5 +172,3 @@ impl GfxState { } } } -*/ -fn main() {} diff --git a/piet-gpu/bin/winit.rs b/piet-gpu/bin/winit.rs index b7b838b..3b81590 100644 --- a/piet-gpu/bin/winit.rs +++ b/piet-gpu/bin/winit.rs @@ -37,12 +37,9 @@ fn main() -> Result<(), Error> { let mut ctx = PietGpuRenderContext::new(); render_scene(&mut ctx); - let n_paths = ctx.path_count(); - let n_pathseg = ctx.pathseg_count(); - let n_trans = ctx.trans_count(); - let scene = ctx.get_scene_buf(); - let renderer = Renderer::new(&session, scene, n_paths, n_pathseg, n_trans)?; + let mut renderer = Renderer::new(&session)?; + renderer.upload_render_ctx(&mut ctx)?; let mut submitted: Option = None; let mut last_frame_idx = 0;