Skip to content

[Impeller] Playground and golden generator generate different images #162036

@flar

Description

@flar

Steps to reproduce

When I generate goldens for some Impeller playground tests they are scaled differently than they are in playground and as a result their content can be clipped. This is on MacOS.

For example, try running a golden output for Play/AiksTest.MaskBlurVariantTestOuterTranslucent/Metal and compare it to its playground view. The playground view looks correct, but the golden output is scaled larger than what I see in playground and as a result some of the content is clipped.

I noticed this first when looking at some golden failures for this test on a PR. The local goldens didn't indicate any errors because the differences were in the clipped-out part in my local tests. So, it looks like the golden checks in PR pre-submits are fine as they don't exhibit this "scaling and clipping" issue, but it makes debugging those errors difficult locally because the problem happens locally on my MBP.

Expected results

The output of the two mechanisms should match and the golden results should not be clipped.

Actual results

The content looks correct in playground, but over-scaled and clipped in the locally produced golden images.

Code sample

impeller_unittests --gtest_filter="Play/AiksTest.MaskBlurVariantTestOuterTranslucent/Metal" --enable_playground

vs

impeller_golden_tests --gtest_filter="Play/AiksTest.MaskBlurVariantTestOuterTranslucent/Metal" --working_dir=<...>

Screenshots or Video

Playground image Image
Golden image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions