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(draw_sw): add image clip_radius and mask before transformation #7244

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kisvegabor
Copy link
Member

It required a larger restructuring in image drawing so I'm mainly relying on the CI.

Notes

@kisvegabor
Copy link
Member Author

@liamHowatt @FASTSHIFT @XuNeo please review this PR.

Comment on lines 1115 to +1119
bool area_need_alpha = alpha_test_area_on_obj(obj, &layer_area_act);

const void * bitmap_mask_src = lv_obj_get_style_bitmap_mask_src(obj, 0);
if(bitmap_mask_src) area_need_alpha = true;

Copy link
Collaborator

@liamHowatt liamHowatt Nov 18, 2024

Choose a reason for hiding this comment

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

Can we avoid calling alpha_test_area_on_obj if we know bitmap_mask_src != NULL?

Suggested change
bool area_need_alpha = alpha_test_area_on_obj(obj, &layer_area_act);
const void * bitmap_mask_src = lv_obj_get_style_bitmap_mask_src(obj, 0);
if(bitmap_mask_src) area_need_alpha = true;
const void * bitmap_mask_src = lv_obj_get_style_bitmap_mask_src(obj, 0);
bool area_need_alpha = bitmap_mask_src || alpha_test_area_on_obj(obj, &layer_area_act);

@kisvegabor
Copy link
Member Author

@FASTSHIFT I've implemented bg_image radius clipping and added some tests. I've noticed that VG-Lite clips them incorrectly:

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