debugCheckElevationsEnabled top-level property

bool debugCheckElevationsEnabled
read / write

Causes PhysicalModelLayers to paint a red rectangle around themselves if they are overlapping and painted out of order with regard to their elevation.

Android and iOS will show the last painted layer on top, whereas Fuchsia will show the layer with the highest elevation on top.

For example, a rectangular elevation at 3.0 that is painted before an overlapping rectangular elevation at 2.0 would render this way on Android and iOS (with fake shadows):

┌───────────────────┐
│                   │
│      3.0          │
│            ┌───────────────────┐
│            │                   │
└────────────│                   │
             │        2.0        │
             │                   │
             └───────────────────┘

But this way on Fuchsia (with real shadows):

┌───────────────────┐
│                   │
│      3.0          │
│                   │────────────┐
│                   │            │
└───────────────────┘            │
             │         2.0       │
             │                   │
             └───────────────────┘

This check helps developers that want a consistent look and feel detect where this inconsistency would occur.

Implementation

bool debugCheckElevationsEnabled = false