[_ASAsyncTransaction] implement operation priority

Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
This commit is contained in:
Matej Knopp
2016-01-26 15:31:40 +01:00
parent 75abf07c6f
commit 0a45bd9596
6 changed files with 168 additions and 14 deletions

View File

@@ -66,6 +66,11 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
ASInterfaceStateInHierarchy = ASInterfaceStateMeasureLayout | ASInterfaceStateFetchData | ASInterfaceStateDisplay | ASInterfaceStateVisible,
};
/**
* Default drawing priority for display node
*/
extern NSUInteger const ASDefaultDrawingPriority;
/**
* An `ASDisplayNode` is an abstraction over `UIView` and `CALayer` that allows you to perform calculations about a view
* hierarchy off the main thread, and could do rendering off the main thread as well.
@@ -475,6 +480,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, assign) NSTimeInterval placeholderFadeDuration;
/**
* @abstract Determines drawing priority of the node. Nodes with higher priority will be drawn earlier.
*
* @discussion Defaults to ASDefaultDrawingPriority. There may be multiple drawing threads, and some of them may
* decide to perform operations in queued order (regardless of drawingPriority)
*/
@property (nonatomic, assign) NSUInteger drawingPriority;
/** @name Hit Testing */