mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 23:27:22 +00:00
Introduce error handling in the FemtoVG and Skia renderers (#2402)
Avoid unwrap() and expect() and instead propagate errors all the way down to run_event_loop(), show(), and hide() in the Slint AIP.
This commit is contained in:
parent
7f95614a98
commit
8ffb5131c7
28 changed files with 627 additions and 357 deletions
|
@ -31,14 +31,17 @@ mod renderer {
|
|||
&self,
|
||||
window_builder: winit::window::WindowBuilder,
|
||||
#[cfg(target_arch = "wasm32")] canvas_id: &str,
|
||||
) -> Rc<winit::window::Window>;
|
||||
fn hide(&self);
|
||||
) -> Result<Rc<winit::window::Window>, i_slint_core::platform::PlatformError>;
|
||||
fn hide(&self) -> Result<(), i_slint_core::platform::PlatformError>;
|
||||
|
||||
fn render(&self, size: PhysicalSize);
|
||||
fn render(&self, size: PhysicalSize) -> Result<(), i_slint_core::platform::PlatformError>;
|
||||
|
||||
fn as_core_renderer(&self) -> &dyn i_slint_core::renderer::Renderer;
|
||||
|
||||
fn resize_event(&self, size: PhysicalSize);
|
||||
fn resize_event(
|
||||
&self,
|
||||
size: PhysicalSize,
|
||||
) -> Result<(), i_slint_core::platform::PlatformError>;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn html_canvas_element(&self) -> web_sys::HtmlCanvasElement;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue