From 1d985b5e6e61dd1be8941d6cbea9422afe96a489 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Thu, 9 May 2019 14:56:40 -0700 Subject: [PATCH] Fabric: Removing leftovers from previous implementation of view preallocation infra Summary: Now it's implementled differently (see -[RCTComponentViewRegistry preallocateViewComponents]), so this code is not being used. Reviewed By: mdvacca Differential Revision: D15242045 fbshipit-source-id: c02eceb978cf1eae778f84a73456e7156ccf503b --- React/Fabric/Mounting/RCTMountingManager.h | 7 ------- React/Fabric/Mounting/RCTMountingManager.mm | 12 ------------ React/Fabric/RCTScheduler.h | 2 -- React/Fabric/RCTSurfacePresenter.mm | 5 ----- 4 files changed, 26 deletions(-) diff --git a/React/Fabric/Mounting/RCTMountingManager.h b/React/Fabric/Mounting/RCTMountingManager.h index 9dc1538c128..8bf62da780a 100644 --- a/React/Fabric/Mounting/RCTMountingManager.h +++ b/React/Fabric/Mounting/RCTMountingManager.h @@ -32,13 +32,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)scheduleTransaction:(facebook::react::MountingCoordinator::Shared const &)mountingCoordinator; -/** - * Suggests preliminary creation of a component view of given type. - * The receiver is free to ignore the request. - * Can be called from any thread. - */ -- (void)optimisticallyCreateComponentViewWithComponentHandle:(facebook::react::ComponentHandle)componentHandle; - - (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag changedProps:(NSDictionary *)props componentDescriptor:(const facebook::react::ComponentDescriptor &)componentDescriptor; diff --git a/React/Fabric/Mounting/RCTMountingManager.mm b/React/Fabric/Mounting/RCTMountingManager.mm index 5b933ae71bf..9636100dc2e 100644 --- a/React/Fabric/Mounting/RCTMountingManager.mm +++ b/React/Fabric/Mounting/RCTMountingManager.mm @@ -260,16 +260,4 @@ static void RNPerformMountInstructions(ShadowViewMutationList const &mutations, [componentView updateProps:newProps oldProps:oldProps]; } -- (void)optimisticallyCreateComponentViewWithComponentHandle:(ComponentHandle)componentHandle -{ - if (RCTIsMainQueue()) { - // There is no reason to allocate views ahead of time on the main thread. - return; - } - - RCTExecuteOnMainQueue(^{ - [self->_componentViewRegistry optimisticallyCreateComponentViewWithComponentHandle:componentHandle]; - }); -} - @end diff --git a/React/Fabric/RCTScheduler.h b/React/Fabric/RCTScheduler.h index b67244fab1b..bebdaedcfe8 100644 --- a/React/Fabric/RCTScheduler.h +++ b/React/Fabric/RCTScheduler.h @@ -27,8 +27,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)schedulerDidFinishTransaction:(facebook::react::MountingCoordinator::Shared const &)mountingCoordinator; -- (void)schedulerOptimisticallyCreateComponentViewWithComponentHandle:(facebook::react::ComponentHandle)componentHandle; - @end /** diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index cd8f1a4cb3e..15a0f40ad8e 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -311,11 +311,6 @@ using namespace facebook::react; [_mountingManager scheduleTransaction:mountingCoordinator]; } -- (void)schedulerOptimisticallyCreateComponentViewWithComponentHandle:(ComponentHandle)componentHandle -{ - [_mountingManager optimisticallyCreateComponentViewWithComponentHandle:componentHandle]; -} - - (void)addObserver:(id)observer { std::unique_lock lock(_observerListMutex);