Eric Jensen
33fda7ab49
- Use modern Objective-C syntax.
...
- Simplify comparisons.
- Remove dead stores.
2016-03-15 22:34:29 -07:00
Eric Jensen
ddd5ff1f75
Correct spelling errors
2016-03-15 21:56:51 -07:00
Huy Nguyen
22b105bfdc
ASCollectionView doesn't animate size changes if some of the updated cell nodes don't want to
2016-03-15 16:17:43 -07:00
Hannah Troisi
7f6ce4e9de
[ASMultidimensionalArrayUtils]
...
- optimized ASRecursivelyFindIndexPathsForMultidimensionalArray() to remove enumerateUsingBlock:
- replaced single project call to ASIndexPathsForMultidimensionalArray() in ASRangeController with ASIndexPathsForTwoDimensionalArray()
2016-03-14 22:47:43 -07:00
Huy Nguyen
fa8f2f4429
Implement async transition
2016-03-11 18:56:58 -08:00
Scott Goodson
cdd1bd1e39
[ASRangeController] Ensure that visibilityDidChange: is always called on app launch for all initial cells.
2016-03-11 17:18:32 -08:00
Scott Goodson
aab2ecc26e
[ASWeakSet] Properly cast kCFNull so that build settings for unit tests don't flag it (warnings as errors).
2016-03-10 17:22:26 -08:00
Scott Goodson
c3fb665ec1
[ASWeakSet] Support -allObjects to return a retained array of contents.
...
Use this array while enumerating ASRangeController instances in response to UIApplication notifications,
as it is possible for these events to trigger the mutation of the ASWeakSet and cause an enumeration error.
2016-03-10 16:20:21 -08:00
Scott Goodson
21bebb9d29
[ASRangeController] Improvements to application state change and memory warning handling.
...
Introduces ASLayoutRangeModeVisibleOnly, allowing the preservation of decoded backing stores without any extra padding to
strictly minimize memory usage while supporting immediate re-display of content. Set visible range controllers to this mode
upon app suspend / memory warning, while more aggressively clearing others to the ASLayoutRangeModeLowMemory mode.
By default, when the app is running and recieves a memory warning, we set the range mode for non-visible controllers to
ASLayoutRangeModeVisibleOnly. This is because, unlike in the app suspend case where on app resume we can restore controllers
from LowMemory to VisibleOnly, the memory warning doesn't provide a good opportunity to do this.
A new +Beta API to control this behavior is called +setRangeModeForMemoryWarnings:, as some apps may prefer to use LowMemory
in the memory warning scenario. For these apps, optimal user experience will require manually setting the range mode back
to some larger value as the user navigates the app, or they will encounter controllers that are temporarily blank and need
a moment to re-display their contents as they start to become visible.
2016-03-09 21:22:45 -08:00
appleguy
1ce3834e0e
Merge pull request #1343 from rcancro/cacheFontScale
...
[ASTextNode] Improvements to the implementation of the font scale adjuster.
2016-03-09 02:41:13 -08:00
rcancro
06a6bd6606
fix typo and kick off build again.
2016-03-08 16:32:24 -08:00
Scott Goodson
5c28bb8e21
[ASScrollDirection] Ensure definitions of "positive" scroll direction in batch context match the layout controller.
2016-03-08 00:53:06 -08:00
Scott Goodson
9e72679ffd
[ASDataController] Swap order of section / item in optimized indexpath creation from yesterday :).
2016-03-07 12:08:31 -08:00
Scott Goodson
8cfd951f42
[ASDataController] If app code issues edit commands before first reload, ignore them, as UIKit will call -reloadData.
2016-03-05 21:21:22 -08:00
Scott Goodson
cc7ca4a08f
[ASDataController] If app code issues edit commands before first reload, ignore them, as UIKit will call -reloadData.
2016-03-05 20:22:18 -08:00
Huy Nguyen
caddd1d287
Fix threadSafeBounds
...
- Bounds change set directly to _ASDisplayLayer should also be saved to threadSafeBounds
- Remove overkill _usesDisplayView flag
2016-03-03 16:18:07 -08:00
Huy Nguyen
5e49cc4382
Layout transition can measure in background
2016-03-02 22:47:04 -08:00
Huy Nguyen
9162d7b2df
Implement thread-safe bounds and use it in ASTextNode
2016-03-02 22:42:53 -08:00
Garrett Moon
eba6afc36b
Revert "Don't clear contents when moving between nodes"
...
This reverts commit 6d1732fcbdda44603577979afdddb9fc48b6d6e4.
2016-03-01 16:45:36 -08:00
Garrett Moon
6d1732fcbd
Don't clear contents when moving between nodes
2016-03-01 09:57:07 -08:00
Scott Goodson
5e35ef7938
[ASDisplayNode] Ensure display is triggered properly even before layers are onscreen (in display range).
2016-02-29 00:46:45 -08:00
Scott Goodson
eac85b6c9a
[ASDisplayNode] Optimize -setNeedsDisplay, deep mutable array copies.
...
These optimizations are surprisingly impactful. -setNeedsDisplay being called
for every node triggered cancelAsyncDisplay, locking, and memory management overhead
that is completely avoidable because Core Animation triggers first display automatically.
The mutable array copy optimizations reduced this key cost by over 10x, from 52ms to 5ms
on an iPad Air 2 / A8X with a real-world test case.
2016-02-28 20:54:56 -08:00
Adlai Holler
324b633b0f
[ASPendingStateController] Don't hold lock while flushing
2016-02-26 23:14:58 -08:00
Scott Goodson
89516129a4
[ASDisplayNode] Bridge should trigger display when opacity or bg color change.
2016-02-25 18:25:39 -08:00
Huy Nguyen
32a8f9c831
Assert comparison block in diffing algorithm
2016-02-24 20:42:18 -08:00
Huy Nguyen
bd1b195dbe
Fix diffing algorithm not using custom comparison block
2016-02-24 20:33:02 -08:00
Aaron Schubert
682903fba5
Make ASDisplayNode unable to be focused by default. ASControlNode will be the new default.
2016-02-23 10:36:53 +00:00
appleguy
3abde9348d
Merge pull request #1256 from Adlai-Holler/AHAffinityRevisions
...
[ASDisplayNode] Post-Review Refinements of Recent No-Affinity UIKit/CA Property Bridging
2016-02-22 20:41:59 -08:00
Adlai Holler
767bff2e1a
[ASInternalHelpers] Use ASDisplayNodeThreadIsMain, reduce block allocations
2016-02-22 15:12:13 -08:00
Adlai Holler
015c024b7a
[ASPendingState] Give local variables default values
2016-02-22 08:54:58 -08:00
Adlai Holler
100d0a1302
[_ASPendingState] Deduplicate logic for applying setNeedsDisplay and applying frame/bounds/position
2016-02-22 08:52:26 -08:00
Adlai Holler
b8d2941093
[ASPendingStateController] Unite -flush and -flushNow methods, cleanup
2016-02-21 11:27:36 -08:00
Adlai Holler
ff59401b05
[ASInternalHelpers] Improve spacing
2016-02-21 11:23:54 -08:00
Adlai Holler
5eca1e6c68
[ASDisplayNode:UIViewBridge] Clean up setNeedsDisplay/setNeedsLayout
2016-02-21 11:23:28 -08:00
Adlai Holler
d9d4d40997
[ASDisplayNode:UIViewBridge:setFrame] Use CALayer directly when possible
2016-02-21 10:52:20 -08:00
Adlai Holler
b1c7f47b02
[ASDisplayNode:UIViewBridge] Refactor setFrame: to simplify logic
2016-02-21 10:42:38 -08:00
Adlai Holler
3ff833c4f5
[ASDisplayNode:UIViewBridge] Reduce calls to -isNodeLoaded
2016-02-21 10:10:04 -08:00
Adlai Holler
e1bf0f6a88
[ASDisplayNode:setFrame] Initialize local variable values
2016-02-21 10:08:27 -08:00
Adlai Holler
648dc817ad
[ASDisplayNode] Use a C function to lazily create pending view state
2016-02-21 10:03:06 -08:00
appleguy
29726fbe38
Merge pull request #1048 from Adlai-Holler/ThreadSafeViewLayerProperties
...
[ASDisplayNode] Eliminate Thread Affinity for Writing in Background - UIKit / CA Bridged Properties
2016-02-21 01:07:20 -08:00
Scott Goodson
4637bf6a37
[ASStackLayoutSpec] Micro-optimizations to ultrahot codepaths, reducing both locking overhead and method calls.
2016-02-20 17:50:19 -08:00
Adlai Holler
e244b10e1e
Add a note about order of operations issue with frame/bounds/position
2016-02-20 15:43:00 -08:00
Adlai Holler
b929bfdd33
I am not a smart man
2016-02-20 15:43:00 -08:00
Adlai Holler
edf6ee59e8
[ASDisplayNode] Remove RespectThreadAffinityOfNode function
2016-02-20 15:43:00 -08:00
Adlai Holler
e9712cdfa1
Make the tests sturdier, improve setNeedsLayout/setNeedsDisplay bridging
2016-02-20 15:43:00 -08:00
Adlai Holler
636c8c04f3
Improve bridging of frame property
2016-02-20 15:43:00 -08:00
Adlai Holler
563d0893a3
Beef up the properties, beef up the demo app
2016-02-20 15:43:00 -08:00
Adlai Holler
7a6006e627
Apply same fix on opaqueness
2016-02-20 15:40:47 -08:00
Adlai Holler
b0cbd2dd59
Fix background color issue
2016-02-20 15:40:47 -08:00
Adlai Holler
71edc810d3
Revert unnecessary change to [ASDisplayNode setOpaque:]
2016-02-20 15:40:47 -08:00