Module webrender::util

source ·

Structs§

  • A typesafe helper that separates new value construction from vector growing, allowing LLVM to ideally construct the element in place.
  • Record the size of a data structure to preallocate a similar size at the next frame and avoid growing it too many time.
  • Arc wrapper to support measurement via MallocSizeOf.
  • This is inspired by the weak-table crate. It holds a Vec of weak pointers that are garbage collected as the Vec

Enums§

  • An enum that tries to avoid expensive transformation matrix calculations when possible when dealing with non-perspective axis-aligned transformations.
  • An entry into a vector, similar to std::collections::hash_map::Entry.

Constants§

Traits§

Functions§

  • Clamp scaling factor to a power of two.
  • Run the first callback over all elements in the array. If the callback returns true, the element is removed from the array and moved to a second callback.
  • Return an aligned rectangle that is inside the clip region and doesn’t intersect any of the bounding rectangles of the rounded corners, with a specific k factor to control how much of the rounded corner is included.
  • Return an aligned rectangle that is inside the clip region and doesn’t intersect any of the bounding rectangles of the rounded corners.
  • Rounds a value up to the nearest multiple of mul
  • Computes the scale factors of this matrix; that is, the amounts each basis vector is scaled by.

Type Aliases§