Set layout metrics during initial render of Fabric

Summary:
This diff refactors the initial render of Fabric in order to set the layout metrics as we start the surface.

This prevents to create an additional fabric commit during initial render. Also this migth help fixing T63495589 (I wasn't able to repro T63495589 again when using this diff)

changelog: [Internal][Android] Internal change to reduce the amount of commits during initial render of Fabric

Reviewed By: JoshuaGross

Differential Revision: D21330072

fbshipit-source-id: 758c49b52ea4c12d5623b7c7d68c7318f4a6cd83
This commit is contained in:
David Vacca
2020-05-01 00:17:38 -07:00
committed by Facebook GitHub Bot
parent 09487e4e95
commit 65d52a59b0
5 changed files with 48 additions and 16 deletions
@@ -425,6 +425,16 @@ public class UIManagerModule extends ReactContextBaseJavaModule
return tag;
}
@Override
public <T extends View> int startSurface(
final T rootView,
final String moduleName,
final WritableMap initialProps,
int widthMeasureSpec,
int heightMeasureSpec) {
throw new UnsupportedOperationException();
}
/** Unregisters a new root view. */
@ReactMethod
public void removeRootView(int rootViewTag) {