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 buffer will not automatically switch when double full-screen buffer + direct_mode #3010

Closed
3 tasks done
FASTSHIFT opened this issue Jan 15, 2022 · 6 comments
Closed
3 tasks done

Comments

@FASTSHIFT
Copy link
Collaborator

Perform all steps below and tick them with [x]

  • Check the related part of the Documentation
  • Update lvgl to the latest version
  • Reproduce the issue in a Simulator

Describe the bug

The buffer will not automatically switch when double full-screen buffer + direct_mode.

To Reproduce

WAULDC50` FST9@O@~YZOPU

Expected behavior

The buffer will automatically switch when double full-screen buffer+direct_mode.

Screenshots or video

%P F}_UJ53K{1BW62H)3H

Disable direct_mode
S )9U7{7A88~ZPX{ 1QXN

@FASTSHIFT
Copy link
Collaborator Author

The buffer switching logic in the draw_buf_flush() function may be incorrect, because draw_buf->flushing_last may be cleared in the user's flush_cb (calling lv_disp_flush_ready())
_6KE0Y))MZFT2WJ3P J6V)E
_UWTMN%41BOIOUKPXOS{3XX

@FASTSHIFT
Copy link
Collaborator Author

Can remove the line disp_drv->draw_buf->flushing_last = 0; in the lv_disp_flush_ready() function?

@kisvegabor
Copy link
Member

kisvegabor commented Jan 18, 2022

The buffer switching logic in the draw_buf_flush() function may be incorrect, because draw_buf->flushing_last may be cleared in the user's flush_cb (calling lv_disp_flush_ready())

Finally, is this the reason of the missed buffer switching?

Can remove the line disp_drv->draw_buf->flushing_last = 0; in the lv_disp_flush_ready() function?

If so, I'd rather save the flushing_last in line 1004 and use the saved value in line 1015. What do you think?

@FASTSHIFT
Copy link
Collaborator Author

FASTSHIFT commented Jan 18, 2022

The buffer switching logic in the draw_buf_flush() function may be incorrect, because draw_buf->flushing_last may be cleared in the user's flush_cb (calling lv_disp_flush_ready())

Finally, is this the reason of the missed buffer switching?

Can remove the line disp_drv->draw_buf->flushing_last = 0; in the lv_disp_flush_ready() function?

If so, I'd rather save the flushing_last in line 1004 and use the saved value in line 1015. What do you think?

Yes, I tried to remove the line disp_drv->draw_buf->flushing_last = 0;, the buffer can be switched normally.
I agree with the way to save the value of flushing_last.

@FASTSHIFT
Copy link
Collaborator Author

I tested it and it seems to work fine.
image

@kisvegabor
Copy link
Member

Fixed, as discussed.

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