Expand description
GPU value synchronization (colors, transforms) for WebRender preparation GPU value caching for CSS transforms and opacity.
This module manages the synchronization between DOM CSS properties (transforms and opacity) and GPU-side keys used by WebRender. It tracks changes to transform and opacity values and generates events when values are added, changed, or removed.
§Performance
The cache uses CPU feature detection (SSE/AVX on x86_64) to optimize transform calculations. Values are only recalculated when CSS properties change, minimizing GPU updates.
§Architecture
GpuValueCache: Stores current transform/opacity keys and values for all nodesGpuEventChanges: Contains delta events for transform/opacity changesGpuTransformKeyEvent: Events for transform additions, changes, and removals
The cache is synchronized with the StyledDom on each frame, generating minimal
update events to send to the GPU.
Structs§
- GpuEvent
Changes - Contains all GPU-related change events from a cache synchronization.
- GpuValue
Cache - Caches GPU transform and opacity keys and their current values for all nodes.
Enums§
- GpuOpacity
KeyEvent - GpuScrollbar
Opacity Event - Represents a change to a scrollbar opacity key.
- GpuTransform
KeyEvent - Represents a change to a GPU transform key.