Skip to content

Instantly share code, notes, and snippets.

@appleguy
Created April 30, 2017 00:33
Show Gist options
  • Save appleguy/9b7c325b1678d27312f33abaea21d2ce to your computer and use it in GitHub Desktop.
Save appleguy/9b7c325b1678d27312f33abaea21d2ce to your computer and use it in GitHub Desktop.
typedef NS_OPTIONS(NSUInteger, ASDisplayNodeMethodOverrides)
{
ASDNFlagSynchronous = 0,
ASDNFlagLayerBacked = 1 << 0,
};
#define isSynchronous _atomicFlags.fetch_or(ASDNFlagSynchronous)
#define isLayerBacked _atomicFlags.fetch_or(ASDNFlagLayerBacked)
@interface ASDisplayNode ()
{
@package
_ASPendingState *_pendingViewState;
UIView *_view;
CALayer *_layer;
std::atomic<uint_least32_t> _atomicFlags;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment