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

refactor(snapshot): use draw buffer interface #5487

Merged
merged 6 commits into from Jan 30, 2024

Conversation

XuNeo
Copy link
Collaborator

@XuNeo XuNeo commented Jan 25, 2024

Description of the feature or fix

lv_snapshot_take_to_buf should use lv_draw_buf_t instead of assembling the struct manually.

Fix #5261

The issue exposed in #5483 suggests that we should avoid converting between lv_image_dsc_t and lv_draw_buf_t.
The rule is that lv_image_dsc_t is for constant C-array image assets. And lv_draw_buf_t is for image used in run-time.

_lv_snapshot_take_to_buf and lv_snapshot_free for legacy use.

Notes

`lv_snapshot_take_to_buf` should use lv_draw_buf_t instead of assembling
the struct manually.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
@XuNeo XuNeo requested review from FASTSHIFT and kisvegabor and removed request for FASTSHIFT January 25, 2024 14:34
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Co-authored-by: Benign X <1341398182@qq.com>
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
src/others/snapshot/lv_snapshot.h Show resolved Hide resolved
src/others/snapshot/lv_snapshot.h Outdated Show resolved Hide resolved
src/others/snapshot/lv_snapshot.h Outdated Show resolved Hide resolved
src/others/snapshot/lv_snapshot.h Outdated Show resolved Hide resolved
src/others/snapshot/lv_snapshot.h Outdated Show resolved Hide resolved
src/others/snapshot/lv_snapshot.h Outdated Show resolved Hide resolved
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
@kisvegabor
Copy link
Member

Thank you! 👍

@kisvegabor kisvegabor merged commit 135ad49 into lvgl:master Jan 30, 2024
16 checks passed
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

Successfully merging this pull request may close these issues.

Use draw_buf in API lv_snapshot_take_to_buf(obj, draw_buf)
4 participants