Delete removeOutstandingSurfacesOnDestruction flag (#45630)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45630

removeOutstandingSurfacesOnDestruction is safe to fully release, we are deleting the flag

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D60142272

fbshipit-source-id: 5e7470d52cfc964b72f0cec7224a234ce9e6c2c4
This commit is contained in:
David Vacca
2024-07-28 15:04:19 -07:00
committed by Facebook GitHub Bot
parent 19a63e1b16
commit 5386ecea80
2 changed files with 3 additions and 17 deletions
@@ -144,13 +144,6 @@ Scheduler::Scheduler(
}
uiManager_->setAnimationDelegate(animationDelegate);
#ifdef ANDROID
removeOutstandingSurfacesOnDestruction_ = true;
#else
removeOutstandingSurfacesOnDestruction_ = reactNativeConfig_->getBool(
"react_fabric:remove_outstanding_surfaces_on_destruction_ios");
#endif
if (ReactNativeFeatureFlags::enableReportEventPaintTime()) {
uiManager->registerMountHook(*eventPerformanceLogger_);
}
@@ -203,11 +196,9 @@ Scheduler::~Scheduler() {
surfaceId,
[](const ShadowTree& shadowTree) { shadowTree.commitEmptyTree(); });
// Removing surfaces is gated because it acquires mutex waiting for commits
// in flight; in theory, it can deadlock.
if (removeOutstandingSurfacesOnDestruction_) {
uiManager_->getShadowTreeRegistry().remove(surfaceId);
}
// Removing surfaces acquires mutex waiting for commits in flight; in
// theory, it can deadlock.
uiManager_->getShadowTreeRegistry().remove(surfaceId);
}
}
@@ -141,11 +141,6 @@ class Scheduler final : public UIManagerDelegate {
* Must not be nullptr.
*/
ContextContainer::Shared contextContainer_;
/*
* Temporary flags.
*/
bool removeOutstandingSurfacesOnDestruction_{false};
};
} // namespace facebook::react