Working range window#371
Conversation
b9e33f8 to
c357e70
Compare
|
Let's move the [node recursivelySetDisplaySuspended:NO];call out of the range controller and into ASRangeHandlerRender, then land this! |
c357e70 to
686e920
Compare
|
Also making a note from @appleguy that thrashing a |
|
Yup — the hierarchy manipulation thrash is specifically why we wanted to kill the rendering-window hack. We're going to have to either convert the render range to "continuously re-display everything as needed" (matching the rendering window behaviour) or set up something like the state machine described in #315, so nodes can know whether they're supposed to render themselves once preload data arrives. |
There was a problem hiding this comment.
just to be absolutely safe, can we add an ASDisplayNodeAssertMainThread() here?
|
Two tiny nits, then we're good to merge. =] |
This brings back the concept of a window store for nodes that are in the working range (reverting #127). It turns out that due to the system architecture if there are nodes who fetch remote content (e.g. `ASNetworkImageNode`), calls to `-display` will occur before fetching has been completed. The next chance the nodes have to decode and display content is then when they are actually on the screen, thus defeating the purpose of a working range. With the reintroduction of the working range window, nodes are "stored" in the window and when content is finished being fetched, CA triggers `-display` since they are part of a view hierarchy. This can be tested in the Kittens project by insuring that before `ASRangeController` adds a node to [a visible view](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/ASRangeController.mm#L57) that the image node (with remote content) has set its layer's contents.
686e920 to
0b19be0
Compare
|
Nits have been picked! |
Contet -> Context
This brings back the concept of a window store for nodes that are in the working range (reverting #127). It turns out that due to the system architecture if there are nodes who fetch remote content (e.g.
ASNetworkImageNode), calls to-displaywill occur before fetching has been completed. The next chance the nodes have to decode and display content is then when they are actually on the screen, thus defeating the purpose of a working range.With the reintroduction of the working range window, nodes are "stored" in the window and when content is finished being fetched, CA triggers
-displaysince they are part of a view hierarchy.This can be tested in the Kittens project by insuring that before
ASRangeControlleradds a node to a visible view that the image node (with remote content) has set its layer's contents.