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

Large diffs are not rendered by default.

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<<f930d8c04c79ad156af580f2818fef24>>
* @generated SignedSource<<fa3d35be13801d5991e6bfb2cef2ef43>>
*/

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

/**
* When enabled, ImageShadowNode downgrades image requests to prefetch priority when layout determines that the image does not intersect the viewport.
*/
@JvmStatic
public fun enableImageRequestDowngradingForNonVisibleImages(): Boolean = accessor.enableImageRequestDowngradingForNonVisibleImages()

/**
* Dispatches state updates for content offset changes synchronously on the main 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<<5072b83512e1a86dc1382268f18916f4>>
* @generated SignedSource<<c8e71de4517634933754c6e7a6e8ac92>>
*/

/**
Expand Down Expand Up @@ -47,6 +47,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableImageRequestDowngradingForNonVisibleImagesCache: Boolean? = null
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
private var enableImperativeFocusCache: Boolean? = null
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
Expand Down Expand Up @@ -351,6 +352,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean {
var cached = enableImmediateUpdateModeForContentOffsetChangesCache
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<<9110ccc69266f7a51738ca533df3a150>>
* @generated SignedSource<<9d3495c774e4367973974a4f83ea7d16>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableImperativeFocus(): 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<<cc3e924846873a6c82f15a81e429a201>>
* @generated SignedSource<<811ccbada43f15c9418e0177041c5747>>
*/

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

override fun enableImagePrefetchingAndroid(): Boolean = false

override fun enableImageRequestDowngradingForNonVisibleImages(): Boolean = false

override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = false

override fun enableImperativeFocus(): 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<<135694971d264d19c84eb6aea5fc8425>>
* @generated SignedSource<<69c333993720f22c6db80f3aceae32cd>>
*/

/**
Expand Down Expand Up @@ -51,6 +51,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableImageRequestDowngradingForNonVisibleImagesCache: Boolean? = null
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
private var enableImperativeFocusCache: Boolean? = null
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
Expand Down Expand Up @@ -382,6 +383,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean {
var cached = enableImmediateUpdateModeForContentOffsetChangesCache
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<<c578ce107e944645965622c45645ac2d>>
* @generated SignedSource<<cb5de865c68dfd9b7b7b2d86d9fb090b>>
*/

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

@DoNotStrip public fun enableImagePrefetchingAndroid(): Boolean

@DoNotStrip public fun enableImageRequestDowngradingForNonVisibleImages(): Boolean

@DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean

@DoNotStrip public fun enableImperativeFocus(): 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<<da3ebdd27e001a680c569192712eab7f>>
* @generated SignedSource<<f667d1281347eeacfca65411acdf6dc7>>
*/

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

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

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

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

bool JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffsetChanges(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
Expand Down Expand Up @@ -1112,6 +1123,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableImagePrefetchingAndroid",
JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingAndroid),
makeNativeMethod(
"enableImageRequestDowngradingForNonVisibleImages",
JReactNativeFeatureFlagsCxxInterop::enableImageRequestDowngradingForNonVisibleImages),
makeNativeMethod(
"enableImmediateUpdateModeForContentOffsetChanges",
JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffsetChanges),
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<<1655eb2f217476e64b03c97bce083192>>
* @generated SignedSource<<f2dbc5e247060946295f35a07191c213>>
*/

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

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

static bool enableImmediateUpdateModeForContentOffsetChanges(
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<<d3b31e5d51537d44d19f72b2d48f97f4>>
* @generated SignedSource<<177c370caf828494ce42486af0d8c698>>
*/

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

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

bool ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges() {
return getAccessor().enableImmediateUpdateModeForContentOffsetChanges();
}
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<<7299ac6603eb90d63d6cfb21e7ef3893>>
* @generated SignedSource<<5ff6ec567d516d966cb2fadfc5cc93b3>>
*/

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

/**
* When enabled, ImageShadowNode downgrades image requests to prefetch priority when layout determines that the image does not intersect the viewport.
*/
RN_EXPORT static bool enableImageRequestDowngradingForNonVisibleImages();

/**
* Dispatches state updates for content offset changes synchronously on the main thread.
*/
Expand Down
Loading
Loading