progressiveBlurUniforms function
The eight uniforms describing the blur region, in the order the program declares them (float indices 2-9).
Pure, and public to tests, because the defect this replaced was a hard-coded zero in the middle of a widget build — which no test could see: the shader path needs a compiled ui.FragmentProgram, and a headless VM never provides one. The arithmetic can at least be pinned.
Implementation
@visibleForTesting
List<double> progressiveBlurUniforms({
required Offset origin,
required Size size,
required double devicePixelRatio,
required double maxSigma,
required double falloff,
required ProgressiveBlurDirection direction,
required double axis,
}) =>
<double>[
maxSigma * devicePixelRatio,
falloff,
direction._uniform,
axis, // 0 = horizontal, 1 = vertical
origin.dx * devicePixelRatio,
origin.dy * devicePixelRatio,
size.width * devicePixelRatio,
size.height * devicePixelRatio,
];