debugLastPhantomGhostPaint property
Debug-only, paint-time-only capture of each EXIT phantom ghost's painted geometry, for the Defect-1 (far-overhang occlusion) test oracle. Records, per ghost key:
ghostRect: the ghost's painted rect (sliver-local, NOT offset by the paintoffset, so a test can compare it directly againstanchorBand).clipRect: the EXIT clip rect the render pushed this frame (sliver-local), or null when no clip was applied.anchorBand: the destination header's PAINTED band this frame.
LIFETIME CONTRACT (Invariant 8): cleared at the top of every
paint() and written ONLY for a ghost that is ACTIVELY SLIDING this
frame (Pass A.5 continues a settled ghost before the write). It is
therefore EMPTY on any frame with no sliding ghost — including the
settle frame, after _pruneSettledPhantomExitGhosts reaps the
ghost. A test MUST containsKey-guard every read and MUST NOT
non-null-deref a key on the settle frame (it would throw). Never
read by production code; cannot perturb layout, distance, or
hit-testing.
Implementation
@visibleForTesting
final Map<TKey, ({Rect ghostRect, Rect? clipRect, Rect anchorBand})>
debugLastPhantomGhostPaint = {};