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.
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"
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.
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.
... 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).
This patch adds support for the `SLINT_KMS_ROTATION` environment
variable, that instructs the Skia/FemtoVG renderers to rotate
the scene before rendering.
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
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.