195 Commits

Author SHA1 Message Date
Levi McCallum
d8d76635ff Perform animation transition on measureWithSizeRange instead of separate method 2016-02-10 11:44:11 -08:00
Levi McCallum
8238da8d00 Fix node deletion and flatten identification issues 2016-02-10 11:44:11 -08:00
Levi McCallum
043012718b Remove debug log 2016-02-10 11:44:11 -08:00
Levi McCallum
51977ed162 Identify flattened layouts to allow filtering of non-hierarchy nodes 2016-02-10 11:44:11 -08:00
Levi McCallum
3b1a32c413 Clean up implicit hierarchy management to enable custom animation 2016-02-10 11:44:11 -08:00
Levi McCallum
9dc358196a Basic implementation of transitioning API for layout specs 2016-02-10 11:44:10 -08:00
Scott Goodson
a471c19216 [ASDisplayNode] Remove locking in -isNodeLoaded when called on main, as an optimization.
Additionally, this is often needed in threading-critical cases where interaction of sophisticated
3rd-party code with framework internals like ASDataController may cause deadlocks.
2016-02-09 22:35:35 -08:00
Michael Schneider
5d474bcb1a Remove ASDisplayNode -shouldUseNewRenderingRange method and ASRangeControllerStable class 2016-02-07 15:03:23 -08:00
Scott Goodson
9e87813425 Micro-optimizations in ASDisplayNode that help reduce overhead when recursing large hierarchies. 2016-02-05 21:43:14 -08:00
Scott Goodson
454d68516b Remove overly-cautious thread affinity assertions for threadsafe properties. 2016-02-04 19:44:44 -08:00
Huy Nguyen
fda9efafa6 Add timestamp to notifications of rendering engine and avoid race conditions in ASRangeControllerBeta
- Accurately remove notification observer
2016-02-04 15:44:44 -08:00
Levi McCallum
cd94df1106 Wrap implicit hierarchy management behind beta feature flag 2016-02-03 20:08:30 -08:00
Huy Nguyen
69e674c1c8 Range controller registers to rendering engine and extern to full range if needed 2016-02-02 01:23:04 -08:00
appleguy
191d978154 Merge pull request #1155 from nguyenhuy/range_tuning_params
[ASRangeController] Reduce early creation of views and layers in nested, orthogonal views
2016-02-01 19:15:00 -08:00
Levi McCallum
ac3c9d220b Respond to review comments 2016-02-01 18:29:50 -08:00
Levi McCallum
d168ec78ce Implement simple, in-order add/remove subnode support when changing layout specs 2016-02-01 17:49:48 -08:00
Levi McCallum
9f25b54f9e Support insertion on first layout of display node 2016-02-01 17:49:48 -08:00
Levi McCallum
e852cb612c Simplify usage of diffing API 2016-02-01 17:49:47 -08:00
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