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

The display is incomplete,when direct_mode = 1 #39

Open
jjzqp opened this issue Mar 19, 2024 · 4 comments
Open

The display is incomplete,when direct_mode = 1 #39

jjzqp opened this issue Mar 19, 2024 · 4 comments

Comments

@jjzqp
Copy link

jjzqp commented Mar 19, 2024

LVGL version

v8.3.11

What happened?

Conditions:

  1. Using the lv_port_win_codeblocks project, the lvgl version is V8.3.11.
  2. 32-bit Color depth
  3. set full_refresh=0 for partial refresh
  4. set direct_mode=1
  5. set background transparency
  6. 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

direct_mode0

Abnormal

direct_mode1

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;
}
@kisvegabor kisvegabor transferred this issue from lvgl/lvgl Mar 20, 2024
@kisvegabor
Copy link
Member

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.

@jjzqp
Copy link
Author

jjzqp commented Mar 21, 2024

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.

@kisvegabor
Copy link
Member

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:

  • Add an if(!direct_mode) condition here.
  • In direct mode clear the area to be rendered here. It should result in a "hole" in the middle of the screen sized buffer.

@jjzqp
Copy link
Author

jjzqp commented Apr 7, 2024

Thank you for your help. I tried your method, but it still didn't work out。Can you take care of this for me?

1
2

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

No branches or pull requests

2 participants