lv_port_win_codeblocks
lv_port_win_codeblocks copied to clipboard
The display is incomplete,when direct_mode = 1
LVGL version
v8.3.11
What happened?
Conditions:
- Using the lv_port_win_codeblocks project, the lvgl version is V8.3.11.
- 32-bit Color depth
- set full_refresh=0 for partial refresh
- set direct_mode=1
- set background transparency
- use the following code in the main function to repeat the problem
lv_obj_t *scr = lv_scr_act();
lv_obj_set_style_bg_opa(scr, LV_OPA_TRANSP, 0); //Full transparent background
lv_example_anim_2();
lv_example_png_1();
Background transparency needs to be set, otherwise the problem cannot be reproduced!
Normal
Abnormal
How to reproduce?
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int nCmdShow)
{
/*Initialize LittlevGL*/
lv_init();
/*Initialize the HAL for LittlevGL*/
lv_win32_init(hInstance, SW_SHOWNORMAL, 854, 480, NULL);
/*Output prompt information to the console, you can also use printf() to print directly*/
LV_LOG_USER("LVGL initialization completed!");
/** add my test **/
lv_obj_t *scr = lv_scr_act();
lv_obj_set_style_bg_opa(scr, LV_OPA_TRANSP, 0); //Full transparent background
lv_example_anim_2();
lv_example_png_1();
/*****************/
while(!lv_win32_quit_signal) {
/* Periodically call the lv_task handler.
* It could be done in a timer interrupt or an OS task too.*/
lv_task_handler();
usleep(10000); /*Just to let the system breath*/
}
return 0;
}
Hey,
I don't know immediately what the problem could be, but I would rather update the CodeBlocks repo to LVGL v9. Is it an option for you?
FYI, I transferred the issue to the Codeblocks repo.
LVGL v9 is not what I want, I am using v8.3.11. And this problem doesn't just occur under the codeblocks project, it also occurs on my embedded platform. Can you help me fix this on v8.3.11?
Hey,
I don't know immediately what the problem could be, but I would rather update the CodeBlocks repo to LVGL v9. Is it an option for you?
FYI, I transferred the issue to the Codeblocks repo.
I see and I could reproduce the issue in Eclipse with SDL too. I can fix only later next week, but I can show you where the issue is.
Here LVGL clears the whole buffer, but in direct mode only the area where the rendering happens needs to be cleared.
So I would try this:
Thank you for your help. I tried your method, but it still didn't work out。Can you take care of this for me?