From 79024605c47934c0d5e41c07f1cde7b9f04174f8 Mon Sep 17 00:00:00 2001 From: Xin Chen Date: Wed, 30 Nov 2022 14:24:34 -0800 Subject: [PATCH] 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 --- .../src/main/jni/react/fabric/Binding.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ReactAndroid/src/main/jni/react/fabric/Binding.cpp b/ReactAndroid/src/main/jni/react/fabric/Binding.cpp index 3508ceeaf3c311..296a61aafe34e9 100644 --- a/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +++ b/ReactAndroid/src/main/jni/react/fabric/Binding.cpp @@ -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(