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 @@ -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<<ce122427070db337420728a1028bc2b6>>
* @generated SignedSource<<6b632ac7553ae149fa42a67efde5acfa>>
*/

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

/**
* When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout and batch them together in a single JNI call
*/
@JvmStatic
public fun enableImagePrefetchingJNIBatchingAndroid(): Boolean = accessor.enableImagePrefetchingJNIBatchingAndroid()

/**
* When enabled, Android will initiate image prefetch requested on ImageShadowNode::layout on the UI thread
*/
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<<e7581ab264bca8b059723bd7bd788790>>
* @generated SignedSource<<c228bdbf6120b4715f49e03c04918a7c>>
*/

/**
Expand Down Expand Up @@ -45,6 +45,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableImagePrefetchingJNIBatchingAndroidCache: Boolean? = null
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
private var enableImperativeFocusCache: Boolean? = null
Expand Down Expand Up @@ -320,6 +321,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableImagePrefetchingOnUiThreadAndroid(): Boolean {
var cached = enableImagePrefetchingOnUiThreadAndroidCache
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<<d73f5df2130479a4cd1000dc76b15d1b>>
* @generated SignedSource<<26dce1945df5641ab84cbca9eaf2b10f>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableImmediateUpdateModeForContentOffsetChanges(): 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<<4fa15189361a6c92bdd44bafc9356167>>
* @generated SignedSource<<11051ece1b61fd4bf4ca003a3b7fc4f9>>
*/

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

override fun enableImagePrefetchingAndroid(): Boolean = false

override fun enableImagePrefetchingJNIBatchingAndroid(): Boolean = false

override fun enableImagePrefetchingOnUiThreadAndroid(): Boolean = false

override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = false
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<<962c60d1761b0a1f4945b44767aa7b02>>
* @generated SignedSource<<66fa583c37021750123a483ab0ccb030>>
*/

/**
Expand Down Expand Up @@ -49,6 +49,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableImagePrefetchingJNIBatchingAndroidCache: Boolean? = null
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
private var enableImperativeFocusCache: Boolean? = null
Expand Down Expand Up @@ -349,6 +350,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun enableImagePrefetchingOnUiThreadAndroid(): Boolean {
var cached = enableImagePrefetchingOnUiThreadAndroidCache
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<<f9f3dee3dde2f7f6f851ce4525a4ebec>>
* @generated SignedSource<<f26998daf87c8b90c2ec822c8316b134>>
*/

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

@DoNotStrip public fun enableImagePrefetchingAndroid(): Boolean

@DoNotStrip public fun enableImagePrefetchingJNIBatchingAndroid(): Boolean

@DoNotStrip public fun enableImagePrefetchingOnUiThreadAndroid(): Boolean

@DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): 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<<de817bc06ae5ef584db08d6a094c9d03>>
* @generated SignedSource<<8e1821e9a153a4b725890cb4a7f262ee>>
*/

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

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

bool enableImagePrefetchingOnUiThreadAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableImagePrefetchingOnUiThreadAndroid");
Expand Down Expand Up @@ -612,6 +618,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingAndroid(
return ReactNativeFeatureFlags::enableImagePrefetchingAndroid();
}

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

bool JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingOnUiThreadAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableImagePrefetchingOnUiThreadAndroid();
Expand Down Expand Up @@ -963,6 +974,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableImagePrefetchingAndroid",
JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingAndroid),
makeNativeMethod(
"enableImagePrefetchingJNIBatchingAndroid",
JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingJNIBatchingAndroid),
makeNativeMethod(
"enableImagePrefetchingOnUiThreadAndroid",
JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingOnUiThreadAndroid),
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<<f163997b1149c1f1ac1e60f273a5448f>>
* @generated SignedSource<<5be2ec52bda638a1eac837c402149b9f>>
*/

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

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

static bool enableImagePrefetchingOnUiThreadAndroid(
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<<50f81f60d4c2d2e08fde98f4a2d841ea>>
* @generated SignedSource<<e335c5069e7fe7a67f2d754602d2200e>>
*/

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

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

bool ReactNativeFeatureFlags::enableImagePrefetchingOnUiThreadAndroid() {
return getAccessor().enableImagePrefetchingOnUiThreadAndroid();
}
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<<3446eebd26c1142fd78cd5413771569d>>
* @generated SignedSource<<bad2aadea64eba29430e9c93c169d621>>
*/

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

/**
* When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout and batch them together in a single JNI call
*/
RN_EXPORT static bool enableImagePrefetchingJNIBatchingAndroid();

/**
* When enabled, Android will initiate image prefetch requested on ImageShadowNode::layout on the UI thread
*/
Expand Down
Loading
Loading