[ASDisplayNode] Add -displayWillStartAsynchronously: method to allow skipping synchronous image cache check. (#2344)

This commit is contained in:
appleguy
2016-10-05 09:48:54 -07:00
committed by Adlai Holler
parent b928e79cb5
commit 3f1f5667c3
5 changed files with 12 additions and 8 deletions

View File

@@ -249,11 +249,11 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
/* displayWillStart in ASMultiplexImageNode has a very similar implementation. Changes here are likely necessary
in ASMultiplexImageNode as well. */
- (void)displayWillStart
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
{
[super displayWillStart];
[super displayWillStartAsynchronously:asynchronously];
if (_cacheFlags.cacheSupportsSynchronousFetch) {
if (asynchronously == NO && _cacheFlags.cacheSupportsSynchronousFetch) {
ASDN::MutexLocker l(__instanceLock__);
if (_imageLoaded == NO && _URL && _downloadIdentifier == nil) {
UIImage *result = [[_cache synchronouslyFetchedCachedImageWithURL:_URL] asdk_image];