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:01:07 -08:00
committed by Facebook GitHub Bot
parent 5d2f77553c
commit 70073664ab
3 changed files with 25 additions and 7 deletions
@@ -958,6 +958,7 @@ public class UIImplementation {
if (frameDidChange && cssNode.shouldNotifyOnLayout()) {
mEventDispatcher.dispatchEvent(
OnLayoutEvent.obtain(
-1, /* surfaceId not used in classic renderer */
tag,
cssNode.getScreenX(),
cssNode.getScreenY(),