Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Jun 5, 2020

Follow up on #18601.
The ScreenshotLayerTreeAsImage won't work after we applied the context_switch because the gl context is popped after the raster call.
It was working before because we never reset the gl context after raster
To 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.

@cyanglaz cyanglaz changed the title Make rasterizer screenshot work with context_switch Make rasterizer screenshot work with gl_context_switch Jun 5, 2020
@cyanglaz cyanglaz requested a review from chinmaygarde June 5, 2020 18:16
@auto-assign auto-assign bot requested a review from GaryQian June 5, 2020 18:18
@cyanglaz cyanglaz merged commit b1a08f2 into flutter:master Jun 10, 2020
@cyanglaz cyanglaz deleted the raster_screenshot_fix branch June 10, 2020 17:00
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants