mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
feat(drivers): account for the frame buffer virtual resolution deviating from the visible resolution. (#5988)
This commit is contained in:
parent
5e4fa47b20
commit
1f37da22db
@ -312,16 +312,21 @@ static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * colo
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t color_pos = (area->x1 + dsc->vinfo.xoffset) * px_size + area->y1 * dsc->finfo.line_length;
|
||||
uint32_t fb_pos = color_pos + dsc->vinfo.yoffset * dsc->finfo.line_length;
|
||||
uint32_t fb_pos =
|
||||
(area->x1 + dsc->vinfo.xoffset) * px_size +
|
||||
(area->y1 + dsc->vinfo.yoffset) * dsc->finfo.line_length;
|
||||
|
||||
uint8_t * fbp = (uint8_t *)dsc->fbp;
|
||||
int32_t y;
|
||||
if(LV_LINUX_FBDEV_RENDER_MODE == LV_DISPLAY_RENDER_MODE_DIRECT) {
|
||||
uint32_t color_pos =
|
||||
area->x1 * px_size +
|
||||
area->y1 * disp->hor_res * px_size;
|
||||
|
||||
for(y = area->y1; y <= area->y2; y++) {
|
||||
lv_memcpy(&fbp[fb_pos], &color_p[color_pos], w * px_size);
|
||||
fb_pos += dsc->finfo.line_length;
|
||||
color_pos += dsc->finfo.line_length;
|
||||
color_pos += disp->hor_res * px_size;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user