Remove enableFabricStartSurfaceWithLayoutMetrics feature flag

Summary:
Remove `enableFabricStartSurfaceWithLayoutMetrics` and treat as `true` always from now on.

Changelog: [Internal]

Differential Revision: D23633198

fbshipit-source-id: 5b7455b87e578ffa97d80746fa901cd2b50d3ea9
This commit is contained in:
Joshua Gross
2020-09-10 18:14:05 -07:00
committed by Facebook GitHub Bot
parent 0c392bc405
commit e26c280782
2 changed files with 13 additions and 36 deletions
@@ -1151,30 +1151,18 @@ public class ReactInstanceManager {
final int rootTag;
if (ReactFeatureFlags.enableFabricStartSurfaceWithLayoutMetrics) {
if (reactRoot.getUIManagerType() == FABRIC) {
rootTag =
uiManager.startSurface(
reactRoot.getRootViewGroup(),
reactRoot.getJSModuleName(),
initialProperties == null
? new WritableNativeMap()
: Arguments.fromBundle(initialProperties),
reactRoot.getWidthMeasureSpec(),
reactRoot.getHeightMeasureSpec());
reactRoot.setRootViewTag(rootTag);
reactRoot.setShouldLogContentAppeared(true);
} else {
rootTag =
uiManager.addRootView(
reactRoot.getRootViewGroup(),
initialProperties == null
? new WritableNativeMap()
: Arguments.fromBundle(initialProperties),
reactRoot.getInitialUITemplate());
reactRoot.setRootViewTag(rootTag);
reactRoot.runApplication();
}
if (reactRoot.getUIManagerType() == FABRIC) {
rootTag =
uiManager.startSurface(
reactRoot.getRootViewGroup(),
reactRoot.getJSModuleName(),
initialProperties == null
? new WritableNativeMap()
: Arguments.fromBundle(initialProperties),
reactRoot.getWidthMeasureSpec(),
reactRoot.getHeightMeasureSpec());
reactRoot.setRootViewTag(rootTag);
reactRoot.setShouldLogContentAppeared(true);
} else {
rootTag =
uiManager.addRootView(
@@ -1184,15 +1172,7 @@ public class ReactInstanceManager {
: Arguments.fromBundle(initialProperties),
reactRoot.getInitialUITemplate());
reactRoot.setRootViewTag(rootTag);
if (reactRoot.getUIManagerType() == FABRIC) {
// Fabric requires to call updateRootLayoutSpecs before starting JS Application,
// this ensures the root will hace the correct pointScaleFactor.
uiManager.updateRootLayoutSpecs(
rootTag, reactRoot.getWidthMeasureSpec(), reactRoot.getHeightMeasureSpec());
reactRoot.setShouldLogContentAppeared(true);
} else {
reactRoot.runApplication();
}
reactRoot.runApplication();
}
Systrace.beginAsyncSection(
@@ -63,9 +63,6 @@ public class ReactFeatureFlags {
/** Feature flag to configure eager initialization of Fabric */
public static boolean eagerInitializeFabric = false;
/** Feature flag to configure initialization of Fabric surfaces. */
public static boolean enableFabricStartSurfaceWithLayoutMetrics = true;
/** Feature flag to use stopSurface when ReactRootView is unmounted. */
public static boolean enableStopSurfaceOnRootViewUnmount = false;