-
Notifications
You must be signed in to change notification settings - Fork 0
Refactoring Swift Wrapper: Refactor Lottie type #10
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
Conversation
212dd35 to
ac94d2c
Compare
| /// Shorthand alias for the buffer type, representing image pixel data in a mutable pointer to UInt32. | ||
| public typealias Buffer = UnsafeMutablePointer<UInt32> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had to add this in for the time being, it will be moved to LottieRenderer in the next PR.
| @@ -1,22 +1,8 @@ | |||
| import CoreGraphics | |||
| import CoreMedia | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff for this file is a bit messy. I'd recommend just looking at the file itself.
ac94d2c to
e6da3c1
Compare
ray-canva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Introduce internal Swift types * Remove Engine from this PR * Refactor Lottie to use internal types * Adopt changes from past PR
Changes
This PR refactors the
Lottietype by using the internal types introduced in the previous PR (#9), setting ourselves up for the final PR where we will introduce the the newLottieRenderertype.Internal types
These changes are quite simple, moving all of the rendering logic out of the
Lottietype, focusing theLottietype on creating a newAnimationinstance and loading data into thePictureinstance associated to thatAnimation.As all of these new types are internal, this means that the public API has minimal changes. For reference, the old public API is here.
Note: You may notice that the
renderFramefunction has gone, this will be addressed by the next PR as this logic will be moved into it's own typeLottieRenderer.Larger refactoring
As mentioned, this is part of a larger factor across the entire Swift wrapper. This
Lottietype will be used with the newLottieRenderertype.Look at the PR train below for more details.
PR Train 🚂