Improve Handling of Rasterized Node Interface & Hierarchy States (#2731)

* Improve handling of rasterize node interface states and testing

* Fix harder

* Finish fixes and move rasterization flag into beta header

* Re-enable rasterization in ASDKgram

* Re-enable working test

* Only do it in debug
This commit is contained in:
Adlai Holler
2016-12-08 09:52:21 -08:00
committed by GitHub
parent 016d99f420
commit 5b80a641af
10 changed files with 190 additions and 102 deletions

View File

@@ -416,28 +416,6 @@ extern NSInteger const ASDefaultDrawingPriority;
*/
@property (nonatomic, assign) BOOL displaysAsynchronously;
/**
* @abstract Whether to draw all descendant nodes' layers/views into this node's layer/view's backing store.
*
* @discussion
* When set to YES, causes all descendant nodes' layers/views to be drawn directly into this node's layer/view's backing
* store. Defaults to NO.
*
* If a node's descendants are static (never animated or never change attributes after creation) then that node is a
* good candidate for rasterization. Rasterizing descendants has two main benefits:
* 1) Backing stores for descendant layers are not created. Instead the layers are drawn directly into the rasterized
* container. This can save a great deal of memory.
* 2) Since the entire subtree is drawn into one backing store, compositing and blending are eliminated in that subtree
* which can help improve animation/scrolling/etc performance.
*
* Rasterization does not currently support descendants with transform, sublayerTransform, or alpha. Those properties
* will be ignored when rasterizing descendants.
*
* Note: this has nothing to do with -[CALayer shouldRasterize], which doesn't work with ASDisplayNode's asynchronous
* rendering model.
*/
@property (nonatomic, assign) BOOL shouldRasterizeDescendants;
/**
* @abstract Prevent the node's layer from displaying.
*