Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#import <React/UIView+React.h>
#import <jsi/jsi.h>

#import <react/featureflags/ReactNativeFeatureFlags.h>
#import <react/renderer/components/FBReactNativeSpec/ComponentDescriptors.h>
#import <react/renderer/components/FBReactNativeSpec/EventEmitters.h>
#import <react/renderer/components/FBReactNativeSpec/Props.h>
Expand Down Expand Up @@ -65,9 +64,6 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &

if (!_mode.has_value()) {
_mode = newViewProps.initialHidden ? RCTVirtualViewModeHidden : RCTVirtualViewModeVisible;
if (ReactNativeFeatureFlags::hideOffscreenVirtualViewsOnIOS()) {
self.hidden = newViewProps.initialHidden && !sIsAccessibilityUsed;
}
}

switch (newViewProps.renderState) {
Expand Down Expand Up @@ -211,20 +207,6 @@ - (void)onModeChange:(RCTVirtualViewMode)newMode targetRect:(CGRect)targetRect t
[self _dispatchAsyncModeChange:event];
break;
}

if (ReactNativeFeatureFlags::hideOffscreenVirtualViewsOnIOS()) {
switch (newMode) {
case RCTVirtualViewModeVisible:
self.hidden = NO;
break;
case RCTVirtualViewModePrerender:
self.hidden = !sIsAccessibilityUsed;
break;
case RCTVirtualViewModeHidden:
self.hidden = YES;
break;
}
}
}

#pragma mark - Private API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7e91da9df64ce42424101d7d72356c4a>>
* @generated SignedSource<<17567d3adfba54ec2f888b50dae9efb8>>
*/

/**
Expand Down Expand Up @@ -132,12 +132,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableDestroyShadowTreeRevisionAsync(): Boolean = accessor.enableDestroyShadowTreeRevisionAsync()

/**
* Pre-allocate mutation vectors in the Differentiator to reduce reallocation overhead during shadow view diffing.
*/
@JvmStatic
public fun enableDifferentiatorMutationVectorPreallocation(): Boolean = accessor.enableDifferentiatorMutationVectorPreallocation()

/**
* When enabled a subset of components will avoid double measurement on Android.
*/
Expand Down Expand Up @@ -390,12 +384,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun fuseboxScreenshotCaptureEnabled(): Boolean = accessor.fuseboxScreenshotCaptureEnabled()

/**
* Hides offscreen VirtualViews on iOS by setting hidden = YES to avoid extra cost of views
*/
@JvmStatic
public fun hideOffscreenVirtualViewsOnIOS(): Boolean = accessor.hideOffscreenVirtualViewsOnIOS()

/**
* When enabled, uses optimized platform-specific paths to apply animated props synchronously. On Android, this uses a batched int/double buffer protocol with a single JNI call. On iOS, this passes AnimatedProps directly through the delegate chain and applies them via cloneProps, avoiding the folly::dynamic round-trip.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3c0e10dee93b76f3e66ca79d26f2b4f2>>
* @generated SignedSource<<337b652caa9d443c8d83915e22210198>>
*/

/**
Expand Down Expand Up @@ -37,7 +37,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableCppPropsIteratorSetterCache: Boolean? = null
private var enableCustomFocusSearchOnClippedElementsAndroidCache: Boolean? = null
private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null
private var enableDifferentiatorMutationVectorPreallocationCache: Boolean? = null
private var enableDoubleMeasurementFixAndroidCache: Boolean? = null
private var enableEagerRootViewAttachmentCache: Boolean? = null
private var enableExclusivePropsUpdateAndroidCache: Boolean? = null
Expand Down Expand Up @@ -80,7 +79,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var fuseboxFrameRecordingEnabledCache: Boolean? = null
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
private var fuseboxScreenshotCaptureEnabledCache: Boolean? = null
private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null
private var optimizedAnimatedPropUpdatesCache: Boolean? = null
private var overrideBySynchronousMountPropsAtMountingAndroidCache: Boolean? = null
private var perfIssuesEnabledCache: Boolean? = null
Expand Down Expand Up @@ -262,15 +260,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun enableDifferentiatorMutationVectorPreallocation(): Boolean {
var cached = enableDifferentiatorMutationVectorPreallocationCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableDifferentiatorMutationVectorPreallocation()
enableDifferentiatorMutationVectorPreallocationCache = cached
}
return cached
}

override fun enableDoubleMeasurementFixAndroid(): Boolean {
var cached = enableDoubleMeasurementFixAndroidCache
if (cached == null) {
Expand Down Expand Up @@ -649,15 +638,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun hideOffscreenVirtualViewsOnIOS(): Boolean {
var cached = hideOffscreenVirtualViewsOnIOSCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.hideOffscreenVirtualViewsOnIOS()
hideOffscreenVirtualViewsOnIOSCache = cached
}
return cached
}

override fun optimizedAnimatedPropUpdates(): Boolean {
var cached = optimizedAnimatedPropUpdatesCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e9cc7d01ac1884710f131fbf375f3502>>
* @generated SignedSource<<b74d90991a4808bd1f3abfa75f3adcde>>
*/

/**
Expand Down Expand Up @@ -62,8 +62,6 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun enableDestroyShadowTreeRevisionAsync(): Boolean

@DoNotStrip @JvmStatic public external fun enableDifferentiatorMutationVectorPreallocation(): Boolean

@DoNotStrip @JvmStatic public external fun enableDoubleMeasurementFixAndroid(): Boolean

@DoNotStrip @JvmStatic public external fun enableEagerRootViewAttachment(): Boolean
Expand Down Expand Up @@ -148,8 +146,6 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun fuseboxScreenshotCaptureEnabled(): Boolean

@DoNotStrip @JvmStatic public external fun hideOffscreenVirtualViewsOnIOS(): Boolean

@DoNotStrip @JvmStatic public external fun optimizedAnimatedPropUpdates(): Boolean

@DoNotStrip @JvmStatic public external fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<061d668cf04041f4d3d2f48f11dc739f>>
* @generated SignedSource<<5dff51ac171647871bef84c3e38d9d8c>>
*/

/**
Expand Down Expand Up @@ -57,8 +57,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun enableDestroyShadowTreeRevisionAsync(): Boolean = false

override fun enableDifferentiatorMutationVectorPreallocation(): Boolean = false

override fun enableDoubleMeasurementFixAndroid(): Boolean = false

override fun enableEagerRootViewAttachment(): Boolean = false
Expand Down Expand Up @@ -143,8 +141,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun fuseboxScreenshotCaptureEnabled(): Boolean = false

override fun hideOffscreenVirtualViewsOnIOS(): Boolean = false

override fun optimizedAnimatedPropUpdates(): Boolean = false

override fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<fa85d53197cbdce6b1373fbadf3cf2b9>>
* @generated SignedSource<<164c9c2751f660ee098c12b8cf2c8b66>>
*/

/**
Expand Down Expand Up @@ -41,7 +41,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableCppPropsIteratorSetterCache: Boolean? = null
private var enableCustomFocusSearchOnClippedElementsAndroidCache: Boolean? = null
private var enableDestroyShadowTreeRevisionAsyncCache: Boolean? = null
private var enableDifferentiatorMutationVectorPreallocationCache: Boolean? = null
private var enableDoubleMeasurementFixAndroidCache: Boolean? = null
private var enableEagerRootViewAttachmentCache: Boolean? = null
private var enableExclusivePropsUpdateAndroidCache: Boolean? = null
Expand Down Expand Up @@ -84,7 +83,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var fuseboxFrameRecordingEnabledCache: Boolean? = null
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
private var fuseboxScreenshotCaptureEnabledCache: Boolean? = null
private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null
private var optimizedAnimatedPropUpdatesCache: Boolean? = null
private var overrideBySynchronousMountPropsAtMountingAndroidCache: Boolean? = null
private var perfIssuesEnabledCache: Boolean? = null
Expand Down Expand Up @@ -283,16 +281,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun enableDifferentiatorMutationVectorPreallocation(): Boolean {
var cached = enableDifferentiatorMutationVectorPreallocationCache
if (cached == null) {
cached = currentProvider.enableDifferentiatorMutationVectorPreallocation()
accessedFeatureFlags.add("enableDifferentiatorMutationVectorPreallocation")
enableDifferentiatorMutationVectorPreallocationCache = cached
}
return cached
}

override fun enableDoubleMeasurementFixAndroid(): Boolean {
var cached = enableDoubleMeasurementFixAndroidCache
if (cached == null) {
Expand Down Expand Up @@ -713,16 +701,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun hideOffscreenVirtualViewsOnIOS(): Boolean {
var cached = hideOffscreenVirtualViewsOnIOSCache
if (cached == null) {
cached = currentProvider.hideOffscreenVirtualViewsOnIOS()
accessedFeatureFlags.add("hideOffscreenVirtualViewsOnIOS")
hideOffscreenVirtualViewsOnIOSCache = cached
}
return cached
}

override fun optimizedAnimatedPropUpdates(): Boolean {
var cached = optimizedAnimatedPropUpdatesCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a460b28871fc3f928dcc2d1a3bf66422>>
* @generated SignedSource<<b9cfc6790e36d7f7ff0ce9b87edca1e8>>
*/

/**
Expand Down Expand Up @@ -57,8 +57,6 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun enableDestroyShadowTreeRevisionAsync(): Boolean

@DoNotStrip public fun enableDifferentiatorMutationVectorPreallocation(): Boolean

@DoNotStrip public fun enableDoubleMeasurementFixAndroid(): Boolean

@DoNotStrip public fun enableEagerRootViewAttachment(): Boolean
Expand Down Expand Up @@ -143,8 +141,6 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun fuseboxScreenshotCaptureEnabled(): Boolean

@DoNotStrip public fun hideOffscreenVirtualViewsOnIOS(): Boolean

@DoNotStrip public fun optimizedAnimatedPropUpdates(): Boolean

@DoNotStrip public fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ea8284ad906ae89281a3fbd849e88c19>>
* @generated SignedSource<<ff63bb537a04e29fdb97e9d87fb7570c>>
*/

/**
Expand Down Expand Up @@ -141,12 +141,6 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool enableDifferentiatorMutationVectorPreallocation() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableDifferentiatorMutationVectorPreallocation");
return method(javaProvider_);
}

bool enableDoubleMeasurementFixAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableDoubleMeasurementFixAndroid");
Expand Down Expand Up @@ -399,12 +393,6 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool hideOffscreenVirtualViewsOnIOS() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("hideOffscreenVirtualViewsOnIOS");
return method(javaProvider_);
}

bool optimizedAnimatedPropUpdates() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("optimizedAnimatedPropUpdates");
Expand Down Expand Up @@ -656,11 +644,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableDestroyShadowTreeRevisionAsync(
return ReactNativeFeatureFlags::enableDestroyShadowTreeRevisionAsync();
}

bool JReactNativeFeatureFlagsCxxInterop::enableDifferentiatorMutationVectorPreallocation(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableDifferentiatorMutationVectorPreallocation();
}

bool JReactNativeFeatureFlagsCxxInterop::enableDoubleMeasurementFixAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableDoubleMeasurementFixAndroid();
Expand Down Expand Up @@ -871,11 +854,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fuseboxScreenshotCaptureEnabled(
return ReactNativeFeatureFlags::fuseboxScreenshotCaptureEnabled();
}

bool JReactNativeFeatureFlagsCxxInterop::hideOffscreenVirtualViewsOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::hideOffscreenVirtualViewsOnIOS();
}

bool JReactNativeFeatureFlagsCxxInterop::optimizedAnimatedPropUpdates(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::optimizedAnimatedPropUpdates();
Expand Down Expand Up @@ -1093,9 +1071,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableDestroyShadowTreeRevisionAsync",
JReactNativeFeatureFlagsCxxInterop::enableDestroyShadowTreeRevisionAsync),
makeNativeMethod(
"enableDifferentiatorMutationVectorPreallocation",
JReactNativeFeatureFlagsCxxInterop::enableDifferentiatorMutationVectorPreallocation),
makeNativeMethod(
"enableDoubleMeasurementFixAndroid",
JReactNativeFeatureFlagsCxxInterop::enableDoubleMeasurementFixAndroid),
Expand Down Expand Up @@ -1222,9 +1197,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"fuseboxScreenshotCaptureEnabled",
JReactNativeFeatureFlagsCxxInterop::fuseboxScreenshotCaptureEnabled),
makeNativeMethod(
"hideOffscreenVirtualViewsOnIOS",
JReactNativeFeatureFlagsCxxInterop::hideOffscreenVirtualViewsOnIOS),
makeNativeMethod(
"optimizedAnimatedPropUpdates",
JReactNativeFeatureFlagsCxxInterop::optimizedAnimatedPropUpdates),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<746da63dcbec1bb165731e7380993659>>
* @generated SignedSource<<a61fa73c8b01506a3eb1caa411a5854f>>
*/

/**
Expand Down Expand Up @@ -81,9 +81,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableDestroyShadowTreeRevisionAsync(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableDifferentiatorMutationVectorPreallocation(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableDoubleMeasurementFixAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down Expand Up @@ -210,9 +207,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool fuseboxScreenshotCaptureEnabled(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool hideOffscreenVirtualViewsOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool optimizedAnimatedPropUpdates(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Loading
Loading