Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Disclaimer: Everything in there is very proof of concept.
This PR implements direct access to the native surface canvas and allows us to render imperatively from either JS or UI (worklet) thread.
Currently only works on android since on iOS we recreate the surface on each render, it doesn't let us get the canvas reference at the right time.
In the example I implemented a simple UI only renderer that adds components as you scroll, renders only visible components, and disposes on unmount.
(note that enabling screen recording on Pixel 4 i was using for testing makes the performance worse. also it was recorded in dev)
https://github.com/user-attachments/assets/d372b2dc-4e6b-46bb-9e50-2950ee5d9c75