-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinuxKMS: Add support for the Slint software renderer #4334
base: master
Are you sure you want to change the base?
Conversation
Two features are still missing: - mouse cursor support - partial rendering
…erer Collect the errors and print the lot of them.
As discussed a few days ago, let's define rotation to be always clockwise, as it is done in other graphics frameworks as well as our own image rotation. This means changing the definition for the software renderer. Also fixed docs for the enum in the linuxkms backend that was wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As seen in the CI result, the screenshot test need to be adjusted for the change of rotation direction. (by swapping Rotate90 and rotate 270 in the test
|
||
let renderer = Box::new(Self { renderer: SoftwareRenderer::new(), display, size }); | ||
|
||
eprintln!("Using Software renderer"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover?
&self, | ||
buffer: &mut [impl TargetPixel], | ||
pixel_stride: usize, | ||
post_render_callback: Option<&dyn Fn(&mut dyn ItemRenderer)>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of having that in the pubic API (even if hidden) of the software renderer.
Also because we will never end up "stabilizing" this since it uses the ItemRenderer which is even more private.
I'd prefer if you would just blit the pixel manually in linuxkms on top of the surface.
The alternative would be to move the cursor handling in i-slint-core and having it as an Image{}
item on top of the scene. I think this may be usefull for other backend too such as the uefi.
Otherwise if you don't have time for that, please add an InternalToken parameter to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I'll try the approach with an Image on top, wrapped in a hand-written ItemTree and rendered inline like an inline popup on top of the scene, using the slice passed to draw_contents.
Pushed only the CI fix. The cursor drawing is not implemented yet, but I'd like to do that in this PR. I don't want to add more technical debt than absolutely necessary. |
No description provided.