Skip to content

Commit 2dc4e99

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Extract duplicated keyframe-setup helpers in LayoutAnimationKeyFrameManager::pullTransaction (#57156)
Summary: `LayoutAnimationKeyFrameManager::pullTransaction` (CCN 151) is the single most complex function in ReactCommon. As a first, conservative, behavior-preserving pass, this extracts file-local `static` helpers for the parts that are safe to factor out: the two duplicated opacity/scale prop-setup blocks (the INSERT/Create path on `viewStart` and the REMOVE/Delete path on `viewFinal`, collapsed to one helper each), the insert/delete/reparent tag pre-pass, and the conflicting-keyframe re-queue logic. Behavior is unchanged. This is a partial reduction (CCN 151 -> 102): the function is still above threshold. The remaining bulk is the per-mutation keyframe-build loop and the two large post-processing branches, which call protected members of the class — file-local statics cannot reach those, and lowering them further requires adding private methods (a header change). That is deferred to a follow-up. Changelog: [Internal] Differential Revision: D108027812
1 parent fdac037 commit 2dc4e99

1 file changed

Lines changed: 287 additions & 217 deletions

File tree

0 commit comments

Comments
 (0)