Restore OpenGL state modified by fl_compositor_opengl_present_layers#178697
Merged
auto-submit[bot] merged 2 commits intoflutter:masterfrom Nov 18, 2025
Merged
Restore OpenGL state modified by fl_compositor_opengl_present_layers#178697auto-submit[bot] merged 2 commits intoflutter:masterfrom
auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
The OpenGL context used there may be shared with Skia, and Skia assumes that other code has not changed its state. See flutter#178547
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where fl_compositor_opengl_present_layers modifies OpenGL state without restoring it, which can interfere with other components like Skia that use the same context. The changes correctly save and restore several OpenGL states, including framebuffer bindings, scissor test, and blend state. The corresponding tests and mocks are also updated. I've identified a couple of additional states (GL_CURRENT_PROGRAM and blend function parameters) that are also modified and should be restored to make this fix fully comprehensive. My review includes a suggestion to address this.
robert-ancell
approved these changes
Nov 18, 2025
Contributor
robert-ancell
left a comment
There was a problem hiding this comment.
Annoying but required :)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 19, 2025
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Nov 19, 2025
flutter/flutter@cb7b7df...de4be4f 2025-11-19 [email protected] Roll Skia from 2054d87c6a85 to b5dc8c3494ac (1 revision) (flutter/flutter#178793) 2025-11-19 [email protected] Roll Skia from a30b02d57637 to 2054d87c6a85 (2 revisions) (flutter/flutter#178787) 2025-11-19 [email protected] Roll Skia from 547e3e5441b4 to a30b02d57637 (3 revisions) (flutter/flutter#178782) 2025-11-19 [email protected] Fix train hopping animation status listeners (flutter/flutter#178372) 2025-11-19 [email protected] Make sure that a ReorderableListView doesn't crash in 0x0 environment (flutter/flutter#177646) 2025-11-19 [email protected] Roll Skia from 9ce01a452f63 to 547e3e5441b4 (1 revision) (flutter/flutter#178775) 2025-11-19 [email protected] Roll Dart SDK from 1ed6b56bb323 to f7e9bd245fd9 (1 revision) (flutter/flutter#178774) 2025-11-19 [email protected] Roll Skia from f3ddc700abc7 to 9ce01a452f63 (8 revisions) (flutter/flutter#178769) 2025-11-19 [email protected] Make sure that a TabPageSelector doesn't crash in 0x0 environment (flutter/flutter#178156) 2025-11-19 [email protected] Small cleanup in `DeferredComponentManager.java` (flutter/flutter#178585) 2025-11-19 [email protected] Roll Dart SDK from a33149cb6643 to 1ed6b56bb323 (1 revision) (flutter/flutter#178763) 2025-11-18 [email protected] Roll Skia from 8557300f84c2 to f3ddc700abc7 (5 revisions) (flutter/flutter#178751) 2025-11-18 [email protected] Remove unnecessary `String.valueOf` in `TextInputChannel.java` (flutter/flutter#178592) 2025-11-18 [email protected] [tool] Further cleanup of proxy logic (flutter/flutter#178683) 2025-11-18 [email protected] Restore OpenGL state modified by fl_compositor_opengl_present_layers (flutter/flutter#178697) 2025-11-18 [email protected] Replace `equals("")` with `isEmpty` in `SpellCheckPlugin.java` (flutter/flutter#178596) 2025-11-18 [email protected] Roll Dart SDK from 312845b06afc to a33149cb6643 (2 revisions) (flutter/flutter#178738) 2025-11-18 [email protected] Roll Skia from ca906091e199 to 8557300f84c2 (2 revisions) (flutter/flutter#178739) 2025-11-18 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add framework-side hitTestBehavior support for Semantics widget and apply to ModalRoute (#177570)" (flutter/flutter#178744) 2025-11-18 [email protected] Roll Packages from ce44ebb to 34746bb (6 revisions) (flutter/flutter#178734) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutteractionsbot
pushed a commit
to flutteractionsbot/flutter
that referenced
this pull request
Nov 21, 2025
…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
IvoneDjaja
pushed a commit
to IvoneDjaja/flutter
that referenced
this pull request
Nov 22, 2025
…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
2 tasks
flutteractionsbot
pushed a commit
to flutteractionsbot/flutter
that referenced
this pull request
Nov 24, 2025
…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
added a commit
to flutteractionsbot/flutter
that referenced
this pull request
Dec 2, 2025
…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
mboetger
pushed a commit
to mboetger/flutter
that referenced
this pull request
Dec 2, 2025
…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
7 tasks
reidbaker
pushed a commit
to AbdeMohlbi/flutter
that referenced
this pull request
Dec 10, 2025
…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
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 11, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The OpenGL context used there may be shared with Skia, and Skia assumes that other code has not changed its state.
See #178547