From de7ba8d08e2ba9b76b5c9707113f9be0f1046c58 Mon Sep 17 00:00:00 2001 From: Antti Kortetmaa Date: Fri, 11 Dec 2020 12:09:26 +0200 Subject: [PATCH] Removed updateWebPOptionsToConfig from the public API of SDImageWebPCoder --- .../Classes/SDImageWebPCoder.h | 18 ------------------ Tests/SDWebImageWebPCoderTests.m | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/SDWebImageWebPCoder/Classes/SDImageWebPCoder.h b/SDWebImageWebPCoder/Classes/SDImageWebPCoder.h index 849259f..7629ded 100644 --- a/SDWebImageWebPCoder/Classes/SDImageWebPCoder.h +++ b/SDWebImageWebPCoder/Classes/SDImageWebPCoder.h @@ -12,20 +12,6 @@ @import SDWebImage; #endif -#if __has_include("webp/decode.h") && __has_include("webp/encode.h") && __has_include("webp/demux.h") && __has_include("webp/mux.h") -#import "webp/decode.h" -#import "webp/encode.h" -#import "webp/demux.h" -#import "webp/mux.h" -#elif __has_include() && __has_include() && __has_include() && __has_include() -#import -#import -#import -#import -#else -@import libwebp; -#endif - /** Built in coder that supports WebP and animated WebP */ @@ -33,8 +19,4 @@ @property (nonatomic, class, readonly, nonnull) SDImageWebPCoder *sharedCoder; -- (void) updateWebPOptionsToConfig:(WebPConfig * _Nonnull)config - maxFileSize:(NSUInteger)maxFileSize - options:(nullable SDImageCoderOptions *)options; - @end diff --git a/Tests/SDWebImageWebPCoderTests.m b/Tests/SDWebImageWebPCoderTests.m index 7583d13..43ee412 100644 --- a/Tests/SDWebImageWebPCoderTests.m +++ b/Tests/SDWebImageWebPCoderTests.m @@ -13,6 +13,19 @@ #import #import #import +#if __has_include("webp/decode.h") && __has_include("webp/encode.h") && __has_include("webp/demux.h") && __has_include("webp/mux.h") +#import "webp/decode.h" +#import "webp/encode.h" +#import "webp/demux.h" +#import "webp/mux.h" +#elif __has_include() && __has_include() && __has_include() && __has_include() +#import +#import +#import +#import +#else +@import libwebp; +#endif const int64_t kAsyncTestTimeout = 5; @@ -31,6 +44,12 @@ const int64_t kAsyncTestTimeout = 5; @property (nonatomic, assign) NSUInteger blendFromIndex; // The nearest previous frame index which blend mode is WEBP_MUX_BLEND @end +@interface SDImageWebPCoder () +- (void) updateWebPOptionsToConfig:(WebPConfig * _Nonnull)config + maxFileSize:(NSUInteger)maxFileSize + options:(nullable SDImageCoderOptions *)options; +@end + @implementation SDWebImageWebPCoderTests + (void)setUp {