Details
-
Task
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
Description
QPainterPath uses a QVector<QPainterPathElement> internally which maps poorly to the more optimal format that the internal QVectorPath class uses. In Qt 5, we should change the internals of QPainterPath to match those of QVectorPath.
The main benefit of this is that we can skip the coordinate conversion first time a QPainterPath is drawn.
The only problematic function is that QPainterPath::elementAt() returns a "const QPainterPath::Element &" which would have to be changed to returning a plain value type and not a reference. This should primarily be a problem for internal Qt code, as paint engines are the only ones that usually need to iterate through a QPainterPath.