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 facebook-github-bot committed Nov 30, 2022
1 parent 3c5a829 commit 0569f65
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions ReactAndroid/src/main/jni/react/fabric/Binding.cpp
Original file line number Diff line number Diff line change
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 0569f65

Please sign in to comment.