Disable preallocation of virtual Nodes

Summary:
This diff disables preallocation of virtual nodes, I'm doing this as an intermediate step to eradicate virtual nodes from the android mounting layer.

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D20048996

fbshipit-source-id: 8fe0b03bcfcfd83a3093d1503ac93a20a5e9a57e
This commit is contained in:
David Vacca 2020-02-21 21:05:35 -08:00 коммит произвёл Facebook Github Bot
Родитель d42e2fa92a
Коммит 13afc454f1
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -255,7 +255,9 @@ void Binding::installFabricUIManager(
"react_fabric:enable_removedelete_collation_android");
collapseDeleteCreateMountingInstructions_ = reactNativeConfig_->getBool(
"react_fabric:enabled_collapse_delete_create_mounting_instructions");
;
disableVirtualNodePreallocation_ = reactNativeConfig_->getBool(
"react_fabric:disable_virtual_node_preallocation");
disablePreallocateViews_ = reactNativeConfig_->getBool(
"react_fabric:disabled_view_preallocation_android");
@ -862,6 +864,10 @@ void Binding::schedulerDidRequestPreliminaryViewAllocation(
bool isLayoutableShadowNode = shadowView.layoutMetrics != EmptyLayoutMetrics;
if (disableVirtualNodePreallocation_ && !isLayoutableShadowNode) {
return;
}
static auto preallocateView =
jni::findClassStatic(UIManagerJavaDescriptor)
->getMethod<void(

Просмотреть файл

@ -107,6 +107,7 @@ class Binding : public jni::HybridClass<Binding>, public SchedulerDelegate {
bool shouldCollateRemovesAndDeletes_{false};
bool collapseDeleteCreateMountingInstructions_{false};
bool disablePreallocateViews_{false};
bool disableVirtualNodePreallocation_{false};
};
} // namespace react