A framework for building native applications using React
Avoid repeated allocations in getChildOffsetRelativeToRoot (#55274)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55274 Changelog: [Internal] Refactors `getChildOffsetRelativeToRoot()` to use a static `Rect` field instead of allocating a new `Rect` and `int[]` on every call. Since this is a private method, we can return the `Rect` directly to avoid the extra `int[]` allocation. This addresses the code review feedback on D90988373. Reviewed By: javache Differential Revision: D91230611 fbshipit-source-id: 64eb23e24f46488075252dafbfbf16a44cf34f67
F
Fabrizio Cucci committed
490c5e8dcc6cdb19c334cc39e93a39a48ba71e96
Parent: 4cfb2ee
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 1/23/2026, 4:52:35 PM