Conversation
ogoffart
left a comment
There was a problem hiding this comment.
Thanks.
This adds the public API slint::Image::from_gray8() and the Gray8Pixel type.
And it has an implementation for skia.
I think that's good already, although i don't know if Gray8 images are so common and you can always convert to rgb888.
Did you see performance improvements by using that?
Because from the description of issue #11329 , i had the feeling you wanted to have a Gray8Pixel as a target for the software renderer, (like we have Rgb565) and implement the TargetPixel trait for it, which could have more significant impact in the rendering speed of the software renderer
| femtovg::ImageFlags::PREMULTIPLIED, | ||
| ), | ||
| SharedImageBuffer::Gray8(_) => { | ||
| unimplemented!("Gray8 images are not supported by the femtovg renderer") |
There was a problem hiding this comment.
There was a problem hiding this comment.
Ok great, added this too in latest.
I already have a renderer target using Gray8 with Skia and that works great. It's mostly to save memory and performance because since we're using Skia, we're able to use Gray8 there to render directly to our grayscale framebuffer which then shows up on the E-INK screen. |
|
Regarding performance improvements, we did see a big increase after switching to Gray8 with Skia. Although to be fair, previously we used the Software renderer and manually converted the pixels with the classic formula to Gray8 and wrote that into the framebuffer for displaying. |
|
Regarding |
Adds support for Gray8 images, which resolves #11329.