mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-16 08:52:04 +00:00
Complete merge of working window removal with ASHierarchyState changes in master.
This commit is contained in:
parent
00fe336ae7
commit
872b3588d8
@ -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);
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user