Repository navigation
[CP-stable]Restore OpenGL state modified by fl_compositor_opengl_present_layers - #178937
Conversation
…lutter#178697) The OpenGL context used there may be shared with Skia, and Skia assumes that other code has not changed its state. See flutter#178547
|
@jason-simmons please fill out the PR description above, afterwards the release team will review this request. |
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
There was a problem hiding this comment.
Code Review
This pull request enhances fl_compositor_opengl_present_layers to correctly save and restore additional OpenGL states that it modifies. The changes now cover GL_READ_FRAMEBUFFER_BINDING, GL_CURRENT_PROGRAM, GL_SCISSOR_TEST, GL_BLEND, and various blend function parameters, preventing state leakage that could interfere with other rendering operations. To validate these changes, new tests have been added to confirm the restoration of GL_BLEND and GL_SCISSOR_TEST states, with corresponding updates to the mock_epoxy.cc mocking framework.
|
Hello, |
fc0b86a
into
flutter:flutter-3.38-candidate.0
…ngl_present_layers (flutter/flutter#178937)
…ngl_present_layers (flutter/flutter#178937)
Issue Link:
What is the link to the issue this cherry-pick is addressing?
#178547
Changelog Description:
This PR fixes rendering errors in the Linux desktop embedder when using Skia. The embedder may overwrite OpenGL state that Skia assumes is unmodified.
Impact Description:
Bad rendering in Linux desktop apps.
Workaround:
Use Impeller instead of Skia on Linux.
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
Run the example app in #178547 on Linux