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:19:59 -07:00
committed by Facebook GitHub Bot
parent 09487e4e95
commit 65d52a59b0
5 changed files with 48 additions and 16 deletions
@@ -41,9 +41,10 @@ public interface ReactRoot {
/** Return native view for root */
ViewGroup getRootViewGroup();
/** @return Cached values for widthMeasureSpec and heightMeasureSpec */
/** @return Cached values for widthMeasureSpec. */
int getWidthMeasureSpec();
/** @return Cached values for and heightMeasureSpec. */
int getHeightMeasureSpec();
/** Sets a flag that determines whether to log that content appeared on next view added. */