28 Commits

Author SHA1 Message Date
Eric Jensen
17aebcbaba Add a space between the ? and : in ternarys 2016-03-17 10:38:51 -07:00
Eric Jensen
ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07:00
Huy Nguyen
fa8f2f4429 Implement async transition 2016-03-11 18:56:58 -08:00
Garrett Moon
1ecfd81e3e Address comments 2016-01-28 16:05:49 -08:00
Garrett Moon
7b002c408d Ensure context is non-null 2016-01-28 08:38:40 -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
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
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
928c440b4c Several small optimizations, especially to _ASPendingState and other hot paths. 2015-12-23 16:38:33 -08:00
Scott Goodson
00fe336ae7 Merge branch 'master' into RemoveWorkingWindow 2015-12-11 21:34:45 -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
840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00
Scott Goodson
9669f147ba Efficiency improvements to consolidate display events for the window-less preload range. 2015-11-30 19:02:16 -08:00
Garrett Moon
b1d03f1d58 Address comments 2015-10-05 16:02:01 -07:00
Garrett Moon
d6c107a896 Fix shouldRasterizeSubnodes skipping setting offset and clipping. 2015-10-05 16:02:01 -07:00
Garrett Moon
c90708a25b Corner radius and clipsToBounds should be captured outside block 2015-10-02 09:30:49 -07:00
Scott Goodson
47be24037d Reduce _ASAsyncTransaction allocations by ensuring nodes without display methods don't create them. 2015-09-24 19:26:00 -07:00
Garrett Moon
32582fca58 Fixes shouldRasterizeSubnodes
Currently, subnodes of nodes marked with shouldRasterizeSubnodes do not get layout calls. This adds the call to layout and changes the __layout method to reference self.bounds instead of _layer.bounds.

Also adds support for corner radius when rasterizing subnodes.
2015-09-01 13:25:27 -07:00
Scott Goodson
c50f3b9cad Support transparent (e.g. clearColor) background for precomposited trees. 2015-06-14 17:30:42 -07:00
Joost van Dijk
bd7941507b Use a zero origin for root container node frame during rasterization 2015-06-13 20:51:58 +02:00
Li Tan
8b303710b6 fix unncessary change in editing 2014-12-15 15:57:11 -08:00
Li Tan
f7f5988fcd Support editing in table view and collection view 2014-12-15 13:19:10 -08:00
Ryan Nystrom
647a9409d6 Support UIViewContentModeCenter with ASImageNode 2014-12-05 15:25:55 -08:00
Nadine Salter
db085c49be Support realistic display delays (for debugging).
ASDISPLAYNODE_DELAY_DISPLAY unconditionally delays *all* attempts to
execute display blocks, even those that have been cancelled.  Fix that.

The DELAY_DISPLAY debugging tool is intended to simulate the effect of
expensive draw calls -- it lets you test your app's behaviour under
conditions potentially even worse than an iPhone 4.  Unfortunately, the
current simulation is unusably incorrect, as can be demonstrated by
repeatedly scrolling up and down in the Kittens example project.

ASRangeController enqueues asynchronous display of ASTableView cell
nodes when they enter the working range, and suspends their display when
they exit.  On a slow device, this performs as desired, limiting
expensive display computation to the space of the working range.  In
the DELAY_DISPLAY simulation, the suspended displays are as expensive as
the executed ones, so ASRangeController becomes unusably slow.
2014-12-02 19:04:49 -08:00
Nadine Salter
a30c087616 Clean up ASDisplayNode internal flags.
* Reorganise and rename `_flags` for clarity and consistency.
* Remove ambiguity between `implementsDisplay` and `hasClassDisplay`.
* Delete useless `hasWillDisplayAsyncLayer` check -- make it a simple
  subclass override point, as with `didDisplayAsyncLayer:`.
* Minor comment cleanup.
2014-12-02 18:06:11 -08:00
Scott Goodson
c61b1c294c Several bug fixes for the 1.0 release of AsyncDisplayKit
Fixes:
- Usage of UIScreen in -[ASDisplayNode init]
  (the offending individual will be prosecuted)
- #38: Proper teardown of nodes owned by ASTableView / ASRangeController
- #34: Fix infinite recursion in very rare subclassing scenario
- #30: Avoid animating cell and section additions to ASTableView
- #19: Set a more reasonable default for maximum display concurrency

r=nadi
2014-10-14 20:53:25 -07:00
Nadine Salter
15565873c9 Initial commit. 2014-06-26 22:32:55 -07:00