Closed Bug 1345843 Opened 8 years ago Closed 3 years ago

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

Categories

(Core :: Graphics: Layers, enhancement, P3)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: mikokm, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

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().
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]

BSPTree is now only used by fallback renderer, where this is not as relevant.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.