-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
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
-
We add the ability to turn shadows off in the framework. Ideas as to how to do this:
-
We introduce a
debugZeroElevationglobal 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. -
We introduce a
debugNoShadowsglobal in the rendering layer that will be consulted in places likePhysicalModelLayer.addtoScene()andRenderPhysicalModel.paint() -
Something else...?
-
-
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()orflutter_test_config.dart). -
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.