Remove conditional activation of the new decoder optimization (now it's always activated)
This commit is contained in:
parent
40bcaa1181
commit
c327ee3737
|
@ -9,10 +9,7 @@
|
||||||
#import "SDImageCache.h"
|
#import "SDImageCache.h"
|
||||||
#import "SDWebImageDecoder.h"
|
#import "SDWebImageDecoder.h"
|
||||||
#import <CommonCrypto/CommonDigest.h>
|
#import <CommonCrypto/CommonDigest.h>
|
||||||
|
|
||||||
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
||||||
#import "SDWebImageDecoder.h"
|
#import "SDWebImageDecoder.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
static NSInteger cacheMaxCacheAge = 60*60*24*7; // 1 week
|
static NSInteger cacheMaxCacheAge = 60*60*24*7; // 1 week
|
||||||
|
|
||||||
|
@ -181,13 +178,12 @@ static SDImageCache *instance;
|
||||||
|
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
||||||
UIImage *decodedImage = [UIImage decodedImageWithImage:image];
|
UIImage *decodedImage = [UIImage decodedImageWithImage:image];
|
||||||
if (decodedImage)
|
if (decodedImage)
|
||||||
{
|
{
|
||||||
image = decodedImage;
|
image = decodedImage;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
[mutableArguments setObject:image forKey:@"image"];
|
[mutableArguments setObject:image forKey:@"image"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,9 @@
|
||||||
|
|
||||||
#import "SDWebImageDownloader.h"
|
#import "SDWebImageDownloader.h"
|
||||||
|
|
||||||
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
||||||
#import "SDWebImageDecoder.h"
|
#import "SDWebImageDecoder.h"
|
||||||
@interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
|
@interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
|
||||||
@end
|
@end
|
||||||
#endif
|
|
||||||
|
|
||||||
NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
|
NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
|
||||||
NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
|
NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
|
||||||
|
@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
|
||||||
if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
|
if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
|
||||||
{
|
{
|
||||||
UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
|
UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
|
||||||
|
|
||||||
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
||||||
[[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
|
[[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
|
||||||
#else
|
|
||||||
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
|
||||||
#endif
|
|
||||||
SDWIRelease(image)
|
SDWIRelease(image)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
|
||||||
|
|
||||||
#pragma mark SDWebImageDecoderDelegate
|
#pragma mark SDWebImageDecoderDelegate
|
||||||
|
|
||||||
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
||||||
- (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
|
- (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
|
||||||
{
|
{
|
||||||
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#pragma mark NSObject
|
#pragma mark NSObject
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue