[Development] QtCS: OpenGL session notes
Uwe Rathmann
Uwe.Rathmann at tigertal.de
Tue Jun 26 20:50:27 CEST 2012
On Tue, 26 Jun 2012 07:05:35 +0000, gunnar.sletta wrote:
> The lines left above highlights the general problem... The QPainter API
> is very feature rich and opens up for a number of use patterns that are
> less than ideal for performance.
Please don't forget that QPainter is more then rendering to screen: f.e.
when you need to generate PDF documents and you don't want to implement
the render code twice.
IMHO being an abstract API for very different backends is as important
as performance issues ( that you won't even notice in most use cases ).
One note about performance: QPainter often does pointless calculations -
in many applications I had much more effect with doing polygon clipping
in application code - before the points have been passed to the painter
- than with using a hardware accelerated backends. And these type of
algorithmic optimizations work on any system - even on those, where you
don't have any hardware accelerated option !
I bet that introducing a QPainter::ClipPolygon render hint would improve
the performance of many Qt widgets showing graphics significantly -
without any major redesign neither in Qt nor in application code.
Uwe
More information about the Development
mailing list