mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Resolves https://github.com/flutter/flutter/issues/130355. When drawing a backdrop filter, we offset the backdrop entity with `-local_pass_position` in order to align the backdrop texture with the position of the pass it's being drawn to. When rendering the filter, this transform propagates to the filter snapshot. Prior to this change, that offset was being applied within the space of the backdrop filter's matrix, which is wrong! It needs to be applied in screen space. We didn't notice this prior to the coverage hint optimization because we were previously forcing subpass sizes to match the parent whenever a backdrop filter was present. This one was very difficult to reason through at first, and so I added a detailed comment to explain the rationale behind the behavioral differences between the backdrop filter and non-backdrop filter cases of the matrix filter.