Skip to content

Commit

Permalink
Clean up enabled_layout_animations_ios
Browse files Browse the repository at this point in the history
Summary:
This is no longer being used

Changelog: [Internal]

Differential Revision: D63553258
  • Loading branch information
joevilches authored and facebook-github-bot committed Sep 27, 2024
1 parent 33b78ee commit 13951b6
Show file tree
Hide file tree
Showing 20 changed files with 53 additions and 169 deletions.
11 changes: 0 additions & 11 deletions packages/react-native/React/Fabric/RCTScheduler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,6 @@ - (instancetype)initWithToolbox:(SchedulerToolbox)toolbox

_delegateProxy = std::make_shared<SchedulerDelegateProxy>((__bridge void *)self);

if (ReactNativeFeatureFlags::enableLayoutAnimationsOnIOS()) {
_layoutAnimationDelegateProxy = std::make_shared<LayoutAnimationDelegateProxy>((__bridge void *)self);
_animationDriver = std::make_shared<LayoutAnimationDriver>(
toolbox.runtimeExecutor, toolbox.contextContainer, _layoutAnimationDelegateProxy.get());

_uiRunLoopObserver = std::make_unique<MainRunLoopObserver>(
RunLoopObserver::Activity::BeforeWaiting, _layoutAnimationDelegateProxy);

_uiRunLoopObserver->setDelegate(_layoutAnimationDelegateProxy.get());
}

_scheduler = std::make_unique<Scheduler>(
toolbox, (_animationDriver ? _animationDriver.get() : nullptr), _delegateProxy.get());
}
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<<bce0548a9e58299746c75aad95a25275>>
* @generated SignedSource<<0831732fd487c26cf7f36f9fbc88ef98>>
*/

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

/**
* When enabled, LayoutAnimations API will animate state changes on iOS.
*/
@JvmStatic
public fun enableLayoutAnimationsOnIOS(): Boolean = accessor.enableLayoutAnimationsOnIOS()

/**
* Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
*/
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<<19dca512d93d689e927ee5988a43e646>>
* @generated SignedSource<<f90db91a0b1a2dba5d8f1c759e6798c5>>
*/

/**
Expand Down Expand Up @@ -39,7 +39,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var enableFabricRendererExclusivelyCache: Boolean? = null
private var enableGranularShadowTreeStateReconciliationCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
private var enableLongTaskAPICache: Boolean? = null
private var enableMicrotasksCache: Boolean? = null
private var enablePreciseSchedulingForPremountItemsOnAndroidCache: Boolean? = null
Expand Down Expand Up @@ -246,15 +245,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}

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

override fun enableLongTaskAPI(): Boolean {
var cached = enableLongTaskAPICache
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<<76eebf045692e945d39a4ea27a63ae02>>
* @generated SignedSource<<9bd32235ca34f44f03f778c508d4052f>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableMicrotasks(): 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<<8155a9c1309145fefdb19feb33c241db>>
* @generated SignedSource<<cbe3418e2973afca993031b1ea6e3b3a>>
*/

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

override fun enableIOSViewClipToPaddingBox(): Boolean = false

override fun enableLayoutAnimationsOnIOS(): Boolean = true

override fun enableLongTaskAPI(): Boolean = false

override fun enableMicrotasks(): 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<<5e4e474b62996caec15bbf8af9622a0a>>
* @generated SignedSource<<93246d95b89f59f07175bbe4230e31e6>>
*/

/**
Expand Down Expand Up @@ -43,7 +43,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var enableFabricRendererExclusivelyCache: Boolean? = null
private var enableGranularShadowTreeStateReconciliationCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
private var enableLongTaskAPICache: Boolean? = null
private var enableMicrotasksCache: Boolean? = null
private var enablePreciseSchedulingForPremountItemsOnAndroidCache: Boolean? = null
Expand Down Expand Up @@ -269,16 +268,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableLongTaskAPI(): Boolean {
var cached = enableLongTaskAPICache
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<<97eddbbd75ff7cfd0f1c905d72e9eafd>>
* @generated SignedSource<<1248603029a7977711ccb6671a20c880>>
*/

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

@DoNotStrip public fun enableIOSViewClipToPaddingBox(): Boolean

@DoNotStrip public fun enableLayoutAnimationsOnIOS(): Boolean

@DoNotStrip public fun enableLongTaskAPI(): Boolean

@DoNotStrip public fun enableMicrotasks(): 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<<383e9749c506bc2326455ef907e06a4c>>
* @generated SignedSource<<3e195dd509e7d381f5def5a7c538c881>>
*/

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

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

bool enableLongTaskAPI() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableLongTaskAPI");
Expand Down Expand Up @@ -462,11 +456,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableIOSViewClipToPaddingBox(
return ReactNativeFeatureFlags::enableIOSViewClipToPaddingBox();
}

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

bool JReactNativeFeatureFlagsCxxInterop::enableLongTaskAPI(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableLongTaskAPI();
Expand Down Expand Up @@ -711,9 +700,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableIOSViewClipToPaddingBox",
JReactNativeFeatureFlagsCxxInterop::enableIOSViewClipToPaddingBox),
makeNativeMethod(
"enableLayoutAnimationsOnIOS",
JReactNativeFeatureFlagsCxxInterop::enableLayoutAnimationsOnIOS),
makeNativeMethod(
"enableLongTaskAPI",
JReactNativeFeatureFlagsCxxInterop::enableLongTaskAPI),
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<<293ed423f770e7e0ba95b19eb5c28dc2>>
* @generated SignedSource<<99cf91306f26882f41ec79583954ffe2>>
*/

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

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

static bool enableLongTaskAPI(
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<<85cdb5a41317e9671cc23b2c7345c04d>>
* @generated SignedSource<<d589eb875183f8331b58e85f5493d88c>>
*/

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

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

bool ReactNativeFeatureFlags::enableLongTaskAPI() {
return getAccessor().enableLongTaskAPI();
}
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<<ea2c2d19e83630b549e719057cd1982e>>
* @generated SignedSource<<5b718a969b55c6e93e45e153e4dbaa05>>
*/

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

/**
* When enabled, LayoutAnimations API will animate state changes on iOS.
*/
RN_EXPORT static bool enableLayoutAnimationsOnIOS();

/**
* Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
*/
Expand Down
Loading

0 comments on commit 13951b6

Please sign in to comment.