From ea9f573744810f7bd4ac390b639136b40a6a98bb Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Mon, 19 Sep 2022 18:29:57 +0800 Subject: [PATCH] Remove the temp assert code (for debugging usage) --- SDWebImage/Core/SDImageIOAnimatedCoder.m | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/SDWebImage/Core/SDImageIOAnimatedCoder.m b/SDWebImage/Core/SDImageIOAnimatedCoder.m index b875e6a7..56b8af8d 100644 --- a/SDWebImage/Core/SDImageIOAnimatedCoder.m +++ b/SDWebImage/Core/SDImageIOAnimatedCoder.m @@ -14,12 +14,6 @@ #import "SDAnimatedImageRep.h" #import "UIImage+ForceDecode.h" -#define SD_CHECK_CGIMAGE_RETAIN_SOURCE TARGET_OS_MACCATALYST ||\ - (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0) ||\ - (__MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_12_0) ||\ - (__TV_OS_VERSION_MAX_ALLOWED >= __TVOS_15_0) ||\ - (__WATCH_OS_VERSION_MAX_ALLOWED >= __WATCHOS_8_0) - // Specify DPI for vector format in CGImageSource, like PDF static NSString * kSDCGImageSourceRasterizationDPI = @"kCGImageSourceRasterizationDPI"; // Specify File Size for lossy format encoding, like JPEG @@ -254,12 +248,11 @@ static NSString * kSDCGImageDestinationRequestedFileSize = @"kCGImageDestination if (!isDecoded) { // Use CoreGraphics to trigger immediately decode CGImageRef decodedImageRef = [SDImageCoderHelper CGImageCreateDecoded:imageRef]; -// CGImageRef decodedImageRef = CGImageCreate(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef), CGImageGetBitsPerComponent(imageRef), CGImageGetBitsPerPixel(imageRef), CGImageGetBytesPerRow(imageRef), CGImageGetColorSpace(imageRef), CGImageGetBitmapInfo(imageRef), CGImageGetDataProvider(imageRef), NULL, CGImageGetShouldInterpolate(imageRef), CGImageGetRenderingIntent(imageRef)); CGImageRelease(imageRef); imageRef = decodedImageRef; isDecoded = YES; } -#if DEBUG && SD_CHECK_CGIMAGE_RETAIN_SOURCE +#if SD_CHECK_CGIMAGE_RETAIN_SOURCE // Assert here to check CGImageRef should not retain the CGImageSourceRef and has possible thread-safe issue (this is behavior on iOS 15+) // If assert hit, fire issue to https://github.com/SDWebImage/SDWebImage/issues and we update the condition for this behavior check extern CGImageSourceRef CGImageGetImageSource(CGImageRef);