Flutter has always rendered rectangles where Left > Right or Top > Bottom as if the sides were ordered, but DisplayList has been making bad assumptions about these values when accumulating bounds. Additionally, in the code that added NOP support to DisplayListBuilder it compounded that confusion by omitting such rendering operations from the DisplayList recordings.
This mistake would not normally be visible to an application developer as the bounds are not made visible to the developer, but internally it might cause the engine to make errors in any of the following areas, most of which are trusting the bounds of the DisplayList to be correct:
- Calculation of partial repaints
- Slicing of DisplayLists into layers when drawing above or below an embedded Platform layer
- Computation of bounds when allocating rasters for caching
Flutter has always rendered rectangles where Left > Right or Top > Bottom as if the sides were ordered, but DisplayList has been making bad assumptions about these values when accumulating bounds. Additionally, in the code that added NOP support to DisplayListBuilder it compounded that confusion by omitting such rendering operations from the DisplayList recordings.
This mistake would not normally be visible to an application developer as the bounds are not made visible to the developer, but internally it might cause the engine to make errors in any of the following areas, most of which are trusting the bounds of the DisplayList to be correct: