Skip to content

scaling test: Fix intermittent failure with alpha = 0

Simon McVittie requested to merge wip/smcv/bug6977 into main
  • scaling test: Avoid dividing zero by zero

    If all four of the random colours have alpha channel exactly 0.0, then the computed premultiplied average will also be zero. Normalize the expected colour to (0,0,0,0) rather than (NaN,NaN,NaN,0).

    Resolves: #6977 (closed)

  • scaling test: Specifically test alpha == 0

    Before the previous commit, if this happened by chance, it was mishandled: we would compare the generated texture with a reference based on the nonsensical colour value (NaN, NaN, NaN, 0.0).

    Reproduces: #6977 (closed)

Merge request reports

Loading