Skip to content

Cache result when RenderOutput::render() is called#53112

Closed
zeyap wants to merge 1 commit into
facebook:mainfrom
zeyap:export-D79737991
Closed

Cache result when RenderOutput::render() is called#53112
zeyap wants to merge 1 commit into
facebook:mainfrom
zeyap:export-D79737991

Conversation

@zeyap
Copy link
Copy Markdown
Contributor

@zeyap zeyap commented Aug 6, 2025

Summary:

Changelog:

[Internal] [Changed] - Cache result when RenderOutput::render() is called

Rreviously, root.getRenderedOutput in fantom doesn't really reflect the result of direct manipulation from native animated (see the test case added here). This stack is enabling it.

  • make RenderOutput an instance owned by TestMountingManager that can cache render result
    • why is this needed - native animation's direct manipulation should modify the render result (analog to directly manipulating host views on a platform) instead of props on a StubView
  • here i also make sure that RenderOutput::render() will only re calculate the render result for a tree after StubViewTree::mutate is called

Differential Revision: D79737991

@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 Aug 6, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D79737991

zeyap added a commit to zeyap/react-native that referenced this pull request Aug 6, 2025
Summary:

## Changelog:

[Internal] [Changed] - Cache result when RenderOutput::render() is called

Rreviously, root.getRenderedOutput in fantom doesn't really reflect the result of direct manipulation from native animated (see the test case added here). This stack is enabling it.

* make RenderOutput an instance owned by TestMountingManager that can cache render result
  * why is this needed - native animation's direct manipulation should modify the render result (analog to directly manipulating host views on a platform) instead of props on a StubView
* here i also make sure that `RenderOutput::render()` will only re calculate the render result for a tree after StubViewTree::mutate is called

Differential Revision: D79737991
Summary:

## Changelog:

[Internal] [Changed] - Cache result when RenderOutput::render() is called

Rreviously, root.getRenderedOutput in fantom doesn't really reflect the result of direct manipulation from native animated (see the test case added here). This stack is enabling it.

* make RenderOutput an instance owned by TestMountingManager that can cache render result
  * why is this needed - native animation's direct manipulation should modify the render result (analog to directly manipulating host views on a platform) instead of props on a StubView
* here i also make sure that `RenderOutput::render()` will only re calculate the render result for a tree after StubViewTree::mutate is called

Reviewed By: andrewdacenko

Differential Revision: D79737991
@zeyap zeyap force-pushed the export-D79737991 branch from 3d7abe9 to 1cdebfa Compare August 8, 2025 15:04
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D79737991

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 8, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 5517c04.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @zeyap in 5517c04

When will my fix make it into a release? | How to file a pick request?

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants