Skip to content

Make animationbackend implementation headers private (#58858) - #58858

Closed
coado wants to merge 1 commit into
react:mainfrom
coado:export-D123418519
Closed

coado wants to merge 1 commit into
react:mainfrom
coado:export-D123418519

Conversation

@coado

@coado coado commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

AnimatedPropsSerializer.h, AnimatedPropsRegistry.h and AnimationBackendCommitHook.h are implementation details of AnimationBackend with no users outside React Native, so lower them from "for frameworks" to private.

AnimationBackend.h (for frameworks) previously included the registry and commit hook headers, which would leak private headers to its consumers, so we decouple them:

  • forward-declare AnimatedPropsRegistry, AnimationBackendCommitHook and SurfaceUpdates;
  • hold the commit hook through std::unique_ptr and define the destructor out of line;
  • make commitUpdates private; it is only called from within AnimationBackend.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D123418519

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 5, 2026
@meta-codesync

meta-codesync Bot commented Oct 5, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123418519.

@meta-codesync meta-codesync Bot changed the title Make animationbackend implementation headers private Make animationbackend implementation headers private (#58858) Oct 6, 2026
@coado
coado force-pushed the export-D123418519 branch from 4ad44fb to 0c5feb5 Compare October 6, 2026 10:52
coado added a commit to coado/react-native that referenced this pull request Oct 6, 2026
Summary:

`AnimatedPropsSerializer.h`, `AnimatedPropsRegistry.h` and `AnimationBackendCommitHook.h` are implementation details of `AnimationBackend` with no users outside React Native, so lower them from "for frameworks" to private.

`AnimationBackend.h` (for frameworks) previously included the registry and commit hook headers, which would leak private headers to its consumers, so we decouple them:
- forward-declare `AnimatedPropsRegistry`, `AnimationBackendCommitHook` and `SurfaceUpdates`;
- hold the commit hook through `std::unique_ptr` and define the destructor out of line;
- make `commitUpdates` private; it is only called from within `AnimationBackend`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D123418519
Summary:
Pull Request resolved: react#58858

`AnimatedPropsSerializer.h`, `AnimatedPropsRegistry.h` and `AnimationBackendCommitHook.h` are implementation details of `AnimationBackend` with no users outside React Native, so lower them from "for frameworks" to private.

`AnimationBackend.h` (for frameworks) previously included the registry and commit hook headers, which would leak private headers to its consumers, so we decouple them:
- forward-declare `AnimatedPropsRegistry`, `AnimationBackendCommitHook` and `SurfaceUpdates`;
- hold the commit hook through `std::unique_ptr` and define the destructor out of line;
- make `commitUpdates` private; it is only called from within `AnimationBackend`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D123418519
@coado
coado force-pushed the export-D123418519 branch from 0c5feb5 to 9ec1d48 Compare October 6, 2026 10:56
@meta-codesync meta-codesync Bot closed this in 1c7a66b Oct 6, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 6, 2026
@meta-codesync

meta-codesync Bot commented Oct 6, 2026

Copy link
Copy Markdown

This pull request has been merged in 1c7a66b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant