Improvements to the efficiency of recursivelySetInterfaceState: and the beta range controller.

This commit is contained in:
Scott Goodson
2016-01-10 02:33:34 -08:00
parent 03d13b19b0
commit 0feaa2a368
9 changed files with 103 additions and 47 deletions

View File

@@ -12,6 +12,23 @@
#import <AsyncDisplayKit/ASBaseDefines.h>
#import <AsyncDisplayKit/ASDisplayNode.h>
// Because inline methods can't be extern'd and need to be part of the translation unit of code
// that compiles with them to actually inline, we both declare and define these in the header.
inline BOOL ASInterfaceStateIncludesVisible(ASInterfaceState interfaceState)
{
return ((interfaceState & ASInterfaceStateVisible) == ASInterfaceStateVisible);
}
inline BOOL ASInterfaceStateIncludesDisplay(ASInterfaceState interfaceState)
{
return ((interfaceState & ASInterfaceStateDisplay) == ASInterfaceStateDisplay);
}
inline BOOL ASInterfaceStateIncludesFetchData(ASInterfaceState interfaceState)
{
return ((interfaceState & ASInterfaceStateFetchData) == ASInterfaceStateFetchData);
}
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN