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§
Structs§
- Backdrop
Info - Stores information about the calculated opaque backdrop of this slice.
- Backdrop
Surface - Compositor
Surface - Wrapper struct around an external surface descriptor with a little more information that the picture caching code needs.
- Deferred
Dirty Test - In some cases, we need to know the dirty rect of all tiles in order to correctly invalidate a primitive.
- External
Native Surface - Information about a native compositor surface cached between frames.
- External
Native Surface Key - Hash key for an external native compositor surface
- Native
Surface - 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).
- SubSlice
Index - Defines which sub-slice (effectively a z-index) a primitive exists on within a picture cache instance.
- Tile
- Information about a cached tile.
- Tile
Cache Instance - Represents a cache of tiles that make up a picture primitives.
- Tile
Cache Params - 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
- Tile
Post 🔒Update Context - Tile
Post 🔒Update State - Tile
PreUpdate 🔒Context
Enums§
- Backdrop
Kind - Surface
Promotion 🔒Failure - Tile
Surface - 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.