Jonah Williams 90709e4e33 [Impeller] fix clear color optimization for large subpasses. (flutter/engine#46887)
Fixes https://github.com/flutter/flutter/issues/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.
2023-10-13 19:34:55 +00:00
..