Commit Graph

114 Commits

Author SHA1 Message Date
DreamPiggy b9ec481edf Remove the extra calculation of image orientation for ImageIO coder 2018-04-10 21:19:12 +08:00
DreamPiggy 22c293738a Update the progressive coder/ animated coder init API, which pass the options to support extensibility 2018-04-09 13:42:52 +08:00
DreamPiggy cbf8581696 Fix the scale factor issue on macOS using helper methods to match the behavior of UIKit. Also remove the unused API on NSImage category 2018-04-08 19:54:39 +08:00
DreamPiggy 1d7dba33f5 Update the test about download operation, which using protocol instead of class 2018-04-05 15:25:14 +08:00
DreamPiggy 73c811dc23 Fix all code tied with SDWebImageDownloaderOperation class but not protocol, which previously relay on NSURLSession but it should not to be 2018-04-05 07:26:50 +08:00
DreamPiggy 793b7e33a8 Update the custom downloader operation to fix test 2018-04-05 06:06:01 +08:00
DreamPiggy be36009d10 Update the test for custom download operation class. 2018-04-05 00:15:53 +08:00
DreamPiggy c3892d7d08 Move all download settings into SDWebImageDownloaderConfig, make it more easy to use with clear API.
Deprecate `createNewSessionWithConfiguration`, which make downloader not sync with URLSession. If user need to specify sharedDownloader config, just modify the defaultDownloaderConfig instead.
2018-04-05 00:15:53 +08:00
DreamPiggy 6bdcf63224 Fix the test build 2018-04-03 02:07:59 +08:00
DreamPiggy 8236dee202 Move the context arg after the `options` arg to make Swift ABI clear. Also update all view category to support context arg. 2018-04-02 03:24:23 +08:00
DreamPiggy 851ee7d372 Update the prefetcher test case naming 2018-04-01 00:11:15 +08:00
DreamPiggy bc164d6369 Fix prefetcher thread-safe problem using stdatomic instead of OSAtomic. Also fix test. 2018-03-31 21:44:53 +08:00
DreamPiggy 5da5ec92fb Add the test for APNG coder 2018-03-29 17:59:32 +08:00
DreamPiggy a6d61c409d Fix compile issue and test 2018-03-25 20:44:41 +08:00
DreamPiggy 5e09c6bf19 Add support for imageNamed: in SDAnimatedImage with bundle files 2018-03-25 17:32:48 +08:00
DreamPiggy 7e83d78ca3 Add tests about SDAnimatedImage SDAnimatedImageView and SDAnimatedImage+WebCache 2018-03-25 17:32:48 +08:00
DreamPiggy f94dd00c52 Use the context arg to pass the SDAnimatedImage class to create the instance by image cache and downloader.
Also enhance view category to support firstFrameOnly, scaleFactor and preload
2018-03-25 17:29:11 +08:00
DreamPiggy 87bbcdc46f Introduce SDAnimatedImage and SDAnimatedImageView for high performance animated image rendering on iOS & macOS 2018-03-25 17:23:12 +08:00
DreamPiggy ec7927b25a Update the transformer to use as immutable class. Move the tests into SDWebImageTransformerTests 2018-03-23 15:48:58 +08:00
DreamPiggy ed0100c323 Move the NSBezierPath and UIColor category into implementation because it's now for internal use only 2018-03-18 23:00:35 +08:00
DreamPiggy 67285ee722 Add the test for transformer property 2018-03-17 22:31:28 +08:00
DreamPiggy a2076d362e Add sd_colorsWithRect method and test, treat RGB color with default alpha 1.0 2018-03-17 21:18:20 +08:00
DreamPiggy 3e3ec8d513 Change the hex color from 0x00000000 format to #00000000 2018-03-17 21:18:20 +08:00
DreamPiggy aea81791ec Fix the test on macOS. Fix the issue when using rounded corner 2018-03-17 21:18:20 +08:00
DreamPiggy d0df01bec1 Complete the 8 tests for all image transform methods, well done 2018-03-17 21:18:19 +08:00
DreamPiggy c9dfe39e36 Change all sharedInstance from method to class property 2018-03-11 16:08:33 +08:00
DreamPiggy e0ad0711da Mark two set method in SDWebImageDownloader as property 2018-03-11 15:53:18 +08:00
DreamPiggy 69bc9cbd2c Update the prefetcher test to ensure that prefetch different urls works and the delegate methods work 2018-02-22 13:38:39 +08:00
DreamPiggy 90632d0abc Fix prefetcher test to first clear the disk cache, and manager test to only fulfill the finished one 2018-02-20 20:58:39 +08:00
DreamPiggy 57e56d0154 Fix the test because one header file not available on iOS. Tests header search path is different from main project 2018-02-20 02:38:14 +08:00
DreamPiggy 9d78dccac7 Add tests scheme for macOS. Because we now support cross-platform, some implementation is different from UIKit & AppKit. So we also need test 2018-02-20 00:49:25 +08:00
DreamPiggy 150affd201 Add new SDCategoriesTests for any other WebCache category tests 2018-02-19 20:38:55 +08:00
DreamPiggy 1f27d3c15f Rename SDCategoriesTests to SDWebCacheCategoriesTests to make it focus on view category, import KVOController instead of build-in KVO for test 2018-02-19 20:19:14 +08:00
DreamPiggy f115830f97 Fix test again about typo 2018-02-13 21:54:21 +08:00
DreamPiggy d6a3e2c1ae Change the context arg to init method because it should be readonly after created 2018-02-07 19:59:00 +08:00
DreamPiggy 5000e8095b Fix the test for CustomDownloaderOperation 2018-01-26 00:02:01 +08:00
DreamPiggy edd26fc1e6 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Add protect to some Core Graphics methods
  Change all UIImage init method to alloc instead of autorelease to immediately release it after usage
  Add a option SDWebImageFromCacheOnly to load the image from cache only and prevent network
  Update the test for custom operation interface
  Use synchronized instead of semaphore in SDWebImageDownloader to make it more easy to understand :)
  Use a lock instead of barrier queue to avoid dispatch_sync blocking the main queue on race condition
2018-01-23 11:51:49 +08:00
DreamPiggy 82c44e275a Update the test 2018-01-22 21:54:12 +08:00
DreamPiggy aac654b069 Update the test for custom operation interface 2018-01-21 11:11:46 +08:00
DreamPiggy 46a55ba6c7 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Update the test and description to make it more clear
  Fix the issue that `setAnimationImagesWithURLs` weak reference may dealloc before the animated images was set
  Fix the strange file permissions issue
  Add the SDImageCacheQueryMemoryOnly to specify query memory only
  Update the cache options name to make it more clear
  Added missing param in storeImage examples
  Add a NSProgress property represent the image loading progress, this allow user add KVO on it for complicated logic
2018-01-17 19:22:54 +08:00
DreamPiggy 3f3a309fb4 Update the test and description to make it more clear 2018-01-16 11:34:56 +08:00
DreamPiggy 1ef45bace1 Add a NSProgress property represent the image loading progress, this allow user add KVO on it for complicated logic 2018-01-13 22:34:58 +08:00
DreamPiggy db5307eb94 Change our imageCache `storeImageDataToDisk` to internal use IO-queue. And also change error from POSIX errno to Cocoa file error 2018-01-03 15:21:02 +08:00
DreamPiggy caafe27937 Upgrade target deployment version to iOS 8.0 / macOS 10.10 2018-01-01 13:15:51 +08:00
DreamPiggy 8a8d661ea7 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Adopt the current requirement, change ImageIO coder's canDeocdeFromHEIC to actual implementation
  Fix Clang Static Analyzer warning for number nil check from Xcode 9.2
2017-12-29 22:57:32 +08:00
DreamPiggy 8b3c4c2cde Fix Clang Static Analyzer warning for number nil check from Xcode 9.2 2017-12-29 12:52:29 +08:00
DreamPiggy f2888f799c Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage: (25 commits)
  When store image with no data for SDImageCache, check whether it contains alpha to use PNG or JPEG format
  Fix the way remove all elements from pointer array
  Remove some unused code, fix typo, update the comments
  Use a weak pointerArray to store the operations for sd_setAnimationImagesWithURLs, avoid extra retain of operation instance
  Use a copy-weak maptable for operations stored in UIView(WebCacheOperation) category to avoid retain of operation, and also use lock to keep thread-safe
  Fix progressive WebP decoding by creating data provider with actual data size
  Add a SDWebImageExternalCustomManagerKey context arguments to allow user to custom image manager for UIView category to avoid build from scratch
  Check the group instance before calling group leave
  Remove the out-dated compatible code for non-ARC
  Update the comments
  Allow custom SDWebImageDownloaderOperation to handle HTTP redirect
  Update the comments for that SDWebImageInternalSetImageGroupKey key
  Fix potential thread-safe problem in SDWebImagePrefetcher by keeping all access through prefetcher queue and retain the local URLs firstly
  Update the comments and remove the unnecessary main queue check
  Follow Apple doc and remove that manual calculation of byte alignment to make it more universal for different architecture device
  Change prefetchURLs from nonatomic to atomic to avoid multi-thread access crash
  capture currentURL instead of using index to access to avoid race condition
  Grab the poster image instead of image itself to avoid an UIAnimatedImage been set
  Update the documents
  Update tests to invalidate session after usage
  ...
2017-12-22 21:06:48 +08:00
DreamPiggy a7c8ce5864 Update tests to invalidate session after usage 2017-11-27 00:37:20 +08:00
Bogdan Poplauschi ab06d2370b Merge branch 'master' into 5.x 2017-10-27 10:17:44 +03:00
Bogdan Poplauschi 04855c945e Merge pull request #2061 from dvkch/master
Cached image filename are sometimes generated with invalid path extensions
2017-10-21 17:15:11 +03:00