Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jonahwilliams
Copy link
Contributor

Fixes flutter/flutter#136507 .

The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities:

https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3

Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched:

Subpass size: (1550, 3188) root pass size (1440, 3036)

I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.

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.

Is there any docstrings that should be updated to make this more clear that this is the correct math?

@jonahwilliams
Copy link
Contributor Author

I'm not really sure. I sort of eyeballed this after reading through the code for a bit because it didn't seem right that we were using the root pass size to compute the clear color.

@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 #46887 at sha ca184ba

@jonahwilliams
Copy link
Contributor Author

Looks like this is breaking CanRenderClippedLayers

@jonahwilliams
Copy link
Contributor Author

So with this change, we're now collapsing both colors into the save layer and using the CPU blends. I think the issue might just be that ColorDodge is incorrect, because If I change the advanced blend it renders as expected.

@jonahwilliams
Copy link
Contributor Author

ColorDodge on the CPU is computing a blended color of (1, 1, 1, 1). I think this is incorrect as it doesn't seem to match the GPU blend.

@jonahwilliams
Copy link
Contributor Author

I confirmed that there are otherwise no issues with the pass structures, other advanced blends show up correctly - the issue is entirely the result of Color::Blend.

@jonahwilliams
Copy link
Contributor Author

I'm tempted to just adjust the blend mode to a different advanced blend and file a bug for fixing color dodge. Thoughts @bdero / @gaaclarke ?

@flutter-dashboard
Copy link

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

Changes reported for pull request #46887 at sha 81c3fe4

@jonahwilliams
Copy link
Contributor Author

I adjusted the test and filed a bug

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 13, 2023
@auto-submit auto-submit bot merged commit d5ca128 into flutter:main Oct 13, 2023
@jonahwilliams jonahwilliams deleted the fix_clear_color_size branch October 13, 2023 19:39
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 13, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 13, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 13, 2023
…ions) (#136564)

Manual roll requested by [email protected]

Cannot build log URL because revision "a4e62581525c" is invalid: Luci builds of "Mac mac_ios_engine" for a4e62581525c1864a3cd23a67539a3615717eb98 was STARTED

2023-10-13 [email protected] Manual roll Dart SDK from c8143a7c026f to 5844b34768ce (1 revision) (flutter/engine#46909)
2023-10-13 [email protected] Roll Skia from c9601553b0f3 to 4bc4b4d22866 (1 revision) (flutter/engine#46908)
2023-10-13 [email protected] Roll Skia from 8dc8e21a4dec to c9601553b0f3 (3 revisions) (flutter/engine#46907)
2023-10-13 [email protected] Roll Fuchsia Mac SDK from SDPa6SfaKvRRSUCij... to 4DwpR2CMJECZJ8EKz... (flutter/engine#46903)
2023-10-13 [email protected] Roll Skia from b50d7f9aa743 to 8dc8e21a4dec (4 revisions) (flutter/engine#46902)
2023-10-13 [email protected] [Impeller] fix clear color optimization for large subpasses. (flutter/engine#46887)
2023-10-13 [email protected] Oops, allow files in opted-in third_party directories. (flutter/engine#46897)
2023-10-13 [email protected] Roll Skia from e10e6765480a to b50d7f9aa743 (1 revision) (flutter/engine#46899)
2023-10-13 [email protected] Roll Fuchsia Linux SDK from pI1BVH08V0eG0M7sw... to wBb32R567S1alWbfn... (flutter/engine#46898)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from pI1BVH08V0eG to wBb32R567S1a
  fuchsia/sdk/core/mac-amd64 from SDPa6SfaKvRR to 4DwpR2CMJECZ

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],[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
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
Fixes flutter/flutter#136507 .

The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities:

https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3

Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched:

Subpass size: (1550, 3188) root pass size (1440, 3036)

I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.
jonahwilliams pushed a commit to jonahwilliams/engine that referenced this pull request Nov 1, 2023
…#46887)

Fixes flutter/flutter#136507 .

The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities:

https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and
https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3

Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched:

Subpass size: (1550, 3188) root pass size (1440, 3036)

I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.
auto-submit bot pushed a commit that referenced this pull request Nov 2, 2023
) (#47577)

Fixes flutter/flutter#136507 .

The cause of this bug is that we use different sizes to compute the clear color value when constructing the render target and when skipping entities:

https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L632 https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L731 and https://github.com/flutter/engine/blob/main/impeller/entity/entity_pass.cc#L900C3-L900C3

Either the former should use the root pass size or the later should use the subpass size. This usually isn't an issue because if something covers the root pass size it generally always covers the subpass size. But during the page transition, the scaled subpass ends up slightly bigger than the root pass size and so these conditions are mismatched:

Subpass size: (1550, 3188) root pass size (1440, 3036)

I think subpass size is correct. If the subpass is larger than the parent, then checking the parent size will give incorrect result.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

[Impeller] non-cached zoom page transition renders incorrectly.

2 participants