Strip layer geometry if there were no intersections with CSS 3D transforms

NEW
Unassigned

Status

()

P3
normal
2 years ago
a year ago

People

(Reporter: miko, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

(Reporter)

Description

2 years ago
This is an optimization related to bug 1274673.

Currently layers with CSS 3D transforms are rendered as polygons after they have been sorted with BSPTree. This creates additional processing with triangulation and texture coordinate calculations, and results in more vertices getting uploaded to the GPU.

A straight-forward optimization to this is to toggle mIntersections flag in BSPTree if any layers were split. If there were no splits, the geometry should be safe to strip after sorting in Layers.cpp::SortLayersWithBSPTree().
(Reporter)

Comment 1

2 years ago
Another optimization that could be performed at the same time would be to cache inverted matrices.
Polygon::TransformToScreenSpace() inverts the matrix for normal transformation. This matrix is inverted again before a call to Polygon::TransformToLayerSpace().
Priority: -- → P3
Whiteboard: [gfx-noted]
You need to log in before you can comment on or make changes to this bug.