From 3abe6d9181c2d3ea8ed4c7da3d4fbdb05a1be6fc Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Sun, 31 Jan 2016 20:59:59 -0800 Subject: [PATCH] Simplify measure call structure --- AsyncDisplayKit/ASDisplayNode.mm | 7 +------ AsyncDisplayKit/Private/ASDisplayNodeInternal.h | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index a3a572f570..4d57bf1a48 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -596,14 +596,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize -{ - ASDN::MutexLocker l(_propertyLock); - return [self __measureWithSizeRange:constrainedSize]; -} - -- (ASLayout *)__measureWithSizeRange:(ASSizeRange)constrainedSize { ASDisplayNodeAssertThreadAffinity(self); + ASDN::MutexLocker l(_propertyLock); if (![self __shouldSize]) return nil; diff --git a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h index d688289e15..4b72f2c097 100644 --- a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h +++ b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h @@ -131,9 +131,7 @@ typedef NS_OPTIONS(NSUInteger, ASDisplayNodeMethodOverrides) - (BOOL)__shouldLoadViewOrLayer; - (BOOL)__shouldSize; -// Core implementation of -measureWithSizeRange:. Must be called with _propertyLock held. -- (ASLayout *)__measureWithSizeRange:(ASSizeRange)constrainedSize; - +// Invoked by a call to setNeedsLayout to the underlying view - (void)__setNeedsLayout; - (void)__layout; - (void)__setSupernode:(ASDisplayNode *)supernode;