forked from pinterest/PINRemoteImage
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rebase active branch to include latest changes from Upstream #2
Open
esme-putt
wants to merge
27
commits into
request-modifier
Choose a base branch
from
request-modifier-updated
base: request-modifier
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rest#600) * On iOS, decode WebP images directly into a buffer Core Animation likes Without this change, the images we output aren't compatible with the GPU and so CA has to copy them all on the main thread at commit time, which means stutters. Plus memory bloat. The difference here is so substantial that you may seriously want to consider re-running a WebP experiment if you did in the past and bailed on it. * Try use system decode first if possible * Do it the same on both platforms * Fix comment * But do it right
…IgnoreCache is provided Otherwise it might be confusing (and surprising) that actually used network client return locally cached data There is an use case in Pinterest that expects one resonpose never be cached.
Set cachePolicy accordingly when PINRemoteImageManagerDownloadOptions is provided
…ed (pinterest#610) * initial commit * PINDiskCacheError is both enum type and a function that confuses compiler, but not sure why only issue on iphone 8 * not use PINDiskCacheLog as it doesn't use PINCache * use requiresSecureCoding:NO for unarchiving as many classes not comform to NSSecureCoding * revert renames and address other comments
Disable asserts in release builds when using Swift Package Manager
* attempt to reduce testImageRequestIgnoresLocalData flakiness #2 * Use newer Xcode for CI * Fix Carthage job Co-authored-by: rruizmurguia <[email protected]>
* Add APNG image support * Add the PIN_APNG flag and some unit test * Add APNG into Example-Mac/Swift-Example * Fix compile error when APNG disabled * Fix CI compile environment issues
Before this change, if you attempted to use a dynamic image for a placeholder (e.g. an image from an asset catalog that has both dark and light versions) you would get unpredictable results. This is because PINAnimatedImageView is drawing the image directly to the layer without consulting the view's current trait collection. So which version of the image you get depends entirely on what the global `UITraitCollection.currentTraitCollection` is. According to Apple, "UIKit updates the value of this property before calling several well-known methods of UIView, UIViewController, and UIPresentationController." Though they do not say what those methods are, experimentation concludes that "displayLayer:" is not one of those. To solve this, we need to make sure that when we generate the CGImage, we are explicit about using the view's trait collection so that we get the correct image.
Add missing imports to the header
* Add PrivacyInfo.xcprivacy * Copy privacy manifest in package
## Summary Currently, PINRemoteImage does not build with recent build tools. We should fix that, plus update all the dependencies. This bumps min versions of iOS and tvOS up to 14.0, and macOS to 11.0. This allows us to drop the `libwebp` dependency, which is not currently building with recent tools either, and instead use the system provided decoder. **This does mean tvOS loses support for WebP as tvOS doesn't have a system decoder.** Also, clean up the headers. Cocoapods was including way too much as public headers, and we were using double quotes instead of angle brackets for them. ## Test plan Make sure everything builds & unit tests pass. Also, update all the examples and ensure they work.
Support Building from Xcode 15
## Summary I bumped the version on the podspec prematurely. This causes the Publish Release CI action to fail because _it_ wants to bump the release. But since it's already bumped, the script fails to find the old version.
…rsion-bump Revert premature version bump
## Summary We now have some warnings in PINRemoteImage because we still use MD5. It's fine for our use cases, but it means anywhere we use `pod` we have to pass `allow-warnings`. In this case, when publishing the Cocoapod.
…elease Allow warnings when pod trunk push
## Summary Recently we made several headers private in Cocoapods. However, some clients were reaching directly into PINRemoteImage's memory cache (PINCache) and pulling out `PINRemoteImageMemoryContainer` and doing whatever with it. To support that use case without exposing more than necessary publicly, introduce the `PINRemoteImageDataConvertible` protocol and have `PINRemoteImageMemoryContainer` conform to it. So if previously the code was: ``` PINRemoteImageMemoryContainer *container = [[PINRemoteImageManager sharedImageManager].cache objectFromMemoryForKey:imageURL.absoluteString]; NSData *cachedImageDataForURL = [container data]; ``` it can be ``` id<PINRemoteImageDataConvertible> container = [[PINRemoteImageManager sharedImageManager].cache objectFromMemoryForKey:imageURL.absoluteString]; NSData *cachedImageDataForURL = [container data]; ``` Also, previous changes required `PIN_WEBP` to be defined in the project settings or it would fail to compile. That's been changed to always build. If _not_ specified it will default to `1`. ## Test plan Run `make all` to run tests and build everything
…-cache-image-data Expose protocol to get image data from the cache plus WebP cleanup
…updated # Conflicts: # .github/workflows/ci.yaml # .github/workflows/publish_release.yml # Source/Classes/PINRemoteImageManager.m
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR merges in the changes from the upstream repository.