dde_linux: optimize refresh routine in imx8_fb_drv

Fix #3616
This commit is contained in:
Stefan Kalkowski 2020-01-15 15:55:45 +01:00 committed by Christian Helmuth
parent fda337a1c0
commit e84e1bbf36
1 changed files with 5 additions and 2 deletions

View File

@ -198,9 +198,12 @@ class Framebuffer::Session_component : public Genode::Rpc_object<Session>
Genode::Pixel_rgb888 * dst = (Genode::Pixel_rgb888*)_driver.fb_addr();
for (int row = y1; row <= y2; row++) {
int line_offset = width * row;
Genode::Pixel_rgb565 const * s = src + line_offset + x1;
Genode::Pixel_rgb888 * d = dst + line_offset + x1;
for (int col = x1; col <= x2; col++) {
Genode::Pixel_rgb565 px = src[width * row + col];
dst[width * row + col] = Genode::Pixel_rgb888(px.r(), px.g(), px.b(), px.a());
Genode::Pixel_rgb565 const px = *s++;
*d++ = Genode::Pixel_rgb888(px.r(), px.g(), px.b(), px.a());
}
}
}