mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Fabric has a feature that preallocates views before mounting even need them. We never tested the impact of this feature thought. This diff adds a way to enable/disable it and run an experiment. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D24355612 fbshipit-source-id: fefd653e57232044cd7b28b160e12a4ef85dbb8b
72 lines
1.6 KiB
Objective-C
72 lines
1.6 KiB
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import "RCTConstants.h"
|
|
|
|
NSString *const RCTUserInterfaceStyleDidChangeNotification = @"RCTUserInterfaceStyleDidChangeNotification";
|
|
NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey = @"traitCollection";
|
|
|
|
/*
|
|
* On-demand view mounting
|
|
*/
|
|
static BOOL RCTExperimentOnDemandViewMounting = NO;
|
|
|
|
BOOL RCTExperimentGetOnDemandViewMounting()
|
|
{
|
|
return RCTExperimentOnDemandViewMounting;
|
|
}
|
|
|
|
void RCTExperimentSetOnDemandViewMounting(BOOL value)
|
|
{
|
|
RCTExperimentOnDemandViewMounting = value;
|
|
}
|
|
|
|
/*
|
|
* Sync performance flag
|
|
*/
|
|
static BOOL RCTExperimentSyncPerformanceFlag = NO;
|
|
|
|
BOOL RCTExperimentGetSyncPerformanceFlag()
|
|
{
|
|
return RCTExperimentSyncPerformanceFlag;
|
|
}
|
|
|
|
void RCTExperimentSetSyncPerformanceFlag(BOOL value)
|
|
{
|
|
RCTExperimentSyncPerformanceFlag = value;
|
|
}
|
|
|
|
/*
|
|
* Optimized hit-testing
|
|
*/
|
|
static BOOL RCTExperimentOptimizedHitTesting = NO;
|
|
|
|
BOOL RCTExperimentGetOptimizedHitTesting()
|
|
{
|
|
return RCTExperimentOptimizedHitTesting;
|
|
}
|
|
|
|
void RCTExperimentSetOptimizedHitTesting(BOOL value)
|
|
{
|
|
RCTExperimentOptimizedHitTesting = value;
|
|
}
|
|
|
|
/*
|
|
* Preemptive View Allocation
|
|
*/
|
|
static BOOL RCTExperimentPreemptiveViewAllocationDisabled = NO;
|
|
|
|
BOOL RCTExperimentGetPreemptiveViewAllocationDisabled()
|
|
{
|
|
return RCTExperimentPreemptiveViewAllocationDisabled;
|
|
}
|
|
|
|
void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value)
|
|
{
|
|
RCTExperimentPreemptiveViewAllocationDisabled = value;
|
|
}
|