Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tronical
Copy link
Member

No description provided.

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.
Copy link
Member

@ogoffart ogoffart left a 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");
Copy link
Member

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)>,
Copy link
Member

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.

Copy link
Member Author

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.

@tronical
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants