-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Set GLArea.has-alpha = true #54053
Set GLArea.has-alpha = true #54053
Conversation
The additional change to glClearColor is to prevent a black flash when the application starts, before Flutter widgets become visible.
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. |
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.
Great! I hadn't noticed that.
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.
…152388) flutter/engine@354abf2...e28f875 2024-07-26 [email protected] [DisplayList] Optimize ClipRRect and ClipPath to ClipOval when appropriate (flutter/engine#54088) 2024-07-26 [email protected] Set GLArea.has-alpha = true (flutter/engine#54053) 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 [email protected],[email protected],[email protected] 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
This is a regression -- the default behaviour of a Flutter app that paints nothing is a black window. This breaks applications that depend on the default background being black. |
Can we revert this? It landed without tests and with no test exemption and regressed behaviour. |
Reason for revert: Regression + no tests. Must have been at the end of a long day, cause I missed the missing test and glaring warning about that. @darkwater see the MacOS implementation (On FlutterViewController) and the tests in shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm for how you might approach testing this. It's fine to offer the ability to set the background colour of the view via API exposed to the Runner, but the default should remain black. |
Time to revert pull request flutter/engine/54053 has elapsed. |
Reason for revert: Regression + no tests. Must have been at the end of a long day, cause I missed the missing test and glaring warning about that. This reverts commit 0844c0a.
Revert out in #54190 |
Reason for revert: Regression + no tests. Must have been at the end of a long day, cause I missed the missing test and glaring warning about that. This reverts commit 0844c0a. Re-opens flutter/flutter#152154 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
…lutter#152388) flutter/engine@354abf2...e28f875 2024-07-26 [email protected] [DisplayList] Optimize ClipRRect and ClipPath to ClipOval when appropriate (flutter/engine#54088) 2024-07-26 [email protected] Set GLArea.has-alpha = true (flutter/engine#54053) 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 [email protected],[email protected],[email protected] 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
This was fixes as part of #54575 |
…lutter#152388) flutter/engine@354abf2...e28f875 2024-07-26 [email protected] [DisplayList] Optimize ClipRRect and ClipPath to ClipOval when appropriate (flutter/engine#54088) 2024-07-26 [email protected] Set GLArea.has-alpha = true (flutter/engine#54053) 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 [email protected],[email protected],[email protected] 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
GLArea.has-alpha defaults to false, which makes it impossible for a Flutter app to be transparent.
The additional change to glClearColor is to prevent a black flash when the application starts, before Flutter widgets become visible. This will also affect applications that aren't transparent, by showing the default GTK background color instead of black. This will not make the window transparent, because the developer currently has to add some code to their
linux/my_application.cc
to support transparency.Fixes flutter/flutter#152154
Transparent windows were possible before #50754. Would it be ok to add a test for this to prevent breaking transparency again in the future?
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.