Remove unused _enqueueAsyncSizingWithSentinel and asyncSizingQueue methods of ASDisplayNode

This commit is contained in:
Huy Nguyen 2016-04-15 22:08:15 +03:00
parent 402c5fe25a
commit a35647b200
2 changed files with 0 additions and 41 deletions

View File

@ -2599,19 +2599,6 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority";
_flags.isInHierarchy = inHierarchy;
}
+ (dispatch_queue_t)asyncSizingQueue
{
static dispatch_queue_t asyncSizingQueue = NULL;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
asyncSizingQueue = dispatch_queue_create("org.AsyncDisplayKit.ASDisplayNode.asyncSizingQueue", DISPATCH_QUEUE_CONCURRENT);
// we use the highpri queue to prioritize UI rendering over other async operations
dispatch_set_target_queue(asyncSizingQueue, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0));
});
return asyncSizingQueue;
}
- (BOOL)_hasTransitionsInProgress
{
ASDN::MutexLocker l(_propertyLock);
@ -2639,33 +2626,6 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority";
return [_transitionSentinel increment];
}
// Calls completion with nil to indicated cancellation
- (void)_enqueueAsyncSizingWithSentinel:(ASSentinel *)sentinel completion:(void(^)(ASDisplayNode *n))completion;
{
int32_t sentinelValue = sentinel.value;
// This is what we're going to use for sizing. Hope you like it :D
CGRect bounds = self.bounds;
dispatch_async([[self class] asyncSizingQueue], ^{
// Check sentinel before, bail early
if (sentinel.value != sentinelValue)
return dispatch_async(dispatch_get_main_queue(), ^{ completion(nil); });
[self measure:bounds.size];
// Check sentinel after, bail early
if (sentinel.value != sentinelValue)
return dispatch_async(dispatch_get_main_queue(), ^{ completion(nil); });
// Success; not cancelled
dispatch_async(dispatch_get_main_queue(), ^{
completion(self);
});
});
}
- (id<ASLayoutable>)finalLayoutable
{
return self;

View File

@ -75,7 +75,6 @@ for (ASDisplayNode *n in @[ nodes ]) {\
@interface ASDisplayNode (HackForTests)
+ (dispatch_queue_t)asyncSizingQueue;
- (id)initWithViewClass:(Class)viewClass;
- (id)initWithLayerClass:(Class)layerClass;