Expand description
Where overlays sit in the frame being drawn, for native views over the window (a webview) that nothing gpui paints can cover.
A cover is a rectangle recorded during prepaint, stamped with its place in
the frame’s prepaint order. gpui prepaints an element that paints over
another after that other one: a later sibling, a deferred layer, the
tooltip, the drag preview. So a native view takes a mark in its own
prepaint and asks covered in its paint, when every cover of the frame
is recorded.
crate::surface’s cards and the dialog and sheet scrims record
themselves. Anything else an app floats puts a cover in it.
A cover in a view gpui reuses from the last frame (AnyView::cached) is not
recorded.
Structs§
- Mark
- A place in a frame’s prepaint order.
Functions§
- cover
- An element filling its parent, recorded as a cover. Its parent’s box is what it records, so it goes in the overlay’s outermost box.
- covered
- Whether a cover recorded after
markin this frame overlapsbounds. Call it from paint. - mark
- The current place in the prepaint order. Call it from prepaint.
- record
- Records
boundsas covered. Call it from prepaint.