Facebook patches for FLAnimatedImage #86
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few months ago, I saw a tweet that Ryan Olson noticed that FLAnimatedImage was used in the Facebook apps. I've been working off-and-on since then to clean up the refactor and WebP support we'd done to contribute upstream, and it's finally ready now.
Since the version used in the Facebook app was branched almost a year ago, it was a little tricky to rebase onto master. I was only able to make it reasonable by rewriting the history, so this pull request has just two (relatively large) patches: one to make the image format support more pluggable, and one to add WebP support.
For both the patches, I decided to go with a multiple-target approach using subspec's rather than require pulling in libwebp for all uses of FLAnimatedImage. It's a little more complex, but it's closer to how we have it set up internally at Facebook and is more flexible for users.
Let me know if you have any questions. Most of the changes here were by @benhiller, I just cleaned them up for upstreaming, but we should both be able to answer questions on the approach or the code.
🚀