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

[Impeller] distinguish between no clear color and transparent black clear color. #49038

Merged
merged 4 commits into from Dec 14, 2023

Conversation

jonahwilliams
Copy link
Member

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

@flutter-dashboard
Copy link

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.

Changes reported for pull request #49038 at sha aa39960

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 345 to 346
GetClearColor(render_target.GetRenderTargetSize())
.value_or(Color::BlackTransparent()));
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

GetClearColorOrTransparentBlack()?

Copy link
Member

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())

Copy link
Member Author

Choose a reason for hiding this comment

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

Went with OrDefault, Thanks!

@gaaclarke
Copy link
Member

Did you intend for the new golden image to draw just white? We should fix that.

@jonahwilliams
Copy link
Member Author

It needs to draw transparent black, for reasons :)

Without this change it is magenta on macOS.

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #49038 at sha c761bb3

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 14, 2023
@auto-submit auto-submit bot merged commit 0b0fab8 into flutter:main Dec 14, 2023
27 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 14, 2023
…140180)

flutter/engine@0e7248d...0b0fab8

2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
auto-submit bot added a commit to flutter/flutter that referenced this pull request Dec 15, 2023
…isions)" (#140194)

Reverts #140180
Initiated by: zanderso
This change reverts the following previous change:
Original Description:

flutter/engine@0e7248d...0b0fab8

2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 15, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 15, 2023
…140195)

flutter/engine@0e7248d...4cb3ba7

2023-12-15 skia-flutter-autoroll@skia.org Roll Skia from 79f23e8d8b5d to cd2f06086c96 (1 revision) (flutter/engine#49069)
2023-12-15 skia-flutter-autoroll@skia.org Roll Dart SDK from 0471164827b9 to f1e37ed8917e (1 revision) (flutter/engine#49065)
2023-12-15 dnfield@google.com [Impeller] impellerc: delete unused code (flutter/engine#49061)
2023-12-15 30870216+gaaclarke@users.noreply.github.com [Impeller] split out gradient tests from aiks_unittests (flutter/engine#49050)
2023-12-15 30870216+gaaclarke@users.noreply.github.com Revert "[Impeller] Turned on new blur." (flutter/engine#49062)
2023-12-14 matanlurey@users.noreply.github.com Fix header-guard naming convention in `shell/`. (flutter/engine#49006)
2023-12-14 jason-simmons@users.noreply.github.com Manual roll of Dart SDK from a677378ae254 to 0471164827b9 (flutter/engine#49054)
2023-12-14 matanlurey@users.noreply.github.com Rename `font-subset` to `font_subset`. (flutter/engine#49051)
2023-12-14 skia-flutter-autoroll@skia.org Roll Skia from 92935b91193a to 79f23e8d8b5d (1 revision) (flutter/engine#49056)
2023-12-14 chingjun@google.com Suppress warning for the new Activity library. (flutter/engine#49046)
2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
zanderso pushed a commit to zanderso/engine that referenced this pull request Dec 15, 2023
…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
zanderso pushed a commit to zanderso/engine that referenced this pull request Dec 15, 2023
…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
zanderso pushed a commit to zanderso/engine that referenced this pull request Dec 18, 2023
…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
Michal-MK pushed a commit to Michal-MK/flutter that referenced this pull request Jan 8, 2024
…lutter#140180)

flutter/engine@0e7248d...0b0fab8

2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
Michal-MK pushed a commit to Michal-MK/flutter that referenced this pull request Jan 8, 2024
…isions)" (flutter#140194)

Reverts flutter#140180
Initiated by: zanderso
This change reverts the following previous change:
Original Description:

flutter/engine@0e7248d...0b0fab8

2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
Michal-MK pushed a commit to Michal-MK/flutter that referenced this pull request Jan 8, 2024
…lutter#140195)

flutter/engine@0e7248d...4cb3ba7

2023-12-15 skia-flutter-autoroll@skia.org Roll Skia from 79f23e8d8b5d to cd2f06086c96 (1 revision) (flutter/engine#49069)
2023-12-15 skia-flutter-autoroll@skia.org Roll Dart SDK from 0471164827b9 to f1e37ed8917e (1 revision) (flutter/engine#49065)
2023-12-15 dnfield@google.com [Impeller] impellerc: delete unused code (flutter/engine#49061)
2023-12-15 30870216+gaaclarke@users.noreply.github.com [Impeller] split out gradient tests from aiks_unittests (flutter/engine#49050)
2023-12-15 30870216+gaaclarke@users.noreply.github.com Revert "[Impeller] Turned on new blur." (flutter/engine#49062)
2023-12-14 matanlurey@users.noreply.github.com Fix header-guard naming convention in `shell/`. (flutter/engine#49006)
2023-12-14 jason-simmons@users.noreply.github.com Manual roll of Dart SDK from a677378ae254 to 0471164827b9 (flutter/engine#49054)
2023-12-14 matanlurey@users.noreply.github.com Rename `font-subset` to `font_subset`. (flutter/engine#49051)
2023-12-14 skia-flutter-autoroll@skia.org Roll Skia from 92935b91193a to 79f23e8d8b5d (1 revision) (flutter/engine#49056)
2023-12-14 chingjun@google.com Suppress warning for the new Activity library. (flutter/engine#49046)
2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
Markzipan pushed a commit to Markzipan/flutter that referenced this pull request Jan 9, 2024
…lutter#140180)

flutter/engine@0e7248d...0b0fab8

2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
Markzipan pushed a commit to Markzipan/flutter that referenced this pull request Jan 9, 2024
…isions)" (flutter#140194)

Reverts flutter#140180
Initiated by: zanderso
This change reverts the following previous change:
Original Description:

flutter/engine@0e7248d...0b0fab8

2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
Markzipan pushed a commit to Markzipan/flutter that referenced this pull request Jan 9, 2024
…lutter#140195)

flutter/engine@0e7248d...4cb3ba7

2023-12-15 skia-flutter-autoroll@skia.org Roll Skia from 79f23e8d8b5d to cd2f06086c96 (1 revision) (flutter/engine#49069)
2023-12-15 skia-flutter-autoroll@skia.org Roll Dart SDK from 0471164827b9 to f1e37ed8917e (1 revision) (flutter/engine#49065)
2023-12-15 dnfield@google.com [Impeller] impellerc: delete unused code (flutter/engine#49061)
2023-12-15 30870216+gaaclarke@users.noreply.github.com [Impeller] split out gradient tests from aiks_unittests (flutter/engine#49050)
2023-12-15 30870216+gaaclarke@users.noreply.github.com Revert "[Impeller] Turned on new blur." (flutter/engine#49062)
2023-12-14 matanlurey@users.noreply.github.com Fix header-guard naming convention in `shell/`. (flutter/engine#49006)
2023-12-14 jason-simmons@users.noreply.github.com Manual roll of Dart SDK from a677378ae254 to 0471164827b9 (flutter/engine#49054)
2023-12-14 matanlurey@users.noreply.github.com Rename `font-subset` to `font_subset`. (flutter/engine#49051)
2023-12-14 skia-flutter-autoroll@skia.org Roll Skia from 92935b91193a to 79f23e8d8b5d (1 revision) (flutter/engine#49056)
2023-12-14 chingjun@google.com Suppress warning for the new Activity library. (flutter/engine#49046)
2023-12-14 jonahwilliams@google.com [Impeller] distinguish between no clear color and transparent black clear color. (flutter/engine#49038)
2023-12-14 15619084+vashworth@users.noreply.github.com Unpin mac_toolchain version (flutter/engine#48994)
2023-12-14 30870216+gaaclarke@users.noreply.github.com [Impeller] Turned on new blur. (flutter/engine#48472)
2023-12-14 103135467+sealesj@users.noreply.github.com 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 jsimmons@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens
Projects
No open projects
Archived in project
2 participants