fix(📹): preserve Android video frames before disposal - #4019
Open
ngocdevv wants to merge 4 commits into
Open
Conversation
Author
|
I have signed the CLA! |
Author
|
Hi @wcandillon, when you have a chance, could you please take a look at this PR? It restores makeNonTextureImage() for Android video frames after the Graphite raster readback support added in #3893, fixes #4000, and includes lifecycle tests. The CI workflows are also awaiting maintainer approval. Could you please confirm whether this is the intended lifetime strategy and approve the workflows if appropriate? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Context
copyFrameOnAndroidcurrently assignstexback tocurrentFrameand immediately callstex.dispose(), so the renderer receives a disposed texture. RestoringmakeNonTextureImage()fixes the black or frozen canvas reported in #4000.The Graphite implementation now supports this conversion through the raster readback path added in #3893, after the original call was disabled in #3686.
Test plan
yarn workspace @shopify/react-native-skia tscyarn workspace @shopify/react-native-skia eslint src/external/reanimated/useVideo.ts src/external/reanimated/__tests__/useVideo.spec.ts --max-warnings 0yarn workspace @shopify/react-native-skia test --runInBand— 88 suites passed, 8 skipped; 754 tests passedFixes #4000