* Add "ASGraphicsContext" to skip copying our rendered images
* Zero the buffer before making a context
* Update license header
* Update dangerfile
* Make it a runtime flag
* Restore GState for good measure
* Free buffer if end without image
* Enable the experiment, and cut out the middle-man
* Fix typo
* Add support for interactive moves
* Enable drag & drop in collection view example
* Update changelog
* Change the gating logic to match UIKit
* Add a warning when we prevent interactive movement due to async layout
* Reimplement ASRectTable using unordered_map to avoid obscure NSMapTable exception.
The new class is called ASRectMap, which patterns alongside ASIntegerMap in both name and implementation.
After some pretty detailed investigation, including study of open-source reimplementations
of Foundation, the best lead I've found on the NSMapTable exception is that
some NSPointerFunction types are not fully supported. Strangely, the ones being used
do seem to work fine almost all of the time.
The main concern is the Struct memory type, which is not officially re-declared in
NSMapTable, and as such the documentation claims that there may exist some
combinations of NSPointerFunction that are not supported.
Because the exception is occurring frequently enough to be a concern (in the hundreds
to low thousands, though only 50 a day) - I decided to replace NSMapTable entirely
in order to ensure full correctness.
"*** -[NSMapTable initWithKeyPointerFunctions:valuePointerFunctions:capacity:] Requested configuration not supported."
* Fix Xcode project
* Revert "Adds support for specifying a quality indexed array of URLs (#557)"
This reverts commit 3c77d4a5da44c46c7b80b2a627c95389b7d6352d.
* Add CHANGELOG entry
* Add unit tests for ASScrollNode
* Make sure ASScrollNode's size is clamped against its size range
* Invalidate ASScrollNode's calculated layout if its scrollable directions changed
* Update comment
* Update CHANGELOG
* Address Adlai's comments
Before:
- Even if a pending layout was applied before, it'll be unnecessarily applied again in next layout passes and cause `-calculatedLayoutDidChange` being called multiple times.
After:
- If a pending layout was applied, the calculated layout will not be ignored but reused, if possible, in next layout passes.
Test plan: testSetNeedsLayoutAndNormalLayoutPass in #424.
* Make our async deallocation functions take a double pointer, so we can be sure we've released before the queue drains
* Make it a class property
* Fix the return type
* Use a locker
* Improve release notes
* [ASCollectionView] Ensure -invalidateFlowLayoutDelegateMetrics is called for UIKit passthrough cells.
This allows rotation to work properly when rotating UIKit passthrough
cells that need to change width.
* [ASCollectionView] No need to verify node is still in model to handle view-only notifications.
* [ASCollectionView] Improve performance and behavior of rotation / bounds changes.
See #430 for details.
* Edit CHANGELOG.md
* [ASDataController] Implement -relayoutAllNodesWithInvalidationBlock:, to flush the ASMainSerialQueue before -invalidateLayout is called.
* Don't set download results if no longer in preload range. (#606)
Good catch by @djblake, if you scroll fast enough, you leave images
set on the image node because didExitPreloadRange (which would have
cleared it) was already called.
* Animated WebP support (#605)
* Updating to support animated WebP
* Fix a deadlock with display link
* Fix playhead issue.
* Fix up timing on iOS 10 and above
* Don't redraw the same frame over and over
* Clear out layer contents if we're an animated GIF on exit range
* Clear out cover image on exit of visible range
* Don't set cover image if we're no longer in display range.
* Don't clear out image if we're not an animated image
* Only set image if we're not already animating
* Get rid of changes to podfile
* Add CHANGELOG entry
* Update license
* Update PINRemoteImage
* Remove commented out lines in example
* [ASDataController] Add nullable specifier to invalidationBlock for relayout of nodes.
* Add unit test
* Make sure TextKit components can calculate size in background without upsetting Main Thread Checker
- Add a new thread-safe text view bounds.
- Temporary components stack doesn't have a text view so it can be safely deallocated off main.
* Add ASTextKitComponentsTextView
* Remove unnecessary change
* Fix minor mistake
* ASTextKitComponentsTextView has only 1 initializer
* Minor change
* Switch to atomic property
* Remove manual synthesization
* Updating to support animated WebP
* Fix a deadlock with display link
* Fix playhead issue.
* Fix up timing on iOS 10 and above
* Don't redraw the same frame over and over
* Clear out layer contents if we're an animated GIF on exit range
* Clear out cover image on exit of visible range
* Don't set cover image if we're no longer in display range.
* Don't clear out image if we're not an animated image
* Only set image if we're not already animating
* Get rid of changes to podfile
* Add CHANGELOG entry
* Update license
* Update PINRemoteImage
* Remove commented out lines in example
Good catch by @djblake, if you scroll fast enough, you leave images
set on the image node because didExitPreloadRange (which would have
cleared it) was already called.
* [ASCollectionView] Fix index space translation of Flow Layout Delegate methods.
This includes a few other cleanups, including overflow of signed integer indices.
* [ASCollectionView] Improve code sharing of UIKit size method calls; ensure delegate invalidation re-fetches supplementary sizes too.
* [ASCollectionView] Final method ordering and doc-comment for new _sizeForUIKitCellWithKind:atIndexPath: method.
* [PINCache] Set a default .byteLimit to reduce disk usage & startup time.
This default is fairly low - only 20MB - but for most apps with images
in the size range of 10-50KB, this is still 400-1000 images.
Once some optimizations land to PINCache, we'll match the PINCache
default of 50MB to ensure the default better serves users with larger
objects in the cache.
Apps should preferably set their own byteLimit to an optimal value.
@garrettmoon - one interesting question for us is the best place to
set .byteLimit as an app. Digging into the ASPINRemoteImageDownloader
and doing this type cast is a bit complicated, so a passthrough API
to get the PIN* objects directly might be worthwhile.
* [PINCache] Declare necessary APIs to avoid a direct dependency.
* Clear ivar after scheduling for main thread deallocation
After scheduling the ivar for main thread deallocation we have clear out the ivar, otherwise we can run into a race condition where the main queue is drained earlier than this node is deallocated and the ivar is still deallocated on a background thread
* First clear and than schedule
* Rolling back CI to known version for now
* Fix availability in tests
* Commenting out for now to see if it builds
* Fix up the Swift framework test
* Fix availability
* Fix crashes caused by failing to unlock or destroy a static mutex while the app is being terminated
* Allocate static mutexes on the heap memory to avoid destruction at app exit
* ASThread to use ASDisplayNodeCAssert() instead of assert()
* Added attributed versions of accessibilityLabel, accessibilityHint and accessibilityValue
* Follow conventions for property types
* Use curly braces
* Update changelog
* Follow conventions for property types in UIView+ASConvenience.h
* Add compatibility for Xcode 8
* Use isEqualToString instead of pointer comparison
* Only allocate attributed strings once. Use _setAttributedAccessibilityToViewAndProperty only for attributed properties.
* [ASCornerRounding] Initial (untested) implementation of ASCornerRounding features.
* [ASCornerRounding] Working version of both clip corners and precomposited corners.
* [ASCornerRounding] Improve factoring and documentation of corner rounding features.
* [ASCornerRounding] Some final fixups.
* Add entry to changelog for .cornerRoundingType
* [Yoga] Add insertYogaNode:atIndex: method. Improve handling of relayouts.
* Add new "version" parameter to Yoga initialization of ASDisplayNodeLayout C++ struct.
* Mark ASRunLoopQueue as drained if it contains only NULLs
* Update CHANGELOG.md
* Cover ASRunLoopQueue with tests
* Include PR link in CHANGELOG.md
* Replace license header of ASRunLoopQueueTests.m with correct one
* Insert a nil in _internalQueue to ensure compaction, instead of maintaining a state for _isQueueDrained