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

feat(cache): use unified cache entry free callback #5612

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

XuNeo
Copy link
Collaborator

@XuNeo XuNeo commented Feb 7, 2024

Description of the feature or fix

Before this, the only exception is vg-lite decoder. It needs to check if the draw buffer should be free'd or not. Now it's unified.

User could still set a custom callback to free cache data but all built-in decoders now have the unified callback.

For VG-Lite decoder, the memory of YUV variable image is not allocated by lvgl and thus clear ALLOCATED bit to avoid it being destroyed after decoder closes. And do not add this kind of image to cache, since its life is managed by user.

Notes

@XuNeo XuNeo requested a review from FASTSHIFT February 7, 2024 04:24
…ee'ed

For YUV variable image, the memory is not allocated by lvgl and thus clear ALLOCATED bit to avoid it being detroyed after decoder closes.
Do not add this kind of image to cache, since it's life is managed by user.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
@XuNeo XuNeo force-pushed the vg_lite-decoder-not-allocated branch from 55a6a95 to 27c11fb Compare February 7, 2024 04:28
Before this, the only exception is vg-lite decoder. It needs to check if the draw buffer should be free'd or not. Now it's unified.
User could still set a custom callback to free cache data but all built-in decoders now have the unified callback.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
@XuNeo XuNeo force-pushed the vg_lite-decoder-not-allocated branch from 27c11fb to 5421258 Compare February 7, 2024 04:32
@kisvegabor kisvegabor merged commit a656341 into lvgl:master Feb 7, 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.

None yet

2 participants