Commit graph

22 commits

Author SHA1 Message Date
Olivier Goffart
cfbcf0b1d7
Introduce Window::try_dispatch_event (#7313)
That is the same as Window::dispatch_event, but it reports an error
instead of panicking
2025-01-09 19:39:38 +01:00
Simon Hausmann
31912fedaf LinusKMS: Clean up and simplify presenter interface
With the drm output now waiting for the page flip on render *and* gbm and dumb buffer displays supporting triple buffering,
we don't need the entire async page flip handling logic anymore.

In the future we could turn wait_for_page_flip() into an async fn.
2025-01-08 21:46:25 +01:00
Simon Hausmann
028903c2d3 LinuxKMS: Add support for partial rendering with the Slint software renderer 2024-06-10 06:01:19 -07:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Simon Hausmann
bf7a4095ad LinuxKMS: Not only print the name of the renderer, also print the resolution 2024-01-12 16:07:29 +01:00
Simon Hausmann
4d58c9877d LinuxKMS: Remove set_event_loop_quit_on_last_window_closed implementation
This is now handled in i-slint-core.

Amends 9ff13faee8
2024-01-12 10:05:02 +01:00
Simon Hausmann
e1c5f4ff03 linuxkms: Fix support for "refresh_full_speed" in SLINT_DEBUG_PERFORMANCE
We trigger update_timers_and_animations() every time the event loop wakes up.
If there's a real animation in the UI going on, that'll also trigger a
request_redraw() call and all will be well.

But when the only source of animation is set_has_active_animations() from
RenderingMetricsCollector, then we might end up in a situation where the event
loop is woken up before the rendered frame is on the screen, which means we
invoke update_timers_and_animations(), but we won't render because the
previous frame isn't shown yet. When it is shown and our presentation callback
is invoked, has_active_animations() is false again.

So instead, remember if we need to re-render once after rendering()
and use that to decide if we need to re-render in the presentation callback.
2024-01-11 11:23:18 +01:00
Simon Hausmann
0ccc334de7 linuxkms: remove home-grown fd event source with calloop's generic even source
That's less boiler plate for us and better error handling (note how the receive_events()
call on the DRM device now propagates the error). And this also unregisters automatically
on drop.
2023-12-19 16:59:35 +01:00
Simon Hausmann
208a1e24ac linuxkms: replace 16m timer for animations with page flip driven rendering (if possible) 2023-12-19 16:59:35 +01:00
Simon Hausmann
4f0ad4c15b linuxkms: remove page flip specific bits from the calloop event loop
This belongs encapsulated inside the egldisplay code.
2023-12-19 16:59:35 +01:00
Simon Hausmann
388661cc53 linuxkms: Fix firing of timers while animations are running
Merge the 16 redraw timer with other timers, which might fire sooner.
2023-12-19 16:59:35 +01:00
Simon Hausmann
b40b629e11 linuxkms: don't blockingly read on the drm fd after issuing a page flip request
... instead pass the fd into the calloop event loop and change state when we receive activity on it.

This improves performance slightly, and is a necessary to be able to implement refresh rate throttled rendering (in the next commits).
2023-12-19 16:59:35 +01:00
Simon Hausmann
3b51c8e30a
LinuxKMS: Add support for synthetic display rotations (#4166)
This patch adds support for the `SLINT_KMS_ROTATION` environment
variable, that instructs the Skia/FemtoVG renderers to rotate
the scene before rendering.
2023-12-18 17:49:05 +01:00
Simon Hausmann
8d19426723
linuxkms: decouple event loop from window adapter (#4144)
- Allow for the event loop to run before creating the window adapter
- Keep the loop running if requested
2023-12-12 13:06:36 +01:00
Olivier Goffart
1864257f29 Silence error when rendering SVG in an 0x0 size
Make the size argument to svg::render optional to mean that it is the
default size of the image.
Otherwise, passing None as the size to ImageInner::render_to_buffer
would not render the image which is possible in some backend (eg: the
button image icon with the qt backend)

And if the image is really rendered on an empty because of layouting or
so, we don't need to show a warning anyway.

Fix #3790
2023-11-02 11:09:20 +01:00
Olivier Goffart
541e7137c6
Backends: don't resize the WindowItem in set_visible
We already query the size right after the call to set_visible in the
WindowInner::show()
2023-08-24 13:15:28 +02:00
Olivier Goffart
f5caafd379 linuxkms: Implement support for SLINT_SCALE_FACTOR 2023-07-31 19:35:17 +02:00
Simon Hausmann
23ca0cb36c Disambiguate Render trait type name
Use FullscreenRenderer as name for the trait used in the linuxkms backend
2023-07-31 17:11:43 +02:00
Simon Hausmann
84ddfc6c2f Add support for rendering the mouse cursor with linuxkms
The cursor is loaded by the window adapter from the cache. When it's
loaded the first time, its format will be Svg, so we convert it to a
pixel buffer. That way the skia backend can convert it on first draw
into a skia_safe::Image and replace the cache entry with the backend
storage variant.
2023-07-31 13:06:28 +02:00
Simon Hausmann
e40f6c253e linuxkms: Add support for FemtoVG as renderer 2023-07-28 13:40:37 +02:00
Renamed from internal/backends/linuxkms/skiawindowadapter.rs (Browse further)