37 Commits

Author SHA1 Message Date
Adlai Holler
bbc1aecf95 Deprecate shouldRasterizeDescendants (#3024)
* Deprecate shouldRasterizeDescendants

* Set superclass right
2017-02-13 13:34:53 -08:00
Michael Schneider
77f29a8b7b Fix CI that broke due to Yoga merge (#3012)
* Fix CI that broke due to Yoga merge

* Next round

* Add clean before building

* Try something else

* Some more burritos
2017-02-10 11:17:25 -08:00
appleguy
f91265757e [Yoga] Initial commit for supporting Yoga-powered layout calculation. (#2982)
* [Yoga + AsyncDisplayKit] Initial commit for supporting Yoga-powered layout calculation.

Because this results in ASLayout objects, it preserve support for automaticallyManagesSubnodes
as well as the animated transition system. More work remains to vet performance of the new mode,
and it will remain in +Beta for the forseeable future.

I'm not sure that this should ever be used as the primary ASDK layout system, but it should remain an
option for some apps to experiment with if they require an implementation that more strictly mirrors
W3C standard Flexbox.

* [Yoga] Improve usage of ASHierarchyState to ensure simultaneous yoga layouts can't happen.

* [Yoga] Strictly minimize the impact of the Yoga integration on existing code.

Created new file ASDisplayNode+Yoga.mm, reduced size and number of integration points in core code.

* [Yoga] Figured out how to further reduce ASDisplayNode.mm impact by allocating _yogaNode in property accessor, and changing all accesses to use the property.
2017-02-09 16:10:29 -08:00
Adlai Holler
404795dc02 Remove Support for iOS 7 (#2930)
* Drop support for iOS 7

* Copy reference images

* Update deployment for sample projects

* Update version

* Update "Life Without Cocoapods"
2017-02-01 14:40:37 -08:00
Adlai Holler
5b80a641af Improve Handling of Rasterized Node Interface & Hierarchy States (#2731)
* Improve handling of rasterize node interface states and testing

* Fix harder

* Finish fixes and move rasterization flag into beta header

* Re-enable rasterization in ASDKgram

* Re-enable working test

* Only do it in debug
2016-12-08 09:52:21 -08:00
Adlai Holler
051b738236 Inject data source class name into update validation exceptions, deprecate suppression flag (#2692) 2016-12-01 17:30:36 -08:00
Adlai Holler
6bbc9a3cb0 Add a macro (default 0) to control event backtrace recording (#2584) 2016-11-08 21:50:59 -08:00
Huy Nguyen
fb6d1830a0 Beter table/collection update history (#2562)
- Introduce thread-safe ASEventLog
- ASCollectionNode and ASTableNode share their event log with their ASDataController. The controller uses it to log change set submitting and finishing events.
- ASCollectionNode and ASTableNode print their data source and delegate in their debug description.
2016-11-08 16:44:49 -08:00
Michael Schneider
6d5bd6e969 Cleanup calculateLayoutThatFits: (#2480) 2016-10-26 11:26:57 -07:00
Adlai Holler
124234fef8 [Umbrella] Add warn_unused_result Attribute to Public Headers (#2353)
* Add some warn_unused_result attributes

* Add more

* Add some more
2016-10-06 16:44:49 -04:00
Harry Shamansky
71fc2dd18d Revise performance measurement naming and structure (#2265)
* Revise performance measurement naming and structure

- Revises naming from LayoutSpecGeneration to LayoutSpecComputation
- Adds a struct instead of an NSDictionary to retrieve performance metrics
- Includes ASEnvironmentStatePropagateDown in LayoutSpecComputation measurements

* Revise SumScopeTimer to include enable flag

* Make struct a typedef
2016-09-20 15:39:09 -04:00
Adlai Holler
25de53bb13 [ASDisplayNode] Add Event Tracing to Help Debugging (#2243)
* Add some simple event logging for ASDisplayNode

Improve the tracing

* Add header to copy files phase

* Make event header public
2016-09-15 13:24:19 -07:00
Harry Shamansky
59fbfb682d Measure performance for ASCellNode layout (#2209)
* Measure performance for ASCellNode layout

* Address Adlai and Levi's feedback:
* Move to ASDisplayNode level
* Lock around setting/getting measurement options and results
* Record all measurement passes and report times as an array
* Only add relevant entries to the performanceMetrics dictionary
* Rebase

* Store sum and count instead of array

* Rename ScopeTimerDataPoint to ScopeTimerSum

* Address Levi's feedback

* Address Adlai's feedback
2016-09-09 10:38:13 -07:00
Adlai Holler
6db9bf39f1 Turn on collection update validation by default (#2174) 2016-08-31 22:20:23 -07:00
Michael Schneider
11215bf97f [Automatic Hierarchy Management] Rename IHM to automatic hierarchy management and move out of beta header (#2066)
* Rename automaticHierarchy to automaticallyManagesSubnodes

* Comment adjustments
2016-08-15 12:06:06 -07:00
Michael Schneider
32058815f2 Move Transition Layout API out of beta header and remove shouldMeasureAsync from API
shouldMeasureAsync is enabled by default now.
2016-08-10 10:30:25 -07:00
Adlai Holler
8cde594de3 [ASDataController] Add validation logic to the change set to throw exceptions on invalid updates (#1894)
[_ASHierarchyChangeSet] Oopsy daisy

[ASDataController] Tweak our update validation

[ASHierarchyChangeSet] Fix bugs

Finish up some stuff

[ASDataController] Put some stuff back

[ASChangeSetDataController] Always use changeset

[ASDataController] Put other stuff back

[_ASHierarchyChangeSet] Use fast enumeration

[_ASHierarchyChangeSet] Fix assertion format strings, return on fail so we don't crash in production

[ASDataController] Store data source item counts as vector rather than NSArray

[ASDataController] Build some tests for the update validation

[ASDataController] Fix issues with update validation

Get rid of new file

[ASDataController] Suppress changeset validation before initial reload

[ASDataController] Make invalid update log vs. exception publicly toggleable
2016-07-21 14:37:51 -07:00
Adlai Holler
bd0254f306 [ASRangeControllerUpdateRangeProtocol] BREAKING Remove +setRangeModeForMemoryWarnings:, replace with global method 2016-07-14 11:26:18 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Eric Jensen
d3c33a38bb Add missing nullability annotations to headers related to display node transitions (#1688) 2016-05-21 11:10:07 +08:00
Wendy
0b55df9649 Add the ability for ASNetworkImageNodes to keep track of their progressive image quality 2016-04-26 18:33:59 -07:00
Huy Nguyen
9e76d7b603 Add method to cancel layout transitions in progress
- Also make sure a transition isn't invalidated right after it passed the validation test and before it proceeds
2016-03-20 23:17:35 -07:00
Scott Goodson
c5c7abb1d6 [ASDisplayNode] Placeholders should always be recreated if returning to past nodes.
If previously-displayed contents is gone (e.g. clearContents), and is not finished displaying
by the time the node is onscreen, recreate the placeholder immediately.
2016-03-18 21:13:26 -07:00
Huy Nguyen
fa8f2f4429 Implement async transition 2016-03-11 18:56:58 -08:00
Scott Goodson
eeb81a54de [ASDisplayNode+Beta] Expose helper functions, ASPerformBlockOnMainThread & ASPerformBlockOnBackgroundThread. 2016-02-18 13:59:20 -08:00
Levi McCallum
b267821d4c Wrap implicit node hierarchy management behind feature flag property 2016-02-10 19:21:29 -08:00
Levi McCallum
a00e9bb41c Clean up node transition API 2016-02-10 11:44:12 -08:00
Levi McCallum
8737e242f8 Extract measurement and transition into different methods based on feedback 2016-02-10 11:44:12 -08:00
Levi McCallum
4361c3bbb4 Remove disabled APIs 2016-02-10 11:44:11 -08:00
Levi McCallum
d8d76635ff Perform animation transition on measureWithSizeRange instead of separate method 2016-02-10 11:44:11 -08:00
Michael Schneider
5d474bcb1a Remove ASDisplayNode -shouldUseNewRenderingRange method and ASRangeControllerStable class 2016-02-07 15:03:23 -08:00
Levi McCallum
561ae212d9 Wrap implicit hierarchy management in a class enable bit 2016-02-01 17:49:47 -08:00
Garrett Moon
d7d36c0a6b Addressing Scott's comments 2016-01-27 21:08:04 -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
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
Garrett Moon
082dc1cbca Expose recursivelyEnsureDisplay 2015-12-10 19:42:17 -08:00