Initial experimental commit with functioning preloading, without the working window.

This commit is contained in:
Scott Goodson
2015-11-08 12:56:17 -08:00
committed by Scott Goodson
parent 771eca5083
commit 7f59beb195
6 changed files with 56 additions and 10 deletions

View File

@@ -665,7 +665,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
[self _addSubnodeViewsAndLayers];
}
[self recursivelyDisplayImmediately];
[self recursivelyEnsureDisplay];
}
}
@@ -1454,8 +1454,8 @@ void recursivelyEnsureDisplayForLayer(CALayer *layer)
- (void)recursivelyEnsureDisplay
{
ASDisplayNodeAssertMainThread();
ASDisplayNodeAssert(self.isNodeLoaded, @"Node must have layer or view loaded to use -recursivelyEnsureDisplay");
ASDisplayNodeAssert(self.inHierarchy && (self.isLayerBacked || self.view.window != nil), @"Node must be in a hierarchy to use -recursivelyEnsureDisplay");
// ASDisplayNodeAssert(self.isNodeLoaded, @"Node must have layer or view loaded to use -recursivelyEnsureDisplay");
// ASDisplayNodeAssert(self.inHierarchy && (self.isLayerBacked || self.view.window != nil), @"Node must be in a hierarchy to use -recursivelyEnsureDisplay");
CALayer *layer = self.layer;
// -layoutIfNeeded is recursive, and even walks up to superlayers to check if they need layout,