Skip to main content

Module transform

Module transform 

Source
Expand description

CSS transform computation 3D transform matrix computations for CSS transforms.

This module implements 4x4 transformation matrices for CSS transform properties, including translation, rotation, scaling, skewing, and perspective. It handles conversion from CSS transform functions to hardware-accelerated matrices for WebRender.

On x86_64 platforms, the module automatically detects and uses SSE/AVX instructions for optimized matrix multiplication and inversion.

NOTE: Matrices are stored in row-major format (unlike some graphics APIs that use column-major). The module handles coordinate system differences between WebRender and hit-testing via the RotationMode enum.

Structs§

ComputedTransform3D
A computed 4x4 transformation matrix in pixel space.

Enums§

RotationMode
Specifies the coordinate system convention for rotations.

Statics§

INITIALIZED
CPU feature detection: true if initialization has been performed
USE_AVX
CPU feature detection: true if AVX instructions are available
USE_SSE
CPU feature detection: true if SSE instructions are available