This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Make rasterizer screenshot work with gl_context_switch#18850
Merged
cyanglaz merged 32 commits intoflutter:masterfrom Jun 10, 2020
Merged
Make rasterizer screenshot work with gl_context_switch#18850cyanglaz merged 32 commits intoflutter:masterfrom
cyanglaz merged 32 commits intoflutter:masterfrom
Conversation
added 30 commits
May 26, 2020 10:31
chinmaygarde
approved these changes
Jun 9, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 10, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 10, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 10, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 10, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 11, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 11, 2020
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.
Follow up on #18601.
The
ScreenshotLayerTreeAsImagewon't work after we applied the context_switch because the gl context is popped after therastercall.It was working before because we never reset the gl context after
rasterTo make it work again, we need to set the gl context before taking the snapshot.
I have added some unit tests for the screenshot methods. However, the tests won't really catch gl bugs like the PR is trying to fix, because the gl is running on the iOS platform, and the tests are running on host.
We might be able to do some integration tests if we set up some old iOS devices that uses GL in the device lab.