Jonah Williams 05e3314f30 [Impeller] round up subpass coverage when it is close to (and smaller) than root pass size. (flutter/engine#49925)
Work towards https://github.com/flutter/flutter/issues/136510

generally speaking, we try to size subpasses as small as we possibly can as an optimization for memory usage and fragment load. Though with specific blend modes and/or filters we are required us to flood to a larger size. However in some cases, this optimization is counter productive - as we can only recycle textures that are exactly the same size.

In scenario where a large subpass slightly changes sizes every frame (such as for the android zoom page transition), the tight sizing is maximally inefficient as we discard and recreate large textures each frame.

This PR adds a heuristic which (at least locally) improves this by rounding up subpass size that is within 10% of the root pass size.
2024-01-25 01:21:41 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%