Module webrender::spatial_node

source ·

Structs

  • Contains information about reference frames.
  • Scene building specific representation of a spatial node, which is a much lighter subset of a full spatial node constructed and used for frame building
  • Contains information common among all types of SpatialTree nodes.
  • Defines the content of a spatial node. If the values in the descriptor don’t change, that means the rest of the fields in a spatial node will end up with the same result
  • Information about a spatial node that can be queried during either scene of frame building.
  • A unique identifier for a spatial node, that is stable across display lists

Enums

  • Defines whether we have an implicit scroll frame for a pipeline root, or an explicitly defined scroll frame from the display list.
  • The kind of a spatial node uid. These are required because we currently create external nodes during DL building, but the internal nodes aren’t created until scene building. TODO(gw): The internal scroll and reference frames are not used in any important way

Functions

  • Snap an offset to be incorporated into a transform, where the local space may be considered the world space. We assume raster scale is 1.0, which may not always be correct if there are intermediate surfaces used, however those are either cases where snapping is not important (e.g. has perspective or is not axis aligned), or an edge case (e.g. SVG filters) which we can accept imperfection for now.