-
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
[Impeller] distinguish between no clear color and transparent black clear color. #49038
Conversation
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
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!
impeller/entity/entity_pass.cc
Outdated
GetClearColor(render_target.GetRenderTargetSize()) | ||
.value_or(Color::BlackTransparent())); |
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.
We should pull out this constant or pull out a helper function.
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.
GetClearColorOrTransparentBlack()?
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.
Here are some options. I think "OrDefault" is more succinct. I'm fine with either though.
GetClearColor(render_target.GetRenderTargetSize())
.value_or(kDefaultClearColor);
OrDefaultClearColor(
GetClearColor(render_target.GetRenderTargetSize()))
GetClearColorOrDefault(render_target.GetRenderTargetSize())
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.
Went with OrDefault, Thanks!
Did you intend for the new golden image to draw just white? We should fix that. |
It needs to draw transparent black, for reasons :) Without this change it is magenta on macOS. |
Golden file changes are available for triage from new commit, Click here to view. |
…nt black clear color. (flutter/engine#49038)
…140180) flutter/engine@0e7248d...0b0fab8 2023-12-14 [email protected] [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038) 2023-12-14 [email protected] Unpin mac_toolchain version (flutter/engine#48994) 2023-12-14 [email protected] [Impeller] Turned on new blur. (flutter/engine#48472) 2023-12-14 [email protected] Remove unused metadata in DEPS from vuln scanning (flutter/engine#48995) 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
…isions)" (#140194) Reverts #140180 Initiated by: zanderso This change reverts the following previous change: Original Description: flutter/engine@0e7248d...0b0fab8 2023-12-14 [email protected] [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038) 2023-12-14 [email protected] Unpin mac_toolchain version (flutter/engine#48994) 2023-12-14 [email protected] [Impeller] Turned on new blur. (flutter/engine#48472) 2023-12-14 [email protected] Remove unused metadata in DEPS from vuln scanning (flutter/engine#48995) 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
…nt black clear color. (flutter/engine#49038)
…140195) flutter/engine@0e7248d...4cb3ba7 2023-12-15 [email protected] Roll Skia from 79f23e8d8b5d to cd2f06086c96 (1 revision) (flutter/engine#49069) 2023-12-15 [email protected] Roll Dart SDK from 0471164827b9 to f1e37ed8917e (1 revision) (flutter/engine#49065) 2023-12-15 [email protected] [Impeller] impellerc: delete unused code (flutter/engine#49061) 2023-12-15 [email protected] [Impeller] split out gradient tests from aiks_unittests (flutter/engine#49050) 2023-12-15 [email protected] Revert "[Impeller] Turned on new blur." (flutter/engine#49062) 2023-12-14 [email protected] Fix header-guard naming convention in `shell/`. (flutter/engine#49006) 2023-12-14 [email protected] Manual roll of Dart SDK from a677378ae254 to 0471164827b9 (flutter/engine#49054) 2023-12-14 [email protected] Rename `font-subset` to `font_subset`. (flutter/engine#49051) 2023-12-14 [email protected] Roll Skia from 92935b91193a to 79f23e8d8b5d (1 revision) (flutter/engine#49056) 2023-12-14 [email protected] Suppress warning for the new Activity library. (flutter/engine#49046) 2023-12-14 [email protected] [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038) 2023-12-14 [email protected] Unpin mac_toolchain version (flutter/engine#48994) 2023-12-14 [email protected] [Impeller] Turned on new blur. (flutter/engine#48472) 2023-12-14 [email protected] Remove unused metadata in DEPS from vuln scanning (flutter/engine#48995) 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
…lear color. (flutter#49038) If we clear to transparent black, we're not forcing the pass to be constructed. Change the entity pass API so that we can tell the difference between clearing transparent black and not having a clear color. In flutter/flutter#139571 , the app is creating a layer that is clearing to a transparent color, which is getting skipped. That invalid texture is fed into a blend which produces either black or magenta error texture. Fixes flutter/flutter#139571
…lear color. (flutter#49038) If we clear to transparent black, we're not forcing the pass to be constructed. Change the entity pass API so that we can tell the difference between clearing transparent black and not having a clear color. In flutter/flutter#139571 , the app is creating a layer that is clearing to a transparent color, which is getting skipped. That invalid texture is fed into a blend which produces either black or magenta error texture. Fixes flutter/flutter#139571
…lear color. (flutter#49038) If we clear to transparent black, we're not forcing the pass to be constructed. Change the entity pass API so that we can tell the difference between clearing transparent black and not having a clear color. In flutter/flutter#139571 , the app is creating a layer that is clearing to a transparent color, which is getting skipped. That invalid texture is fed into a blend which produces either black or magenta error texture. Fixes flutter/flutter#139571
If we clear to transparent black, we're not forcing the pass to be constructed. Change the entity pass API so that we can tell the difference between clearing transparent black and not having a clear color.
In flutter/flutter#139571 , the app is creating a layer that is clearing to a transparent color, which is getting skipped. That invalid texture is fed into a blend which produces either black or magenta error texture.
Fixes flutter/flutter#139571