This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Re-create texture from pixel buffer onGrContextCreate#8792
Merged
Conversation
OnGrContextDestroy we destroy the texture, this is because we can not access it from the potentially new context that we get on bringing the app back to foreground. To show a valid texture on fg, we need to preserve the pixel buffer, using which we will create the new texture.
|
|
||
| void MarkNewFrameAvailable() override; | ||
|
|
||
| void CreateTextureFromPixelBuffer(); |
Contributor
There was a problem hiding this comment.
This doesn't need to be public.
| } | ||
| CVOpenGLESTextureRef texture; | ||
| CVReturn err = CVOpenGLESTextureCacheCreateTextureFromImage( | ||
| kCFAllocatorDefault, cache_ref_, buffer_ref_, nullptr, GL_TEXTURE_2D, GL_RGBA, |
Contributor
There was a problem hiding this comment.
I don't understand where this cache is being recreated. I thought it was collected in IOSExternalTextureGL::OnGrContextDestroyed.
Contributor
Author
There was a problem hiding this comment.
Ah, I did not recreate the texture cache. It would still get created on the next frame, but not ideal. Will fix it.
chinmaygarde
approved these changes
Apr 30, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 30, 2019
engine-flutter-autoroll
added a commit
to flutter/flutter
that referenced
this pull request
May 1, 2019
flutter-team-archive/engine@f2d2179...2f11d3c git log f2d2179..2f11d3c --no-merges --oneline 2f11d3c Roll src/third_party/skia f808c5e3afa3..e6a83e160860 (3 commits) (flutter-team-archive/engine#8795) 1219e5c Re-create texture from pixel buffer onGrContextCreate (flutter-team-archive/engine#8792) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff (bmparr@google.com), and stop the roller if necessary.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
OnGrContextDestroy we destroy the texture, this is because
we can not access it from the potentially new context that
we get on bringing the app back to foreground.
To show a valid texture on fg, we need to preserve the pixel
buffer, using which we will create the new texture.
Fixes flutter/flutter#30491