Skip to content

Conversation

@FASTSHIFT
Copy link
Collaborator

@FASTSHIFT FASTSHIFT commented Feb 27, 2024

Description of the feature or fix

Generalized delayed release logic.

Notes

@FASTSHIFT FASTSHIFT changed the title refact(vg_lite): abstract common pending free logic refact(vg_lite): abstract common pending release logic Feb 27, 2024
@FASTSHIFT FASTSHIFT force-pushed the feat_vg_lite_pending branch from 216fe50 to 258dcf3 Compare February 27, 2024 06:16
Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

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

I see that you add/remove items to the pending arrays, but can't see where you actually use them, i.e. where you do something with the saved items.

@FASTSHIFT
Copy link
Collaborator Author

I see that you add/remove items to the pending arrays, but can't see where you actually use them, i.e. where you do something with the saved items.

It's here:
https://github.com/lvgl/lvgl/pull/5756/files#diff-a7fd0e4901fa5b7f6cff798f9ae991251b63efe81d4f1a23d6a1911dac4b04a7R175
https://github.com/lvgl/lvgl/pull/5756/files#diff-8bcb9672aff4be3e779cac54c1c52e2bd88dceb6dddc7d7a976c6235db470d12R202

@FASTSHIFT FASTSHIFT requested a review from kisvegabor February 27, 2024 06:44
@kisvegabor
Copy link
Member

What I can't see is why is it good to add something to the pending list. When/Where do you read the list, and do something with it?

@FASTSHIFT
Copy link
Collaborator Author

What I can't see is why is it good to add something to the pending list. When/Where do you read the list, and do something with it?

Since the cmd buffer of vg-lite only records the address of the image, after submitting the image to the GPU for rendering, we need to prevent the image being rendered from being automatically released by the cache.
Therefore, we need to wait until the GPU is actually rendered before marking the image as releasable. Since rendering is asynchronous, a pending list is needed to record the image information to be released, and the image references are released uniformly in lv_vg_lite_finish.

@FASTSHIFT FASTSHIFT requested review from PGNetHun and XuNeo March 1, 2024 09:26
@FASTSHIFT FASTSHIFT force-pushed the feat_vg_lite_pending branch from 16e6355 to 2d42e20 Compare March 1, 2024 11:49
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
@FASTSHIFT FASTSHIFT force-pushed the feat_vg_lite_pending branch from 2d42e20 to 4fb8a17 Compare March 1, 2024 12:09
@kisvegabor
Copy link
Member

Clear now, thanks!

@XuNeo XuNeo merged commit 0297fac into lvgl:master Mar 6, 2024
@FASTSHIFT FASTSHIFT deleted the feat_vg_lite_pending branch March 6, 2024 10:01
HongChao6 pushed a commit to HongChao6/lvgl that referenced this pull request Oct 18, 2024
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
HongChao6 pushed a commit to HongChao6/lvgl that referenced this pull request Oct 18, 2024
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.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.

3 participants