[Interest] Drawing slow.

william.crocker at analog.com william.crocker at analog.com
Sat Aug 18 17:03:43 CEST 2018


On 08/17/2018 02:36 PM, Bill Crocker wrote:
> Hello:
>
> My newer, Qt based drawing program takes orders of magnitude longer to draw lines
> than my good old plain X-Windows based drawing program.
>
> The Qt call stack, as revealed by VTune, is:
>
> QPainterPath::draw
> QPaintEngineEx::draw
> QRasterPaintEngine::stroke
> QPaintEngineEx::stroke
> QRasterPaintEngine::fill
> QRasterizer::rasterize
> QScanConverter::end
>

 From some experimentation it appears that the CPU time required by the
QPainterPath system is quite non-linear in the number of control points.
So, if I break my one long path up into a number of shorter paths, it
draws MUCH faster.

I use the QPainterPath because I have a dotted-line option and it knows
how to handle the corners.

Bill

> Am I using some fancy, expensive feature
> that I should turn off.
>
> Thanks.
>
> Bill
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>



More information about the Interest mailing list