Commit Graph
377 Commits
Author SHA1 Message Date
Levi McCallum 924e72f774 Mark setup placeholder method as private 2016-02-01 17:49:47 -08:00
Levi McCallum 3abe6d9181 Simplify measure call structure 2016-02-01 17:49:47 -08:00
Levi McCallum 29609bfe87 Clean up long lines 2016-02-01 17:49:47 -08:00
Levi McCallum 561ae212d9 Wrap implicit hierarchy management in a class enable bit 2016-02-01 17:49:47 -08:00
Levi McCallum b2843d29c4 Allow any node to be identified in the flattened predicate search 2016-02-01 17:49:47 -08:00
Levi McCallum 184d1fc059 Switch layout flatten to BFS for node ordering 2016-02-01 17:49:47 -08:00
Huy Nguyen b889d81de8 Don't pre-render cell nodes of collection view when it is not visible or not scrolling 2016-01-31 00:53:28 -08:00
Garrett Moon 35fb3d2ae6 Allow images returned by placeholderImage to be stretchable 2016-01-29 14:45:18 -08:00
Garrett Moon 01c1680904 Switch to instance methods of draw and display
This patch switches to instance methods of draw and display for
ASTextNode and ASImageNode to attempt to increase their performance.

It also fixes some thread safety issues in ASImageNode which appear
to have been regressions (though probably not hit very often).

And it sets up work for allowing modification of CGContexts before
and after a node's contents are drawn.
2016-01-27 20:08:02 -08:00
Levi McCallum ee23830318 Remove setNeedsDataFetch queuing, as interfaceState always performs fetch on re-enter 2016-01-27 18:25:39 -08:00
Levi McCallum 585b1215a9 Recursively fetchData for requests 2016-01-27 17:19:11 -08:00
Levi McCallum ec7a3599bd Add setNeedsDataFetch method to queue off screen fetchData calls 2016-01-27 14:52:37 -08:00
Matej Knopp da5f7eccd9 [_ASAsyncTransaction] make priority a NSInteger with default to 0
Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
2016-01-27 00:37:27 +01:00
Matej Knopp 0a45bd9596 [_ASAsyncTransaction] implement operation priority
Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
2016-01-26 15:31:40 +01:00
Scott Goodson e0e019ebcb [ASRangeController] Enable new range controller by default (!!! yay !!!) 2016-01-24 22:50:36 -08:00
Scott Goodson 2713bdd72e [ASTextNode, ASDisplayNode] Create -calculatedLayoutDidChange and use it in text node.
This allows the change in size for the NSTextContainer to occur off the main thread, whenever that size change
is necessary.  Then the text relayout can occur earlier, during the process of computing ASLayoutSpecs.
2016-01-24 17:14:14 -08:00
Aaron Schubert 28b03e3a28 [tvOS] Expose UIFocusEnvironment Protocol methods to ASDisplayNode 2016-01-13 10:09:44 +00:00
Scott Goodson 0feaa2a368 Improvements to the efficiency of recursivelySetInterfaceState: and the beta range controller. 2016-01-10 02:40:47 -08:00
Scott Goodson b273f358f5 [ASRangeController] Initial implementation of functional-style, ASInterfaceState-based range controller. 2016-01-01 00:48:44 -08:00
Scott Goodson df3ce787f7 Ensure that the uncommon __unloadNode codepath does not unintentionally trigger node removal. 2015-12-29 23:11:33 -08:00
Scott Goodson 55861b3de1 Update the expectations of the tests now that the clearContents behavior is corrected. 2015-12-27 16:37:33 -08:00
Scott Goodson 93498d8240 [ASDisplayNode] Preserve contents after non-range-managed nodes are removed from superviews or windows.
This behavior changed in 1.9.3 and introduced flickering in some cases.  Preserving the contents is closer to UIKit behavior.
2015-12-27 15:35:43 -08:00
Scott Goodson 4b560a703a PR #1000 on GitHub! Provide a Beta API to enable the new, high efficiency render-ahead mechanism. 2015-12-26 16:34:44 -08:00
Scott Goodson a1429ea23b Add ability to enable new rendering range with a class method in ASDisplayNode+Beta.h 2015-12-26 14:22:24 -08:00
Scott Goodson a2cf2a88e6 Overhaul header files / includes to eliminate circular references that Xcode 7 is angry about. 2015-12-25 19:22:00 -08:00
Scott Goodson af74f4a1c2 Fix the AsyncDisplayKit tests under Xcode 7! Workaround for unfixed Apple bug with @dynamic on CALayer. 2015-12-25 14:01:18 -08:00
Scott Goodson 928c440b4c Several small optimizations, especially to _ASPendingState and other hot paths. 2015-12-23 16:38:33 -08:00
Scott Goodson 065625f246 Make ASCollectionView always create an ASCollectionNode. Add visibilityDidChange:, interfaceStateDidChange:fromState: 2015-12-22 21:46:46 -08:00
appleguy d7492b331f Merge pull request #968 from facebook/LockHandlingOnRemoveFromSupernode
[ASDisplayNode] Release the lock before setting supernode pointer to nil, in case we are deallocated.
2015-12-21 20:55:54 -08:00
appleguy af9f8dfea7 Merge pull request #931 from lappp9/cells-with-view-controllers
[ASCellNode] Support for wrapping UIViewControllers
2015-12-21 20:55:28 -08:00
Scott Goodson 06688f7061 Release the lock before setting supernode pointer to nil, in case we are deallocated. 2015-12-21 19:57:39 -08:00
Scott Goodson b8602d1073 Fix ASBasicImageDownloader tests - prevent use of init / new instead of +sharedImageDownloader. 2015-12-20 15:42:57 -08:00
Scott Goodson 97bb05d326 Order-of-magnitude speedup in handling of "disable visibility notifications"
Before, it was expensive to check this value, even though it was rarely set.
Now the cost is moved to setting the value, and is made very cheap to check with _hierarchyState.
2015-12-20 12:47:42 -08:00
Scott Goodson 92126f0d66 Support surprisingly nice automatic behavior for the unsupported case of view-backed nodes as children of layer-backed ones. 2015-12-19 20:33:28 -08:00
Scott Goodson bbc0452a7a Improve UIView & CALayer handling of -addSubnode:, and ensure node hierarchies are hooked up even when addSubview: is used directly. 2015-12-19 18:29:05 -08:00
Scott Goodson 32a99e3d41 Ensure that .hierarchyState is propogated to new subnodes early enough for us to reference it as the views are added. 2015-12-18 19:52:47 -08:00
Scott Goodson 578d0f4f78 Final cleanup for initial version of removing the UIWindow-based render range.
The UIWindow mode remains enabled by default, but rendering and the test suite works correctly both enabled and disabled.
2015-12-18 18:47:08 -08:00
Scott Goodson c6759671e6 Merge branch 'master' into RemoveWorkingWindow 2015-12-18 18:25:14 -08:00
Scott Goodson ee152eadf1 Remove CALayer and UIView implementations of "name" property.
This avoids CoreAnimation from capturing the name from a background thread deep within the internals
of AVPlayerLayer, which commits transactions off the main thread.  If the main thread is also accessing
properties that require the lock, in very specific app architectures relying on AVPlayerLayer, this
can cause a deadlock.

The "name" property is primarily used by ASDK's unit test infrastructure, so I'm leaving it in place for
that purpose - and it may still be used for debugging, if someone wants to set it.  It will remain
possible to get the node from a layer or view with asyncdisplaykit_node, and access name from there.
2015-12-18 16:01:19 -08:00
Luke Parham 6cbc51dc61 cleaned up comments 2015-12-16 23:44:17 -06:00
rcancro 2e6e81e66b Don't allow unitialized or under constrained layouts cause a crash.
Should I move the pixel bounds rounding to here instead of leaving it in ASLayout?
2015-12-16 15:34:30 -08:00
Scott Goodson 872b3588d8 Complete merge of working window removal with ASHierarchyState changes in master. 2015-12-11 22:15:13 -08:00
Scott Goodson 00fe336ae7 Merge branch 'master' into RemoveWorkingWindow 2015-12-11 21:34:45 -08:00
Luke Parham eeb49859f0 view controller node is resized to match layoutspec for cells 2015-12-09 13:13:39 -06:00
Luke Parham 5e34f10b81 added sample app that initializes ASCollectionView cells using view controllers, wip though 2015-12-08 21:57:14 -06:00
Scott Goodson 1e9c4563f3 Improve factoring of locking and early returns for -setInterfaceState: and -setHierarchyState: 2015-12-06 19:30:04 -08:00
Scott Goodson c11d90cd3a Fix an issue with ASHierarchyState when disabling rasterization after having enabled it. 2015-12-06 18:46:29 -08:00
Scott Goodson 271f288a19 Polish ASHierarchyState implementation, fix old comment typos, work on test breakages. 2015-12-06 15:04:47 -08:00
Scott Goodson 67aec97523 Adopt ASHierarchyState to replace manual checking for ASCellNode parent. 2015-12-05 22:41:40 -08:00
Scott Goodson 840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00