mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
delete shouldYield from commit options (#47191)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47191 changelog: [internal] not used, let's delete it. Reviewed By: javache, rubennorte Differential Revision: D64916432 fbshipit-source-id: 182848c85ca58d4e8fae3c6ab67c781807803dff
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a88ddcecc9
commit
db09e7c2e5
@@ -279,8 +279,7 @@ CommitStatus ShadowTree::tryCommit(
|
||||
const auto& oldRootShadowNode = oldRevision.rootShadowNode;
|
||||
auto newRootShadowNode = transaction(*oldRevision.rootShadowNode);
|
||||
|
||||
if (!newRootShadowNode ||
|
||||
(commitOptions.shouldYield && commitOptions.shouldYield())) {
|
||||
if (!newRootShadowNode) {
|
||||
return CommitStatus::Cancelled;
|
||||
}
|
||||
|
||||
@@ -297,8 +296,7 @@ CommitStatus ShadowTree::tryCommit(
|
||||
newRootShadowNode = delegate_.shadowTreeWillCommit(
|
||||
*this, oldRootShadowNode, newRootShadowNode);
|
||||
|
||||
if (!newRootShadowNode ||
|
||||
(commitOptions.shouldYield && commitOptions.shouldYield())) {
|
||||
if (!newRootShadowNode) {
|
||||
return CommitStatus::Cancelled;
|
||||
}
|
||||
|
||||
@@ -316,10 +314,6 @@ CommitStatus ShadowTree::tryCommit(
|
||||
// Updating `currentRevision_` in unique manner if it hasn't changed.
|
||||
std::unique_lock lock(commitMutex_);
|
||||
|
||||
if (commitOptions.shouldYield && commitOptions.shouldYield()) {
|
||||
return CommitStatus::Cancelled;
|
||||
}
|
||||
|
||||
if (ReactNativeFeatureFlags::
|
||||
enableGranularShadowTreeStateReconciliation()) {
|
||||
auto lastRevisionNumberWithNewStateChanged =
|
||||
|
||||
@@ -66,10 +66,6 @@ class ShadowTree final {
|
||||
// will then let React run layout effects and apply updates before paint.
|
||||
// For all other commits, should be true.
|
||||
bool mountSynchronously{true};
|
||||
|
||||
// Called during `tryCommit` phase. Returning true indicates current commit
|
||||
// should yield to the next commit.
|
||||
std::function<bool()> shouldYield;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -483,9 +483,7 @@ jsi::Value UIManagerBinding::get(
|
||||
uiManager->completeSurface(
|
||||
surfaceId,
|
||||
shadowNodeList,
|
||||
{.enableStateReconciliation = true,
|
||||
.mountSynchronously = false,
|
||||
.shouldYield = nullptr});
|
||||
{.enableStateReconciliation = true, .mountSynchronously = false});
|
||||
|
||||
return jsi::Value::undefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user