Skip to content

Test golden files without shadows #17262

Closed

Description

@tvolkert

Now that we have golden file testing, it will significantly reduce the churn on our golden files if we test out golden files against scenes that contain no shadows.

Proposal

  1. We add the ability to turn shadows off in the framework. Ideas as to how to do this:

    1. We introduce a debugZeroElevation global in the rendering layer that will cause all elevations to be zero, thus implicitly turning off shadows even though the code to draw the shadows is still active.

    2. We introduce a debugNoShadows global in the rendering layer that will be consulted in places like PhysicalModelLayer.addtoScene() and RenderPhysicalModel.paint()

    3. Something else...?

  2. We make the flutter test harness turn shadows off by default in all widget tests. Tests that specifically want shadows can update the flag in their test configuration (either via setUp() or flutter_test_config.dart).

  3. We provide a small suite of golden file tests that explicitly enable shadows and test them, so that we can catch regressions in Skia or our own shadow rendering.

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    frameworkflutter/packages/flutter repository. See also f: labels.
    on May 3, 2018
  2. tvolkert commented on May 3, 2018

    @tvolkert
    ContributorAuthor

    /cc @Hixie

  3. self-assigned this
    on May 3, 2018
  4. added a commit that references this issue on May 7, 2018
  5. added a commit that references this issue on May 8, 2018
  6. tvolkert commented on May 12, 2018

    @tvolkert
    ContributorAuthor

    This is fixed with #17363

  7. github-actions commented on Sep 3, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions