Skip to content

Commit 8bc65a9

Browse files
author
Scott Goodson
committed
A few more debug changes for the removal of the working window.
1 parent 9669f14 commit 8bc65a9

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

AsyncDisplayKit/ASDisplayNode.mm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ - (CGSize)measure:(CGSize)constrainedSize
586586

587587
- (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize
588588
{
589+
NSLog(@"About to measure lock for %@", self);
589590
ASDN::MutexLocker l(_propertyLock);
590591
return [self __measureWithSizeRange:constrainedSize];
591592
}
@@ -666,6 +667,7 @@ - (void)setDisplaysAsynchronously:(BOOL)displaysAsynchronously
666667
- (BOOL)shouldRasterizeDescendants
667668
{
668669
ASDisplayNodeAssertThreadAffinity(self);
670+
NSLog(@"About to descendants lock for %p, %@", self, [self class]);
669671
ASDN::MutexLocker l(_propertyLock);
670672
return _flags.shouldRasterizeDescendants;
671673
}
@@ -722,6 +724,7 @@ - (void)displayImmediately
722724
- (void)recursivelyDisplayImmediately
723725
{
724726
ASDN::MutexLocker l(_propertyLock);
727+
725728
for (ASDisplayNode *child in _subnodes) {
726729
[child recursivelyDisplayImmediately];
727730
}
@@ -730,12 +733,12 @@ - (void)recursivelyDisplayImmediately
730733

731734
- (void)__setNeedsDisplay
732735
{
736+
ASDN::MutexLocker l(_propertyLock);
737+
NSLog(@"About to find parent rasterize for %@", self);
733738
ASDisplayNode *rasterizedContainerNode = [self __rasterizedContainerNode];
734739
if (rasterizedContainerNode) {
735740
[rasterizedContainerNode setNeedsDisplay];
736741
} else {
737-
[_layer setNeedsDisplay];
738-
739742
if (_layer && !self.isSynchronous && self.displaysAsynchronously) {
740743
[ASDisplayNode scheduleNodeForDisplay:self];
741744
}

AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,8 @@ - (void)__setSafeFrame:(CGRect)rect
219219
- (void)setNeedsDisplay
220220
{
221221
_bridge_prologue;
222-
// Send the message to the layer first, as __setNeedsDisplay may call -displayIfNeeded.
223-
// REVIEW: Audit if this is necessary or if it can be called after like __setNeedsLayout
224-
// -> Likely possible because of the aggregation / trampoline to occur on a later runloop.
225-
_messageToLayer(setNeedsDisplay);
222+
// Send the message to the view/layer first, as __setNeedsDisplay may call -displayIfNeeded.
223+
_messageToViewOrLayer(setNeedsDisplay);
226224
[self __setNeedsDisplay];
227225
}
228226

0 commit comments

Comments
 (0)