Module layout_2013::display_list::items

source ·
Expand description

Servo heavily uses display lists, which are retained-mode lists of painting commands to perform. Using a list instead of painting elements in immediate mode allows transforms, hit testing, and invalidation to be performed using the same primitives as painting. It also allows Servo to aggressively cull invisible and out-of-bounds painting elements, to reduce overdraw.

Display items describe relatively high-level drawing operations (for example, entire borders and shadows instead of lines and blur operations), to reduce the amount of allocation required. They are therefore not exactly analogous to constructs like Skia pictures, which consist of low-level drawing primitives.

Structs§

  • Information common to all display items.
  • Defines a clip scroll node.
  • An index into the vector of ClipScrollNodes. During WebRender conversion these nodes are given ClipIds.
  • A set of indices into the clip scroll node vector for a given item.
  • A clipping region for a display item. Currently, this can describe rectangles, rounded rectangles (for border-radius), or arbitrary intersections of the two. Arbitrary transforms are not supported because those are handled by the higher-level StackingContext abstraction.
  • Starts a group of items inside a particular scroll root.
  • Metadata attached to each display item. This is useful for performing auxiliary threads with the display list involving hit testing: finding the originating DOM node and determining the cursor to use when the element is hovered over.
  • Paints an iframe.
  • An opaque handle to a node, which, unlike UnsafeNode, cannot be transformed back into a non-opaque representation. The only safe operation that can be performed on this node is to compare it to another opaque handle or to another OpaqueNode.
  • Defines a text shadow that affects all items until the next PopTextShadow.
  • Defines a stacking context.
  • Defines a stacking context.
  • Defines a text shadow that affects all items until the paired PopTextShadow.
  • Represents one CSS stacking context, which may or may not have a hardware layer.

Enums§

Statics§

  • The factor that we multiply the blur radius by in order to inflate the boundaries of display items that involve a blur. This ensures that the display item boundaries include all the ink.

Functions§

Type Aliases§

  • The type of the scroll offset list. This is only populated if WebRender is in use.