Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "pinterest/PINRemoteImage" "3.0.0-beta.14"
github "pinterest/PINRemoteImage" "3.0.3"
github "pinterest/PINCache" "3.0.1-beta.7"
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git "https://chromium.googlesource.com/webm/libwebp" "v0.6.0"
git "https://chromium.googlesource.com/webm/libwebp" "v1.1.0"
github "pinterest/PINCache" "3.0.1-beta.7"
github "pinterest/PINOperation" "1.1.2"
github "pinterest/PINRemoteImage" "3.0.0-beta.14"
github "pinterest/PINOperation" "1.2.1"
github "pinterest/PINRemoteImage" "3.0.3"
11 changes: 11 additions & 0 deletions Source/ASImageNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#import <tgmath.h>

#import <AsyncDisplayKit/_ASDisplayLayer.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASDisplayNode+FrameworkPrivate.h>
#import <AsyncDisplayKit/ASDisplayNode+Subclasses.h>
#import <AsyncDisplayKit/ASDisplayNodeExtras.h>
Expand All @@ -30,6 +31,11 @@
// TODO: It would be nice to remove this dependency; it's the only subclass using more than +FrameworkSubclasses.h
#import <AsyncDisplayKit/ASDisplayNodeInternal.h>

#if AS_PIN_REMOTE_IMAGE
#import <PINRemoteImage/PINRemoteImageMacros.h>
#import <PINRemoteImage/PINImage+AlternativeTypes.h>
#endif

typedef void (^ASImageNodeDrawParametersBlock)(ASWeakMapEntry *entry);

@interface ASImageNodeDrawParameters : NSObject {
Expand Down Expand Up @@ -362,6 +368,11 @@ + (UIImage *)displayWithParameters:(id<NSObject>)parameter isCancelled:(NS_NOESC
BOOL hasValidCropBounds = cropEnabled && !CGRectIsEmpty(cropDisplayBounds);
CGRect bounds = (hasValidCropBounds ? cropDisplayBounds : drawParameterBounds);

#if PIN_TARGET_IOS && AS_PIN_REMOTE_IMAGE
if (image.pin_encodedImageData) {
image = [image pin_decodedImageUsingCustomDecodersWithSize:bounds.size];
}
#endif

ASDisplayNodeAssert(contentsScale > 0, @"invalid contentsScale at display time");

Expand Down