Skip to content
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

Fix rendering corruption by Flutter and GDK sharing the same OpenGL context #53103

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

robert-ancell
Copy link
Contributor

Fix rendering corruption by Flutter and GDK sharing the same OpenGL context

Solved by having three contexts - one for GDK and two for Flutter.

Regression introduced in #50754

Fixes flutter/flutter#148653

…ontext

Solved by having three contexts - one for GDK and two for Flutter.

Regression introduced in flutter#50754

Fixes flutter/flutter#148653
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@robert-ancell
Copy link
Contributor Author

This change doesn't have tests because it's only visible in the rendering output.

@robert-ancell
Copy link
Contributor Author

This is a good candidate for a hotfix, will start that process when this is in main (see documentation).

@whiskeyPeak
Copy link

Does this change increase memory usage? The basic counter app on Linux already uses 40~50 MB.

@robert-ancell
Copy link
Contributor Author

Does this change increase memory usage? The basic counter app on Linux already uses 40~50 MB.

I can't check right now but I doubt it will make much of a difference. I'll check next week.

@Hixie
Copy link
Contributor

Hixie commented May 30, 2024

testing this seems like it would be super valuable if it's possible, especially if it's regressed.

test-exempt: i understand that this is basically impossible to test

@whiskeyPeak
Copy link

Tested this locally and I don't see any difference in memory usage!

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM stamp from a Japanese personal seal

Is there a reasonable way to add a test for this? I realise this is basically implementation detail behind the public interface, and that relies on GDK details under the hood.

EDIT: Ah I see @Hixie already responded on this. Thanks for doing the request.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for fixing this!

@robert-ancell robert-ancell merged commit af1f20a into flutter:main Jun 3, 2024
26 checks passed
@robert-ancell robert-ancell deleted the linux-opengl-context branch June 3, 2024 23:02
@robert-ancell robert-ancell added the cp: stable cherry pick to the stable release candidate branch label Jun 3, 2024
flutteractionsbot pushed a commit to flutteractionsbot/engine that referenced this pull request Jun 3, 2024
…ontext (flutter#53103)

Fix rendering corruption by Flutter and GDK sharing the same OpenGL
context

Solved by having three contexts - one for GDK and two for Flutter.

Regression introduced in flutter#50754

Fixes flutter/flutter#148653
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 4, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 4, 2024
…149658)

flutter/engine@a6aa5d8...e211c43

2024-06-04 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from lKBLxel8iBaHpT5q6... to pagJoGS4kQ8Efa_if... (flutter/engine#53192)
2024-06-04 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[display_list] allow applying opacity peephole to single glyph. (#53160)" (flutter/engine#53189)
2024-06-04 skia-flutter-autoroll@skia.org Roll Dart SDK from 49b5590c8d80 to 9dce57c343ec (1 revision) (flutter/engine#53187)
2024-06-04 jonahwilliams@google.com [Impeller] Use varying interpolation to compute some linear gradients. (flutter/engine#53166)
2024-06-03 30870216+gaaclarke@users.noreply.github.com [Impeller] match rrect_blur math to the gaussian math (flutter/engine#53130)
2024-06-03 ditman@gmail.com [web] Add Ethiopic font fallback. (flutter/engine#53180)
2024-06-03 robert.ancell@canonical.com Fix rendering corruption by Flutter and GDK sharing the same OpenGL context (flutter/engine#53103)
2024-06-03 jonahwilliams@google.com [display_list] allow applying opacity peephole to single glyph. (flutter/engine#53160)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from lKBLxel8iBaH to pagJoGS4kQ8E

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
@robert-ancell
Copy link
Contributor Author

Cherry pick requested in #53183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop cp: stable cherry pick to the stable release candidate branch platform-linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graphics corruption on some frames after OpenGL rendering changes
5 participants