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

Slightly Improve Graphics Performance #462

Merged
merged 2 commits into from
Dec 28, 2020
Merged

Slightly Improve Graphics Performance #462

merged 2 commits into from
Dec 28, 2020

Conversation

TimOliver
Copy link
Owner

The circular cropping mode has always used a CALayer mask to produce the circle clipping shape for the image. I originally did this since I didn't trust cornerRadius to always provide a perfect circular shape.

After watching Apple's latest Tech Talks on animation performance, they always recommend using cornerRadius over mask because the performance gains are more significant than I realised.

This PR swaps the circular mode using Core Animation masks to the regular corner radius API. If this introduces any regressions I've missed, please tell me.

@TimOliver TimOliver merged commit 24fa2e8 into main Dec 28, 2020
@TimOliver TimOliver deleted the graphics-update branch December 28, 2020 15:55
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.

1 participant