skia: Simplify renderer API

Remove the generic window handle owner part of the API. Instead assume
that the caller provides safety for the given window handles, like we do
for FemtoVG and like softbuffer does it in its public API.
This commit is contained in:
Simon Hausmann 2023-05-09 18:06:22 +02:00 committed by Simon Hausmann
parent a3a13c727a
commit 0475b91daf
4 changed files with 17 additions and 20 deletions

View file

@ -271,7 +271,7 @@ public:
# endif
/// \private
cbindgen_private::CppRawHandleOpaque handle() const { return inner; }
const cbindgen_private::CppRawHandleOpaque &handle() const { return inner; }
};
/// Slint's Skia renderer.
@ -310,7 +310,7 @@ public:
if (inner) {
cbindgen_private::slint_skia_renderer_drop(inner);
}
inner = cbindgen_private::slint_skia_renderer_new(win, window_handle.handle(),
inner = cbindgen_private::slint_skia_renderer_new(win, &window_handle.handle(),
initial_size);
}