Support adjusting tessellation tolerance


Add support for QCPAINTER_TESSELLATION_TOLERANCE env variable. This can
be used to adjust the error tolerance of bezier curve tessellation, to
adjust triagle amount vs. curve quality. The default value is 0.25.
Separate divsTol that is used for rounding joins & caps as adjusting
that can lead to bad looking round caps.

Testing with QCPainterBench, enabling only tests 2 + 4 which contain
curves and adjusting QCPAINTER_TESSELLATION_TOLERANCE, gives these
triangle amounts and fps on my laptop with 64 render counts:
- 0.25: 473015 triangles, 136 fps
- 0.5 : 442082 triangles, 142 fps
- 1.0 : 365363 triangles, 158 fps

Initially we can experiment how this affects the performance and
curves quality of different use cases. Then later decide what would
be the optimal default value and possibly add better API than the
undocumented env variable.

Rename also QCPAINTER_MAX_TESSELLATION_LEVEL to match.

Pick-to: 6.11
Change-Id: I75d424812845d04b981315da7e22051988f49bc0
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
commitf67be011c477c48c49593420a9116bb86cbbfefc
parentaafa103383d448bf00066561e962a05dba301cb8
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeMon, 9 Mar 2026 12:26:42 +0200