This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[CP][Impeller] fix clear color optimization for large subpasses. (#46887) #47577
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.