-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[CP-stable]Restore OpenGL state modified by fl_compositor_opengl_present_layers #178937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
eyebrowsoffire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fc0b86a
into
flutter:flutter-3.38-candidate.0
…pengl_present_layers (flutter/flutter#178937)
…pengl_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