Skip to content

DisplayList mishandles unordered rectangles #128159

@flar

Description

@flar

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

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.waiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions