After 5c9815f, some Mutexes are used as global C++ variables which are loaded before main(). Since the Mutex constructor checks for unfair lock experiment, it triggers an experiment configuration load, and our app isn't ready to respond that early in the process.
* Convert the codebase to Objective-C++ throughout. One language is better than two.
* Put it back
* Fix linker
* Point explicitly to updated Weaver to unblock build
* Revert "Point explicitly to updated Weaver to unblock build"
This reverts commit fdc25296e8794d4e6e56c35f5fe6da2be3f71dbc.
* Revert "Fix linker"
This reverts commit 7be25f91519b8497ef42de79f115bcfbdb965c39.
* Add in the frameworks
* no message
* Address spec lint warnings
* Fix tvos build
* Put that back
* Address Michael's review
* Add comment to kick CI
* [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses)
With permission of the Facebook Open Source team, we are simplifying the Texture
license so that clients can rely on the Apache 2 terms that most of Texture is
already covered by. This means that code originally forked from AsyncDisplayKit
will be re-licensed from "BSD 3-clause + PATENTS v2" to Apache 2 without a
PATENTS file.
After getting confirmation that the updates to these core files look good, we'll
propagate this new license header to all files (in this same PR) and get sign-off
from all parties before landing.
* [License] Update all Texture source files to be pure Apache 2.
* Changelog entry for Apache 2 license update.
* Revert "[License] Update all Texture source files to be pure Apache 2."
This reverts commit ffa0fbbba9717d871dd16c4b07539f2f8208fc2b.
* [License] Update all Texture source files to be pure Apache 2, maintaining copyrights.
* [License] Update CONTRIBUTING, README, Podspec & Dangerfile.
* [tvOS] Fixes errors when building against tvOS SDK
* Update CHANGELOG.md
* [tvOS] Fixes implicit conversion between UIViewAnimationCurve +
UIViewAnimationOptions
* Enable tvOS deployment target in Texture.podspec (for CI)
* [ASMultiplexImageNode] Fixes typo
* [tvOS] Fixes warnings related to @available guards in Xcode 9
[ASMultiplexImageNode] Enables support for Photos framework on tvOS 10+
[ASMultiplexImageNode] Fixes comment depth
[ASAvailability] Adjust logic in AS_AVAILABLE_IOS_TVOS to account for
both versions
Adjusts API_AVAILABLE to minimum deployment target
* [ASAvailability] Update AS_AVAILABLE_XXX fallbacks to function more like
the built-in solution (more accurately target OS by checking target)
Change AS_AVAILABLE_IOS -> AS_AVAILABLE_IOS_TVOS in places that shoud
allow for both
[ASAvailability] Simplify AS_AVAILABLE_IOS_TVOS
* [ASControlNode] Adds missing 'super' call in -[ASControlNode didLoad]
when targeting tvOS
* Fix API_AVAILABLE iOS requirement
* [ASDisplayNode] Fixes last of the linker warnings related to category
overrides. Removes methods already implemented in
ASDisplayNode+UIViewBridge category.
[ASControlNode] Moves tvOS category declaration to ASControlNode header
[ASImageNode] Moves tvOS category declaration to ASImageNode header
[ASControlNode+Private] Adds private category for ASControlNode to
access private selectors
* [NSParagraphStyle+ASText] Fixes typo related to testing
* [ASControlNode] Re-add helpful comment
* [ASTextKitCoreTextAdditions] Adds mappings for kCTParagraphStyleSpecifierMinimumLineSpacing, kCTParagraphStyleSpecifierMaximumLineSpacing, kCTParagraphStyleSpecifierLineSpacingAdjustment when mapping CTParagraphStyle onto NSParagraphStyle
[ASTextNode] Uses CoreText-cleansed attributed string when assigning ascender/descender to avoid crash when a CTParagraphStyle is passed as an attribute
* [AsyncDisplayKit] Update project file to include new/deleted files
* [ASControlNode+tvOS] Add missing Foundation import (whoops!)
[ASImageNode+tvOS] Add missing Foundation import (whoops!)
* Update podspec to only link AssetsLibrary framework on iOS
* [ASTextKitCoreTextAdditions] If kCTParagraphStyleAttributeName key-value
evaluates to an NSParagraphStyle, pass through to cleansed attributes. This
fixes a bug that would occur if a CTParagraphStyle was passed as an
attribute _alone_ (would not be caught by unsupported attributes
check)
* [ASMultiplexImageNode] Bump availability check to support < Xcode 9
* [ASTraitCollection] Fixes typo that was causing build to fail
* Clean up formatting to adhere to character/line limit + braces
* 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
* 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()
* Fix alignment of ASImageNodeContentsKey struct to fix hashing
* Change the change log by logging a change
* Add the world's stupidest explicit cast
* Actually its simpler
* [ASTextKitFontSizeAdjuster] Replace use of boundingRectWithSize:options:context: with boundingRectForGlyphRange: inTextContainer:
`boundingRectWithSize:options:context:` started returning different values for the same strings between iOS 10.2 and iOS 10.3. Switching to using `NSLayoutManager`’s `boundingRectForGlyphRange: inTextContainer:` fixed this. It also makes sure we are consistent with what `ASTextKitTailTruncater` uses.
* updated changelog
* Introduce ASCollectionViewLayout
- `ASCollectionViewLayout` is an async `UICollectionViewLayout` that encapsulates its layout calculation logic into a separate thread-safe object which can be used ahead of time and/or on multiple threads.
- `ASDataController` now can prepare for a new layout resulted from a change set before `ASCollectionView` even knows about it. By the time the change set it ready to be consumed by `ASCollectionView`, its new layout is also ready.
- New `ASCollectionViewLayoutCalculating` protocol that is simple and generic enough that many types of calculators can be built on top. `ASCollectionViewLayoutSpecCalculator` conforms to `ASCollectionViewLayoutCalculating` protocol and can be backed by any layout spec (e.g `ASStackLayoutSpec`, `PIMasonryLayoutSpec`, etc). We can even build a `ASCollectionViewLayoutYogaCalculator` that uses Yoga internally.
- A built-in `ASCollectionViewFlowLayoutCalculator` that is a subclass of `ASCollectionViewLayoutSpecCalculator` and uses a multi-threaded multi-line `ASStackLayoutSpec` internally. The result is a performant and thread-safe flow layout calculator.
- Finally, `ASCollectionViewLayout` can be subclassed to handle a specific type of calculator with optimizations implemented based on the knowledge of such calculator. For example, `ASCollectionViewFlowLayout` can have a highly optimized implementation of `-layoutAttributesForElementsInRect:`.
Protocolize layout calculator providing and consuming
Add flex wrap documentation
Add a `multithreaded` flag to ASStackLayoutSpec that forces it to dispatch even if it's off main
- Update ASCollectionViewFlowLayoutSpecCalculator to use that flag.
Minor change in ASCollectionViewLayout
Implement Mosaic layout calculator
Minor change
Fix project file
Rename and fix project file
Skip fetching constrained size only if a layout calculator is available
Update examples/ASCollectionView
Remove unnecessary change in ASTableView
Address comments
Rename collection view calculator protocols
Minor changes after rebasing with master
Add ASLegacyCollectionLayoutCalculator for backward compatibility
Remove ASCollectionLayoutSpecCalculator
Remove ASLegacyCollectionLayoutCalculator
Introduce ASCollectionLayout
- A wrapper object that contains content size and an element to rect table.
- Collection layout calculators to return this new object instead of an ASLayout.
Before adding a content cache
Finishing hooking up ASCollectionLayoutDataSource to ASCollectionNode
Stash
Finish ASCollectionLayout
Rough impl of ASCollectionFlowLayout
Revert changes in CustomCollectionView example
Move ASRectTable back to Private
* Rename ASCollectionContentAttributes to ASCollectionLayoutState
* Address other comments
* Introduce ASCollectionLayoutDelegate and make ASCollectionLayout private
* Address comments
* API tweaks:
- Replace `-layoutContextWithElementMap:` in ASCollectionLayoutDelegate with `-additionalInfoForLayoutWithElements:`. The returned object is then stored in ASCollectionLayoutContext for later lookups.
- ASCollectionLayoutContext has no public initializer.
- ASDataControllerLayoutDelegate no longer requires a context of type ASCollectionLayoutContext but simply an `id`. This helps decouple ASDataController and ASCollectionLayout.
- Rename `elementMap` to `elements`.
- Rename `visibleMap` to `visibleElements`.
- Other minor changes.
* Rename ASCGSizeHash to ASHashFromCGSize
* Make sure to call super in -[ASCollectionLayout prepareLayout]
* Update example/ASCollectionView to use ASCollectionFlowLayoutDelegate
* Remove unnecessary change