Files
react-native/React/Base/RCTConstants.m
T
Valentin Shergin 2103839525 Fabric: Optimized hit-testing
Summary:
An experiment where we use `LayoutMetrics::overflowInset` to optimize performance of hit-testing algorithm.
In my measurements enabling this feature drastically (2x) reduced amount of calls to `hitTest:withEvent:` method.

Reviewed By: sammy-SC

Differential Revision: D23669091

fbshipit-source-id: ac6dadc90b6a2fbb45e41e0d4a113bd5ae8f1218
2020-09-15 22:29:30 -07:00

57 lines
1.2 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;
}