Skip to content

Commit

Permalink
Clean up unnecessary lambda function for preallocate after D40403682
Browse files Browse the repository at this point in the history
Summary: `dispatchPreallocationInBackground_` is removed and we don't need to use the lambda function anymore.

Reviewed By: javache

Differential Revision: D41574447

fbshipit-source-id: 9c2b8a067fb86b75320b338e3f8c7989315f9b8b
  • Loading branch information
Xin Chen authored and pull[bot] committed Nov 27, 2023
1 parent 14130a6 commit 7902460
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions ReactAndroid/src/main/jni/react/fabric/Binding.cpp
Expand Up @@ -528,18 +528,12 @@ void Binding::preallocateView(
}

auto shadowView = ShadowView(shadowNode);
auto preallocationFunction = [this,
surfaceId,
shadowView = std::move(shadowView)] {
auto mountingManager = verifyMountingManager("Binding::preallocateView");
if (!mountingManager) {
return;
}

mountingManager->preallocateShadowView(surfaceId, shadowView);
};
auto mountingManager = verifyMountingManager("Binding::preallocateView");
if (!mountingManager) {
return;
}

preallocationFunction();
mountingManager->preallocateShadowView(surfaceId, shadowView);
}

void Binding::schedulerDidDispatchCommand(
Expand Down

0 comments on commit 7902460

Please sign in to comment.