From a35647b20011bf0445a66c66c9452d6553207346 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Fri, 15 Apr 2016 22:08:15 +0300 Subject: [PATCH] Remove unused _enqueueAsyncSizingWithSentinel and asyncSizingQueue methods of ASDisplayNode --- AsyncDisplayKit/ASDisplayNode.mm | 40 ----------------------- AsyncDisplayKitTests/ASDisplayNodeTests.m | 1 - 2 files changed, 41 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index cf4c820f2a..d5f37c5ec1 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -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)finalLayoutable { return self; diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index 213923f42d..36b01040bf 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -75,7 +75,6 @@ for (ASDisplayNode *n in @[ nodes ]) {\ @interface ASDisplayNode (HackForTests) -+ (dispatch_queue_t)asyncSizingQueue; - (id)initWithViewClass:(Class)viewClass; - (id)initWithLayerClass:(Class)layerClass;