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

lottie: replace cubics with lines where possible #2263

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgrudzinska
Copy link
Collaborator

When the loaded control points are zero (in and out), there is no need to apply bezier curves - they can be replaced with straight lines.

@mgrudzinska mgrudzinska requested a review from hermet as a code owner May 9, 2024 23:24
@mgrudzinska mgrudzinska removed the request for review from hermet May 9, 2024 23:25
@mgrudzinska mgrudzinska self-assigned this May 9, 2024
@mgrudzinska mgrudzinska requested a review from hermet May 9, 2024 23:25
@hermet hermet added optimization Enhance performance / Reduce memory usage or binary size lottie Lottie animation labels May 10, 2024
@hermet
Copy link
Member

hermet commented May 10, 2024

@mgrudzinska Does this necessary for rounded corner? I've assumed it would but the performance enhancement for Curve 2 Line is not clear yet. Let's carefully review it before confirming.

@mgrudzinska mgrudzinska force-pushed the mira/lineTo branch 3 times, most recently from 383b50a to a74c729 Compare May 10, 2024 10:32
When the loaded control points are zero (in and out),
there is no need to apply bezier curves - they can be
replaced with straight lines.
@mgrudzinska
Copy link
Collaborator Author

@mgrudzinska Does this necessary for rounded corner? I've assumed it would but the performance enhancement for Curve 2 Line is not clear yet. Let's carefully review it before confirming.

@hermet no it's not necessary for rounded corner.
also it will require some extra checks in the rounded corners implementation if we apply this.

I just wanted to point it out that this is an easier solution then using _curve2line from #2216

@mgrudzinska mgrudzinska marked this pull request as draft May 17, 2024 08:17
@mgrudzinska
Copy link
Collaborator Author

  1. mathZero -> ==
  2. will affect the rounded corners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lottie Lottie animation optimization Enhance performance / Reduce memory usage or binary size
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants