Skip to content

Commit 7902460

Browse files
Xin Chenpull[bot]
authored andcommitted
Clean up unnecessary lambda function for preallocate after D40403682
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
1 parent 14130a6 commit 7902460

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

ReactAndroid/src/main/jni/react/fabric/Binding.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -528,18 +528,12 @@ void Binding::preallocateView(
528528
}
529529

530530
auto shadowView = ShadowView(shadowNode);
531-
auto preallocationFunction = [this,
532-
surfaceId,
533-
shadowView = std::move(shadowView)] {
534-
auto mountingManager = verifyMountingManager("Binding::preallocateView");
535-
if (!mountingManager) {
536-
return;
537-
}
538-
539-
mountingManager->preallocateShadowView(surfaceId, shadowView);
540-
};
531+
auto mountingManager = verifyMountingManager("Binding::preallocateView");
532+
if (!mountingManager) {
533+
return;
534+
}
541535

542-
preallocationFunction();
536+
mountingManager->preallocateShadowView(surfaceId, shadowView);
543537
}
544538

545539
void Binding::schedulerDidDispatchCommand(

0 commit comments

Comments
 (0)