88 Commits

Author SHA1 Message Date
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
e9a3d3fd03 Remove a bunch cruft around removed methods (#2765) 2016-12-14 11:02:18 -08:00
appleguy
eeb977e145 [ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own. (#2754)
* [ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own.

This also moves the @package definition of the instance variable to +FrameworkPrivate instead of Internal.h,
because Internal.h should ideally not be used outside of the ASDisplayNode file setup.  This has greatly reduced
the number of imports of Internal.h.

* [ASDisplayNode] Add ASDisplayNode+FrameworkSubclasses.h to share __instanceLock__ definition.
2016-12-12 19:42:41 -08:00
Michael Schneider
ef84e99673 Tremendously make the implementation easier 2016-12-05 20:15:23 -08:00
Michael Schneider
d57e33b2f0 Some further improvements 2016-12-05 16:43:46 -08:00
Michael Schneider
9adb6554fc Add assertion against externally setting .image in specific ASImageNode subclasses 2016-12-05 16:43:46 -08:00
Garrett Moon
ba2268ac99 2611 rename fetch data (#2689)
* Replace fetch data with preload terminology
- Deprecate `-fetchData` and `-clearFetchedData` in favor of `-preload` and `-clearPreloadedData`
- Move `-setNeedsPreload`, `-recursivelyPreload` and `-recursivelyClearPreloadedData` to ASDisplayNode+FrameworkPrivate.h
- Update internal implementation, comments and tests

* Folllow up on #2642:
- Remove -preload and -clearPreloadedData in favor of -didEnterPreloadState and -didExitPreloadState.
- -didEnterPreloadState and -didExitPreloadState call the deprecated -fetchData and -clearFetchedData methods if they are overriden.

* Missed one in a test

* Get rid of behavior change for now.

* Revert more behavior changes, fix tests.

* Don't need these anymore.
2016-12-01 13:41:22 -08:00
appleguy
0a5c1f43a8 [ASRunLoopQueue - Performance] Add ASDeallocQueue for efficient object teardown. (#2399)
* [ASRunLoopQueue - Performance] Add ASDeallocQueue for efficient object teardown.

This measurably reduces block overhead and context switching.  In the layout benchmark,
it increases ops/s while actually reducing CPU utilization.  This suggests that we are
now at a lock-bounded local maximum, at least for tri-core devices.

* [ASDeallocQueue] Update convenience helper method and adopt in ASImageNode etc.

* [ASDeallocQueue] Reimplement the queue using a timer-based runloop.

* [Debugging] Re-enable ASDisplayNode Event Log.

* [ASDeallocQueue] Final refinements, comments, code minimization.

* [ASDeallocQueue] Fix for lock release needed in early return (refactoring typo from last commit)
2016-10-17 12:24:11 -07:00
Garrett Moon
5205ef6840 [API] Remove old deprecated methods. (#2312)
* Remove old deprecated methods. Will restore ones that were removed recently based on PR.

* Update example to use non-deprecated method.

* Don't remove locking / unlocking, insets or willDisplayNode deprecated methods yet.
2016-10-03 14:57:01 -04:00
Adlai Holler
33a680255c [ASDisplayNode] Add Convenience Interface State Accessors (#2168)
* Finish renaming fetchData range, add convenience accessors

* Update example

* Update new tests
2016-09-01 16:44:16 -07:00
Garrett Moon
645aa6f24b [ASDisplayNode] Renamed range update callbacks (#2130)
* Renamed range update callbacks

We finally settled on

didEnter/ExitDisplayState
didEnter/ExitPreloadState
didEnter/ExitVisibleState

This change is meant to unify the range update methods to relate to each
other and hopefully be a bit more self explanatory.

* Guarantee interface callbacks happen on main.

* move fetchData / clearFetchedData to default implementations

* Move deprecated methods to new deprecated category

* Don't bring in cocoapod change.

* Nits

* Capetalize
2016-08-26 20:18:38 -07:00
Garrett Moon
e6e5c346de I wrote a bunch of code with the Mutex::Unlocker and didn't understand it. (#2150) 2016-08-26 14:07:18 -07:00
appleguy
74bf376b2f [ASDisplayNode] Rename _propertyLock to __instanceLock__ to avoid subclass naming collisions. (#1941) 2016-07-16 15:32:13 -07:00
appleguy
3b2af7eb6d [Build] Remove Unused Imports across all of AsyncDisplayKit. This uses a feature of AppCode. (#1875)
Details on the tool are here: https://www.jetbrains.com/help/idea/2016.1/optimizing-imports.html
2016-07-09 17:20:59 -07:00
Michael Schneider
aa5d730eab Deallocate objects on a serial queue specific for deallocation (#1737)
[Performance] Prevent GCD thread explosion due to object deallocation workloads (serial deallocation queue).
2016-06-16 18:18:43 -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
Luke Parham
fc5467b110 fixed typo and added backwards compatibility for 'visibilityDidChange' 2016-06-06 02:02:23 -05:00
Luke Parham
e510120031 changed '-visibilityDidChange:' to '-visiblieStateDidChange:' to match the others 2016-06-06 00:56:21 -05:00
appleguy
1c98daff43 Merge pull request #1632 from Adlai-Holler/ResolveMultiplexImageNodeLoadLoop
[ASMultiplexImageNode] Do Not Request Already-Loaded Images From Data Source
2016-05-09 18:21:01 -07:00
Garrett Moon
c0eb6cac09 Add support for disabling progressive image rendering
Differential Revision: https://phabricator.pinadmin.com/D89742
2016-05-09 15:01:05 -07:00
Adlai Holler
253692df65 [ASMultiplexImageNode] Do not request already-loaded images from data source to avoid loop 2016-05-06 21:45:31 -07:00
Wendy
0b55df9649 Add the ability for ASNetworkImageNodes to keep track of their progressive image quality 2016-04-26 18:33:59 -07:00
Adlai Holler
a216b17b01 Merge branch 'master' into ImageNodeImprovements
Conflicts:
	AsyncDisplayKit/ASNetworkImageNode.mm
2016-04-22 12:36:58 -05:00
Adlai Holler
bc8a2b19ef [ASNetworkImageNode] Carry recent progress image block changes over from multiplex image node 2016-04-22 12:34:13 -05:00
Adlai Holler
f5adc7999b [ASMultiplexImageNode] Reduce lockage in visibilityDidChange 2016-04-22 12:23:02 -05:00
Garrett Moon
3bcbfb149d Add support for animated GIFs
Summary:
Use NSData as key

Add chunking of files

Add support for Animated Images

This adds support for GIF playback in ASDK. It's not currently ready
for merging to public ASDK – for one the GIF decompression may make
more sense in PINRemoteImage.

Removed duration as it wasn't used

Make cover image lazily loaded

Differential Revision: https://phabricator.pinadmin.com/D82033
2016-04-13 14:23:02 -07:00
Adlai Holler
140ca717b1 [ASMultiplexImageNode] Do not eagerly cancel image downloads 2016-04-12 22:14:34 -07:00
Adlai Holler
faf29dd978 Fix indentation 2016-04-12 17:45:40 -07:00
Adlai Holler
7128f69678 [ASMultiplexImageNode] Avoid deadlock by reading our interface state earlier 2016-04-12 17:35:46 -07:00
Adlai Holler
0022cad000 [ASMultiplexImageNode] Copy recent changes made to ASNetworkImageNode for progress image handling 2016-04-12 14:34:11 -07:00
appleguy
4297cb1eb5 Merge pull request #1398 from facebook/Placeholders
[ASDisplayNode] Placeholders should always be recreated if returning to cleared nodes, and remain until ASNetwork/MultiplexImageNode finish loading their image from the network.
2016-03-19 21:19:05 -07:00
Scott Goodson
8308a4ce49 [AsyncDisplayKit] Adopt #pragma once, remove last remaining dispatch_sync (UIScreen scale). 2016-03-19 19:56:41 -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
Eric Jensen
17aebcbaba Add a space between the ? and : in ternarys 2016-03-17 10:38:51 -07:00
Eric Jensen
c2f85397ce Mark depreciated protocols with deprivation attribute 2016-03-08 11:56:58 -08:00
Eric Jensen
3d34c177ed Flatten indentation of parameter hierarchy 2016-03-08 11:56:58 -08:00
Michael Schneider
3c32c48be0 Add clear image to ASMultiplexImageNode 2016-03-02 06:14:35 -08:00
Scott Goodson
ca8357a364 [AS*ImageNode] dispatch to the background before scheduling image download request (perf). 2016-02-20 13:01:03 -08:00
Anh Nguyen
8d603bf5e6 Check loadedImageIdentifer before sending it to delegate 2016-02-17 16:49:15 +07:00
Adlai Holler
da953ac421 Provide a Synchronous Path for Loading Memory-Cached Images 2016-02-16 19:43:47 -08:00
Garrett Moon
752f0540d0 Fix warnings 2016-02-10 10:38:41 -08:00
Garrett Moon
48fc4810cd Addressing comments 2016-02-09 14:06:41 -08:00
Garrett Moon
5a4e4dcac4 Add default PINRemoteImageDownloader 2016-02-08 16:00:19 -08:00
Scott Goodson
fe572c23fb Exclude all of ASMultiplexImageNode from tvOS - for now. 2016-01-23 11:45:09 -08:00
Aaron Schubert
cc4f604ea3 [tvOS] Initial commit to make build run. 2016-01-12 14:43:30 +00:00
Scott Goodson
840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00
Adlai Holler
fca8614c18 Scope like a boss 2015-11-29 21:22:37 -08:00
Adlai Holler
50b318b117 Lock and unlock manually when doing early return 2015-11-29 17:49:11 -08:00
Adlai Holler
e481782ccb ASMultiplexImageNode: only copy image identifiers once 2015-11-29 17:43:09 -08:00
Adlai Holler
7d3cf56b17 ASMultiplexImageNode: fix bad behaviors with imageIdentifiers property 2015-11-29 17:33:00 -08:00