Complete merge of working window removal with ASHierarchyState changes in master.

This commit is contained in:
Scott Goodson 2015-12-11 22:15:13 -08:00
parent 00fe336ae7
commit 872b3588d8
3 changed files with 12 additions and 14 deletions

View File

@ -742,20 +742,6 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
[self displayImmediately];
}
- (void)__setNeedsDisplay
{
ASDN::MutexLocker l(_propertyLock);
//NSLog(@"About to find parent rasterize for %@", self);
ASDisplayNode *rasterizedContainerNode = [self __rasterizedContainerNode];
if (rasterizedContainerNode) {
[rasterizedContainerNode setNeedsDisplay];
} else {
if (_layer && !self.isSynchronous && self.displaysAsynchronously) {
[ASDisplayNode scheduleNodeForDisplay:self];
}
}
}
- (void)__setNeedsLayout
{
ASDisplayNodeAssertThreadAffinity(self);

View File

@ -240,7 +240,17 @@
[rasterizedContainerNode setNeedsDisplay];
});
} else {
// If not rasterized (and therefore we certainly have a view or layer),
// Send the message to the view/layer first, as scheduleNodeForDisplay may call -displayIfNeeded.
// Wrapped / synchronous nodes created with initWithView/LayerBlock: do not need scheduleNodeForDisplay,
// as they don't need to display in the working range at all - since at all times onscreen, one
// -setNeedsDisplay to the CALayer will result in a synchronous display in the next frame.
_messageToViewOrLayer(setNeedsDisplay);
if (_layer && !self.isSynchronous) {
[ASDisplayNode scheduleNodeForDisplay:self];
}
}
}

View File

@ -108,6 +108,8 @@ typedef NS_OPTIONS(NSUInteger, ASDisplayNodeMethodOverrides)
}
+ (void)scheduleNodeForDisplay:(ASDisplayNode *)node;
// The _ASDisplayLayer backing the node, if any.
@property (nonatomic, readonly, retain) _ASDisplayLayer *asyncLayer;