Support RCTModernEventEmitter+RCTEventEmitter in OnLayoutEvent Event class

Summary:
Support RCTModernEventEmitter +RCTEventEmitter in an Event class(es). This improves perf in Fabric. Migrate any constructor callsites to the new constructor and deprecate the previous one.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26054856

fbshipit-source-id: 228cc08a624e793aff4caf36e1df8285f3b3519d
This commit is contained in:
Joshua Gross
2021-01-28 14:07:26 -08:00
committed by Facebook GitHub Bot
parent 5d2f77553c
commit 70073664ab
3 changed files with 25 additions and 7 deletions
@@ -118,7 +118,13 @@ public class UIViewOperationQueue {
uiManager
.getEventDispatcher()
.dispatchEvent(
OnLayoutEvent.obtain(mTag, mScreenX, mScreenY, mScreenWidth, mScreenHeight));
OnLayoutEvent.obtain(
-1 /* SurfaceId not used in classic renderer */,
mTag,
mScreenX,
mScreenY,
mScreenWidth,
mScreenHeight));
}
}
}