Merge pull request #2472 from zhongwuzw/remove-image-source-option

Remove kCGImageSourceShouldCache option when creating image source
This commit is contained in:
Bogdan Poplauschi 2018-09-06 10:49:25 +03:00 committed by GitHub
commit f22a69891c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -326,8 +326,7 @@ const CFStringRef kCGImagePropertyAPNGUnclampedDelayTime = (__bridge CFStringRef
}
self = [super init];
if (self) {
// use Image/IO cache because it's already keep a balance between CPU & memory
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceShouldCache : @(YES)});
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
if (!imageSource) {
return nil;
}

View File

@ -327,8 +327,7 @@
}
self = [super init];
if (self) {
// use Image/IO cache because it's already keep a balance between CPU & memory
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceShouldCache : @(YES)});
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
if (!imageSource) {
return nil;
}