Files
Tomaž Vajngerl 46ab3f7681 basegfx: optimize B2DRange and B2DPolygon transform
Use the Arvo method for B2DRange::transform(), which computes the
new AABB directly from matrix element signs instead of transforming
all 4 corners. This reduces multiplications from 16 to 8 and
eliminates temporary B2DPoint construction and expand() branching.
Benchmark shows about 2.8x speedup.

For polygon transform, extract matrix values once before the loop
instead of calling rMatrix.get() per point. Applies to both the
simple point path and the Bezier control vector path.
Benchmark shows about 1.45x speedup.

Change-Id: I56c1b415fd59dc24a5bec515d952064dee46403e
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2870
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 6d682b4c9ae3e177a97be68ebeb7383c0148601d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205802
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-09 11:46:22 +02:00
..
…
…
…

Algorithms and Data Types for Graphics

Algorithms and data types for graphics (e.g. polygons, vectors, matrices and the like - see that used in canvas).