Skip to content
Open
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 @@ -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<<132ff30c4a5ecf6b38dd0d6cc47d3abc>>
* @generated SignedSource<<2ac9938108dfe555fc7e7d875cc21987>>
*/

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

/**
* Enables the experimental version of `VirtualViewContainerState`.
*/
@JvmStatic
public fun enableVirtualViewContainerStateExperimental(): Boolean = accessor.enableVirtualViewContainerStateExperimental()

/**
* Enables VirtualView debug features such as logging and overlays.
*/
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<<38838d89c61124afce1f13045593aeb4>>
* @generated SignedSource<<3cb451816d08f2f3cefb757f1e2ce72a>>
*/

/**
Expand Down Expand Up @@ -67,6 +67,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableViewRecyclingForScrollViewCache: Boolean? = null
private var enableViewRecyclingForTextCache: Boolean? = null
private var enableViewRecyclingForViewCache: Boolean? = null
private var enableVirtualViewContainerStateExperimentalCache: Boolean? = null
private var enableVirtualViewDebugFeaturesCache: Boolean? = null
private var enableVirtualViewRenderStateCache: Boolean? = null
private var enableVirtualViewWindowFocusDetectionCache: Boolean? = null
Expand Down Expand Up @@ -524,6 +525,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableVirtualViewDebugFeatures(): Boolean {
var cached = enableVirtualViewDebugFeaturesCache
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<<ef75a380b395d88cb0551d3a44d9961d>>
* @generated SignedSource<<de0fe8d116ca48e918f67c4c32f1183f>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableVirtualViewRenderState(): 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<<c601ddc9bd62282f8079d0cb3578675d>>
* @generated SignedSource<<674f7910fe5dcd750ba2661122c82670>>
*/

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

override fun enableViewRecyclingForView(): Boolean = true

override fun enableVirtualViewContainerStateExperimental(): Boolean = false

override fun enableVirtualViewDebugFeatures(): Boolean = false

override fun enableVirtualViewRenderState(): 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<<2fa1e7cd2e1d4009dfa09a5fd27a872a>>
* @generated SignedSource<<5facf1328467d62b41dd9f82c5111882>>
*/

/**
Expand Down Expand Up @@ -71,6 +71,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableViewRecyclingForScrollViewCache: Boolean? = null
private var enableViewRecyclingForTextCache: Boolean? = null
private var enableViewRecyclingForViewCache: Boolean? = null
private var enableVirtualViewContainerStateExperimentalCache: Boolean? = null
private var enableVirtualViewDebugFeaturesCache: Boolean? = null
private var enableVirtualViewRenderStateCache: Boolean? = null
private var enableVirtualViewWindowFocusDetectionCache: Boolean? = null
Expand Down Expand Up @@ -575,6 +576,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun enableVirtualViewDebugFeatures(): Boolean {
var cached = enableVirtualViewDebugFeaturesCache
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<<901e5678bff081bcb6b8e2d46364b977>>
* @generated SignedSource<<5a9a51638a72bda657f312260bb1297a>>
*/

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

@DoNotStrip public fun enableViewRecyclingForView(): Boolean

@DoNotStrip public fun enableVirtualViewContainerStateExperimental(): Boolean

@DoNotStrip public fun enableVirtualViewDebugFeatures(): Boolean

@DoNotStrip public fun enableVirtualViewRenderState(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.facebook.react.uimanager.ReactClippingViewGroup
import com.facebook.react.uimanager.ReactRoot
import com.facebook.react.views.scroll.VirtualView
import com.facebook.react.views.scroll.VirtualViewContainer
import com.facebook.react.views.scroll.debugLog
import com.facebook.react.views.view.ReactViewGroup
import com.facebook.react.views.virtual.VirtualViewMode
import com.facebook.react.views.virtual.VirtualViewModeChangeEmitter
Expand Down Expand Up @@ -293,7 +292,7 @@ public class ReactVirtualViewExperimental(context: Context) :

internal inline fun debugLog(subtag: String, block: () -> String = { "" }) {
if (IS_DEBUG_BUILD && ReactNativeFeatureFlags.enableVirtualViewDebugFeatures()) {
FLog.d("$DEBUG_TAG:[$virtualViewID]:$subtag", "${block()}")
FLog.d("$DEBUG_TAG:[$virtualViewID]:$subtag", block())
}
}
}
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<<285ec8cc3b3e5f55c5c31106b6df8717>>
* @generated SignedSource<<d54fab7b1b7bfb99ed1ff6ba0141a013>>
*/

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

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

bool enableVirtualViewDebugFeatures() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableVirtualViewDebugFeatures");
Expand Down Expand Up @@ -758,6 +764,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableViewRecyclingForView(
return ReactNativeFeatureFlags::enableViewRecyclingForView();
}

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

bool JReactNativeFeatureFlagsCxxInterop::enableVirtualViewDebugFeatures(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableVirtualViewDebugFeatures();
Expand Down Expand Up @@ -1095,6 +1106,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableViewRecyclingForView",
JReactNativeFeatureFlagsCxxInterop::enableViewRecyclingForView),
makeNativeMethod(
"enableVirtualViewContainerStateExperimental",
JReactNativeFeatureFlagsCxxInterop::enableVirtualViewContainerStateExperimental),
makeNativeMethod(
"enableVirtualViewDebugFeatures",
JReactNativeFeatureFlagsCxxInterop::enableVirtualViewDebugFeatures),
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<<34ad93365b68934d051b0de522a36014>>
* @generated SignedSource<<5789c040408e16ad3e5f79b169084c15>>
*/

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

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

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

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<<5fe8801a343267a840956183ca93c757>>
* @generated SignedSource<<d65469ea355ee606c40814c142a391f7>>
*/

/**
Expand Down Expand Up @@ -214,6 +214,10 @@ bool ReactNativeFeatureFlags::enableViewRecyclingForView() {
return getAccessor().enableViewRecyclingForView();
}

bool ReactNativeFeatureFlags::enableVirtualViewContainerStateExperimental() {
return getAccessor().enableVirtualViewContainerStateExperimental();
}

bool ReactNativeFeatureFlags::enableVirtualViewDebugFeatures() {
return getAccessor().enableVirtualViewDebugFeatures();
}
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<<67cb9ad627e865b24b380be1ef6e0db7>>
* @generated SignedSource<<1067eff3cc68c8aa3177974dd13b7845>>
*/

/**
Expand Down Expand Up @@ -274,6 +274,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableViewRecyclingForView();

/**
* Enables the experimental version of `VirtualViewContainerState`.
*/
RN_EXPORT static bool enableVirtualViewContainerStateExperimental();

/**
* Enables VirtualView debug features such as logging and overlays.
*/
Expand Down
Loading
Loading