[ASDisplayNode] Improve locking in ASDisplayNode (#3172)

* Improve locking in ASDisplayNode

* Address first bunch of comments

* Changed `view` and `layer` methods for locking

* Adress comments
This commit is contained in:
Michael Schneider
2017-03-14 07:27:34 -07:00
committed by GitHub
parent b1cfd76cee
commit e6ee24debc
5 changed files with 310 additions and 239 deletions

View File

@@ -200,9 +200,6 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
/// Bitmask to check which methods an object overrides.
@property (nonatomic, assign, readonly) ASDisplayNodeMethodOverrides methodOverrides;
// Swizzle to extend the builtin functionality with custom logic
- (BOOL)__shouldLoadViewOrLayer;
/**
* Invoked before a call to setNeedsLayout to the underlying view
*/
@@ -218,11 +215,6 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
*/
- (void)__layout;
/*
* Internal method to set the supernode
*/
- (void)__setSupernode:(nullable ASDisplayNode *)supernode;
/**
* Internal method to add / replace / insert subnode and remove from supernode without checking if
* node has automaticallyManagesSubnodes set to YES.
@@ -241,7 +233,7 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo
- (void)__decrementVisibilityNotificationsDisabled;
/// Helper method to summarize whether or not the node run through the display process
- (BOOL)__implementsDisplay;
- (BOOL)_implementsDisplay;
/// Display the node's view/layer immediately on the current thread, bypassing the background thread rendering. Will be deprecated.
- (void)displayImmediately;