Create a centralized configuration API (#747)

* Update the dangerfile

* Make a trivial change to test new dangerfile

* Try out the new value with another trivial change

* Add a configuration API to make a unified place for pulling config from clients safely

* Specify properties for delegate

* Finish removing text experiment global enable

* Generate the config file

* Clean up configuration to fix tests

* Work on making it serializable

* Finish it up

* Fix example code

* Update sample project

* Clean up a few things

* Align with new project order

* Make it faster and update license header

* Add an option to specify your config at compile time

* Update another license header

* Add a version field, and bring interface state coalescing into configuration

* Update CA queue code

* Update CATransactionQueue tests

* Turn transaction queue on by default (for now, see comment)

* Update the tests

* Update the tests AGAIN

* Remove unused ordered set
This commit is contained in:
Adlai Holler
2018-03-25 12:52:57 -07:00
committed by GitHub
parent 3d9fe8c3a7
commit 27fac9f586
46 changed files with 840 additions and 322 deletions

View File

@@ -16,6 +16,7 @@
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASConfigurationInternal.h>
#import <AsyncDisplayKit/ASLog.h>
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
#import <AsyncDisplayKit/ASRunLoopQueue.h>
@@ -494,7 +495,6 @@ typedef enum {
CFRunLoopObserverRef _postTransactionObserver;
NSPointerArray *_internalQueue;
ASDN::RecursiveMutex _internalQueueLock;
BOOL _disableInterfaceStateCoalesce;
BOOL _CATransactionCommitInProgress;
// In order to not pollute the top-level activities, each queue has 1 root activity.
@@ -671,7 +671,7 @@ static int const kASASCATransactionQueuePostOrder = 3000000;
return;
}
if (_disableInterfaceStateCoalesce || _CATransactionCommitInProgress) {
if (!self.enabled || _CATransactionCommitInProgress) {
[object prepareForCATransactionCommit];
return;
}
@@ -702,14 +702,9 @@ static int const kASASCATransactionQueuePostOrder = 3000000;
return _internalQueue.count == 0;
}
- (void)disable
- (BOOL)isEnabled
{
_disableInterfaceStateCoalesce = YES;
}
- (BOOL)disabled
{
return _disableInterfaceStateCoalesce;
return ASActivateExperimentalFeature(ASExperimentalInterfaceStateCoalescing);
}
@end