Skip to main content

Module tile_cache

Module tile_cache 

Source
Expand description

Tile cache types and descriptors

This module contains the core tile caching infrastructure including:

  • Tile identification and coordinate types
  • Tile descriptors that track primitive dependencies
  • Comparison results for invalidation tracking

Re-exports§

pub use self::slice_builder::TileCacheBuilder;
pub use self::slice_builder::TileCacheConfig;
pub use self::slice_builder::PictureCacheDebugInfo;
pub use self::slice_builder::SliceDebugInfo;
pub use self::slice_builder::DirtyTileDebugInfo;
pub use self::slice_builder::TileDebugInfo;
pub use self::slice_builder::CompositorClipDebugInfo;

Modules§

slice_builder

Structs§

BackdropInfo
Stores information about the calculated opaque backdrop of this slice.
BackdropSurface
CompositorSurface
Wrapper struct around an external surface descriptor with a little more information that the picture caching code needs.
DeferredDirtyTest
In some cases, we need to know the dirty rect of all tiles in order to correctly invalidate a primitive.
ExternalNativeSurface
Information about a native compositor surface cached between frames.
ExternalNativeSurfaceKey
Hash key for an external native compositor surface
NativeSurface
Represents the native surfaces created for a picture cache, if using a native compositor. An opaque and alpha surface is always created, but tiles are added to a surface based on current opacity. If the calculated opacity of a tile changes, the tile is invalidated and attached to a different native surface. This means that we don’t need to invalidate the entire surface if only some tiles are changing opacity. It also means we can take advantage of opaque tiles on cache slices where only some of the tiles are opaque. There is an assumption that creating a native surface is cheap, and only when a tile is added to a surface is there a significant cost. This assumption holds true for the current native compositor implementations on Windows and Mac.
SliceId
The key that identifies a tile cache instance. For now, it’s simple the index of the slice as it was created during scene building.
SubSlice
A SubSlice represents a potentially overlapping set of tiles within a picture cache. Most picture cache instances will have only a single sub-slice. The exception to this is when a picture cache has compositor surfaces, in which case sub slices are used to interleave content under or order the compositor surface(s).
SubSliceIndex
Defines which sub-slice (effectively a z-index) a primitive exists on within a picture cache instance.
Tile
Information about a cached tile.
TileCacheInstance
Represents a cache of tiles that make up a picture primitives.
TileCacheParams
Information that is required to reuse or create a new tile cache. Created during scene building and passed to the render backend / frame builder.
TileId
A unique identifier for a tile. These are stable across display lists and scenes.
TileKey
Uniquely identifies a tile within a picture cache slice
TilePostUpdateContext 🔒
TilePostUpdateState 🔒
TilePreUpdateContext 🔒

Enums§

BackdropKind
SurfacePromotionFailure 🔒
TileSurface
The backing surface for this tile.

Constants§

MAX_COMPOSITOR_SURFACES
The maximum number of compositor surfaces that are allowed per picture cache. This is an arbitrary number that should be enough for common cases, but low enough to prevent performance and memory usage drastically degrading in pathological cases.
MAX_SURFACE_SIZE
The maximum size per axis of a surface, in DevicePixel coordinates. Render tasks larger than this size are scaled down to fit, which may cause some blurriness.
TILE_SIZE_DEFAULT
The size in device pixels of a normal cached tile.
TILE_SIZE_SCROLLBAR_HORIZONTAL
The size in device pixels of a tile for horizontal scroll bars
TILE_SIZE_SCROLLBAR_VERTICAL
The size in device pixels of a tile for vertical scroll bars

Statics§

NEXT_TILE_ID 🔒
Used to get unique tile IDs, even when the tile cache is destroyed between display lists / scenes.

Type Aliases§

TileOffset
TileRect