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

fix(vg_lite): fix linear image use after free #5618

Merged
merged 4 commits into from Feb 8, 2024

Conversation

FASTSHIFT
Copy link
Collaborator

Description of the feature or fix

linear grad in vg-lite is simulated using image, which means that vg_lite_clear_grad cannot be called immediately after calling vg_lite_draw_grad to free the image memory because the GPU may not have finished drawing.
Therefore, I introduced cache for management. On the one hand, it can reduce the overhead of frequently creating grad image images, and on the other hand, it can solve the problem of using after free asynchronous rendering by using delayed release.

cc @W-Mai

Notes

pengyiqiang and others added 3 commits February 7, 2024 12:54
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
@FASTSHIFT FASTSHIFT force-pushed the fix_vg_lite_grad_use_after_free branch from aaf3414 to 03e6d8e Compare February 7, 2024 12:23
Copy link
Collaborator

@XuNeo XuNeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the compile warning.

@FASTSHIFT
Copy link
Collaborator Author

Please fix the compile warning.

Done

@FASTSHIFT FASTSHIFT merged commit d6878da into lvgl:master Feb 8, 2024
16 checks passed
@FASTSHIFT FASTSHIFT deleted the fix_vg_lite_grad_use_after_free branch February 15, 2024 04:03
lion2tomato pushed a commit to lion2tomato/lvgl that referenced this pull request Mar 19, 2024
VELAPLATFO-22913

Change-Id: I5cf49b6378abcc3516bca1e4b1eb16f7918d94e7
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
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