-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Wrong Gradients & Bad Performance when showing them #1060
Comments
You are experiencing two issues here.
|
@buba447, I think the issue is indeed related to the gradient generation. I have attached my AE file. It has three compositions, all look the same except for the gradient colors, but only the composition "comp 2" shows this issue. |
I will look at this over the weekend!
… On Nov 21, 2019, at 6:16 PM, Rapsssito ***@***.***> wrote:
I think the issue is indeed related to the gradient generation. I have attached my AE file. It has three compositions, all look the same except for the gradient colors, but only the composition "comp 2" shows this issue.
menuMainButton.zip
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This comment has been minimized.
This comment has been minimized.
@Rapsssito You were correct! There is a bug with gradient rendering. Looking for a fix. Will update with PR. |
This comment has been minimized.
This comment has been minimized.
I found the issue with your animation! After a lot of debugging I discovered that the gradient had two colors at the same position in after effects. If you open the gradient editor you and drag the start color you will see that there are actually three colors on top of each other: Core Graphics apparently bugs out if two colors occupy the same location. I could add a check to remove the erroneous color, but that check would eat up performance. (It would require a nested for loop on locations with O(N2) complexity) Removing one of them fixes the clipping gradient issue. |
@buba447, thank you so much! After all, the issue was on my side. I apologize if this silly mistake took you a long time. We definitely don't want |
Yeah the performance for this simple animation is especially bad! Far slower than it should be. Ill dig in and see what can be done. |
@buba447 Any news on the issue? :) |
We're having issues with this one as well, but we checked and we don't have overlapping locations. For now we had to downgrade to |
Seems the core case is the draw with Gradient. Version 2.x seems fast on this. Should we combine the issue to #895 ?? And, any update about it ? Or can we use Currently I've test the same image, with Lottie-iOS and Samsung's rlottie implementation on iPhone XR, the rlottie beat all the cases on animation performance. |
I think the issue is happening on devices WITHOUT metal |
I believe the issues with gradient rendering are fixed in 3.4.0 (for both the new and old rendering engine) |
I am experiencing 1 FPS on UI when more than one animation with gradients is being reproduced on iOS. After some profiling, turns out that
CGContextDrawLinearGradient
is taking more than 90% of CPU time. Is there a missing swift optimization?Furthermore, it looks like some gradients are not shown completely. I have attached a JSON that shows both errors.
Check these before submitting:
This issue is a:
Which Version of Lottie are you using?
Lottie 3.0
What Platform are you on?
What Language are you in?
Expected Behavior
Actual Behavior
Note the white corner on the bottom left.
Animation JSON
Animation JSON
This might be related to this issue: #895
The text was updated successfully, but these errors were encountered: