mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
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:
parent
a3a13c727a
commit
0475b91daf
4 changed files with 17 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue