mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
0c392bc405
commit
e26c280782
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user