Commit Graph

3246 Commits

Author SHA1 Message Date
DreamPiggy 34f2a9b823
Merge pull request #3420 from dreampiggy/fix_5.13_retain_cycle_web_context
Quick fix the issue that UIImage.sd_decodeOptions cause retain cycle when pass custom cache in context option
2022-10-29 20:22:21 +08:00
DreamPiggy b46fe38c72 Quick fix the issue that UIImage.sd_decodeOptions cause retain cycle when pass custom cache in context option
Now the SDImageCoderWebImageContext does not pass the built-in options, only custom options will be passed, and deprecated in 5.14.0
2022-10-29 19:50:45 +08:00
DreamPiggy 9248fe561a Bumped version to 5.13.4
update CHANGELOG
2022-09-26 20:57:44 +08:00
DreamPiggy 3c7c949637
Merge pull request #3408 from dreampiggy/threadsafe_fix_imageio_incremental_animation
Fix the potential out of bounds crash for ImageIO incremental animation decoding (like GIF)
2022-09-26 20:55:27 +08:00
DreamPiggy 364034d11a Fix test cases `test15CancelQueryShouldCallbackOnceInSync` 2022-09-26 18:43:26 +08:00
DreamPiggy 080db1afb9 Try to investigate test case failure issue 2022-09-26 18:24:41 +08:00
DreamPiggy 9b2ddc9ea8 [NFC] A little optimization for MutableArray creation 2022-09-26 17:38:37 +08:00
DreamPiggy 347cf1d1cc Fix the potential out of bounds crash for ImageIO incremental animation decoding (like GIF)
This patch from the SDWebImageWebPCoder/pull/68
2022-09-26 17:32:25 +08:00
DreamPiggy 484bc774e1 Bumped version to 5.13.3
update CHANGELOG
2022-09-19 18:36:04 +08:00
DreamPiggy 9f9d226083
Merge pull request #3387 from dreampiggy/thread_safe_ios15_animation_cgimage_retain_source
Try to workaround iOS 15+ crash that CGImage retain the CGImageSource during animation image playing
2022-09-19 18:30:51 +08:00
DreamPiggy ea9f573744 Remove the temp assert code (for debugging usage) 2022-09-19 18:30:13 +08:00
DreamPiggy 89178a7d89 Update to force decode CGImage before any UIImage initialization on iOS 15+ 2022-09-19 18:30:13 +08:00
DreamPiggy 3994006cb4 Try to workaround iOS 15+ crash that CGImage retain the CGImageSource during animation image playing
This used to work on iOS 14
2022-09-19 18:30:13 +08:00
DreamPiggy 524d4f53eb
Merge pull request #3403 from dreampiggy/revert_isCancelled_block_with_recursive
Fix the crash because of SDWebImageCombinedOperation recursive lock
2022-09-19 18:20:06 +08:00
DreamPiggy 6b8075a2e1 Using the same synchornized to guard _cancelled status, which need recursive lock
DO NOT USE SD_LOCK (os_unfair_lock), which not support recursive
2022-09-19 17:33:04 +08:00
DreamPiggy ad592765cb Revert "Synchronise getter and setter of the cancelled property of the SDWebImageCombinedOperation in order to eliminate data race."
This reverts commit 5a18c84529.
2022-09-19 17:28:38 +08:00
DreamPiggy 122c3d7ca5
Merge pull request #3402 from dreampiggy/fix_macOS_animatedview_render
Fix the switching from animated image rendering to static image does not works on macOS 11+
2022-09-19 17:23:56 +08:00
DreamPiggy 61c3c5ba2d Fix the switching from animated image rendering to static image does not works on macOS 11+
We should always provide a fallback solution to handle built-in NSImageView logic
2022-09-19 16:27:21 +08:00
DreamPiggy d3b111deb1
Merge pull request #3401 from dreampiggy/fix_unlock_unbalanced
Fix the unbalanced lock which cause crash
2022-09-19 14:30:03 +08:00
DreamPiggy 6eb74a177f Fix the unbalanced lock which cause crash 2022-09-19 12:05:41 +08:00
DreamPiggy 3a6e01ab20
Merge pull request #3393 from alexander-gaidukov/synchronize_operation_cancellation
Synchronise getter and setter of the cancelled property of the SDWebImageCombinedOperation
2022-09-09 18:15:44 +08:00
Alexander Gaidukov 5a18c84529 Synchronise getter and setter of the cancelled property of the SDWebImageCombinedOperation in order to eliminate data race. 2022-09-06 21:08:25 +07:00
DreamPiggy 3e48cb68d8 Bumped version to 5.13.2
update CHANGELOG
2022-07-23 23:09:12 +08:00
DreamPiggy 7d7debbd26
Merge pull request #3380 from dreampiggy/bugfix_edge_case_cancel_cache_callback_twice
Fix the rare case when cancel an async disk cache query may cause twice callback
2022-07-23 23:04:55 +08:00
DreamPiggy bcaf918b83 Fix the old test case warning 2022-07-23 22:43:01 +08:00
DreamPiggy 62e3a8f52a Update test case about the cacheOperation and loaderOperation 2022-07-23 22:31:52 +08:00
DreamPiggy 3d1197b820 When download start, mark the query cache operation finished to avoid bug behavior 2022-07-23 21:59:14 +08:00
DreamPiggy 2729096221 Added test case `test15CancelQueryShouldCallbackOnceInSync` 2022-07-23 21:26:18 +08:00
DreamPiggy 0643cb81c3 Fix the rare case when cancel an async disk cache query may cause twice callback
One is sync and another is async
2022-07-23 21:15:00 +08:00
DreamPiggy b88d576f75
Merge pull request #3379 from amonshiz/patch-1
Fix pragma mark typo
2022-07-23 16:39:13 +08:00
Andrew Monshizadeh 2bad528bfb
Fix pragma mark typo
Built and noticed this warning
```
external/SDWebImage/SDWebImage/Core/NSButton+WebCache.m:152:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma mar - Private
        ^
```
2022-07-22 21:49:09 -06:00
DreamPiggy cc1995b738 Bumped version to 5.13.1
update CHANGELOG
2022-07-16 19:54:13 +08:00
DreamPiggy 7269107908
Merge pull request #3373 from dreampiggy/fix_clang_analyze_issue
Fix the clang analyze issue
2022-07-16 19:46:17 +08:00
DreamPiggy 0757241822 Fix the clang analyze issue 2022-07-16 19:43:48 +08:00
DreamPiggy d0f3c39335
Merge pull request #3368 from dreampiggy/optimize_force_decode_solution
Added `SDImageCoder.defaultDecodeSolution` to control the force decode solution. Automatic by default
2022-07-16 19:33:46 +08:00
DreamPiggy a88e669422 Added SDImageCoderDecodeSolutionAutomatic, which check image format as well
This avoid the unwanted CMPhoto log
2022-07-16 18:03:11 +08:00
DreamPiggy 213a8b8def Added `SDImageCoder.defaultDecodeSolution` to control the force decode solution, defaults to CoreGraphics (the same as 5.12)
For user who want new UIKit solution, you can opt-in to change the `defaultDecodeSolution` case
2022-07-16 18:03:11 +08:00
DreamPiggy ff6b3b9bb5 Change only ImageIO decoded CGImage should enter the `Force Decode` logic
Others coder, like WebP, should not use this approach
2022-07-16 18:03:11 +08:00
DreamPiggy 3277824d43
Merge pull request #3372 from dreampiggy/bugfix_color_at_point_grayscale
Fix sd_colorAtPoint and sd_colorsWithRect support for grayscale image (white and alpha)
2022-07-16 18:01:54 +08:00
DreamPiggy 1ed76f4f47 Fix the bitmapInfo support for greyscale color, update test case 2022-07-16 17:43:48 +08:00
DreamPiggy 34236ac522 Fix sd_colorAtPoint and sd_colorsWithRect support for grayscale image (white and alpha)
This fix the test cases for #3368
2022-07-16 17:27:04 +08:00
DreamPiggy 4d4e631183
Merge pull request #3370 from dreampiggy/bugfix_pdf_draw_bitmap_dpi
Fix the PDF image without thumbnailPixelSize will result huge bitmap size, now fixed into 72 DPI matching PDFKit
2022-07-14 15:24:11 +08:00
DreamPiggy 2fe3879b15 Fix the case that provided DPI cause `kCGImagePropertyPixelWidth` return non-zero value
This will cause re-check thumbnail, and may result the wrong pixel size
2022-07-14 14:52:26 +08:00
DreamPiggy f1fe4ca8b8 Calculate the DPI based on PDF mediaBox, support thumbnailPixelSize
Move the vector code from ImageIOAnimatedCoder to ImageIOCoder, since it's not animatable :)
2022-07-13 18:18:21 +08:00
DreamPiggy f91d35ef8d Fix the PDF image without thumbnailPixelSize will result huge bitmap size, now fixed into 72 DPI matching PDFKit 2022-07-13 16:04:29 +08:00
DreamPiggy c4b8660bb3 Bumped version to 5.13.0
update CHANGELOG
2022-06-27 02:37:44 +08:00
DreamPiggy 0805bc0f4d
Merge pull request #3364 from dreampiggy/bugfix_thumbnail_full_loading_same_time_cache_issue
Fix the issue when thumbnail and full size loading at the same time, the thumbnail image will write to memory with wrong key
2022-06-27 02:33:45 +08:00
DreamPiggy 3358859b46 Fix the issue when thumbnail first and full size loading at the same time, the thumbnail image will write to memory with wrong key
The disk cache key is correct and does not get effected by this issue
2022-06-27 02:17:48 +08:00
DreamPiggy 282714883e Update the Demo project 2022-06-26 23:55:12 +08:00
DreamPiggy 16cf157658
Merge pull request #3363 from dreampiggy/fix_multiple_cancel_cache_callback_order
Fix the case when user cancel the image loading for same URL in sequence cause placeholder mass
2022-06-26 23:52:55 +08:00