Simon Hausmann
599d86e4e1
Simplify Skia renderer API
...
Remove the size argument from render().
2023-05-26 10:46:59 +02:00
Simon Hausmann
dd61890e23
Fix rendering of the Qt platform example with high-dpi
...
- Provide a C++ platform event for the scale factor change and send it
- Report the correct logical and physical sizes to Slint
2023-05-25 05:29:52 +02:00
Simon Hausmann
fe4a434ce4
Remove the WindowAdapter from the renderer constructor
...
This allows disentangling the native window creation from the renderer
creation, which is rather ugly and complicated on the C++ side.
2023-05-21 14:40:43 +02:00
Olivier Goffart
dd5ef9993f
Platform: Add a Resized event and use that to convey the changes in size ( #2759 )
2023-05-21 12:12:30 +02:00
Simon Hausmann
d9bc7a08f9
Fix crash when using experimental C++ SkiaRenderer API
...
Don't box the Result<Renderer, Error>, but box just the renderer.
Otherwhise the cast to the renderer pointer is nonsense.
2023-05-17 14:33:39 +02:00
Simon Hausmann
db07384e9f
Remove stray outdated comment
2023-05-11 10:42:09 +02:00
Simon Hausmann
3340c31249
Clean up C++ experimental native window handle API
...
- Use explicit constructor functions
- Box the implementation
2023-05-11 10:42:09 +02:00
Simon Hausmann
0475b91daf
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.
2023-05-11 10:42:09 +02:00
Simon Hausmann
d0cdc462c7
Simplify Skia Renderer
...
Allocate the renderer's surface type in the constructor.
This also changes the C++ API to match this, which complicates some code
a little bit.
2023-05-11 10:42:09 +02:00
Olivier Goffart
476ab383ea
software_renderer: return the modified region from the render call
...
Closes #2389
2023-03-24 17:29:01 +01:00
Simon Hausmann
8ffb5131c7
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.
2023-03-24 14:18:11 +01:00
Olivier Goffart
6889dfa5f5
Rust: Make new(), run() and show() report errors from the backend
...
Fixes #2198
2023-02-10 05:00:03 +01:00
Olivier Goffart
a19efc30db
Replace the MAX_BUFFER_AGE const generic with a runtime enum
...
Having a const generic for that didn't turn to be a good API.
Also made the C++ side more difficult
(Also renamed buffer_stride to pixel_stride)
Closes #2135
2023-02-08 14:44:01 +01:00
Simon Hausmann
6a87a07e12
Add support for showing the renderer on macOS with AppKit
2022-12-12 17:02:11 +01:00
Olivier Goffart
fe0e881418
C++ wrapper for the Skia backend
2022-12-12 17:02:11 +01:00
Olivier Goffart
8d686637f4
Experimental platform API from C++
2022-12-12 12:54:31 +01:00