Simplify measure call structure

This commit is contained in:
Levi McCallum
2016-02-01 17:49:47 -08:00
parent 7a3987a467
commit 3abe6d9181
2 changed files with 2 additions and 9 deletions
+1 -6
View File
@@ -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;
@@ -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;