Authored by Olivier Poitrey

Remove conditional activation of the new decoder optimization (now it's always activated)

... ... @@ -9,10 +9,7 @@
#import "SDImageCache.h"
#import "SDWebImageDecoder.h"
#import <CommonCrypto/CommonDigest.h>
#ifdef ENABLE_SDWEBIMAGE_DECODER
#import "SDWebImageDecoder.h"
#endif
static NSInteger cacheMaxCacheAge = 60*60*24*7; // 1 week
... ... @@ -181,13 +178,12 @@ static SDImageCache *instance;
if (image)
{
#ifdef ENABLE_SDWEBIMAGE_DECODER
UIImage *decodedImage = [UIImage decodedImageWithImage:image];
if (decodedImage)
{
image = decodedImage;
}
#endif
[mutableArguments setObject:image forKey:@"image"];
}
... ...
... ... @@ -8,11 +8,9 @@
#import "SDWebImageDownloader.h"
#ifdef ENABLE_SDWEBIMAGE_DECODER
#import "SDWebImageDecoder.h"
@interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
@end
#endif
NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
... ... @@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
{
UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
#ifdef ENABLE_SDWEBIMAGE_DECODER
[[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
#else
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
#endif
SDWIRelease(image)
}
}
... ... @@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
#pragma mark SDWebImageDecoderDelegate
#ifdef ENABLE_SDWEBIMAGE_DECODER
- (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
{
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
}
#endif
#pragma mark NSObject
... ...