[Qt-interest] Performance issues with Graphics View Framework

Simone Artesino mlist.sa at gmail.com
Mon Jul 20 16:22:08 CEST 2009


*) I'm sure that I'm running openGL on gpu (no software-only mode)
-) I'm using the latest qt 4.5.2
--) I've take care off disable antialias and other cpu consuming.
    setRenderHint(QPainter::Antialiasing,false);
    setRenderHint(QPainter::TextAntialiasing,false);
    setRenderHint(QPainter::HighQualityAntialiasing,false);
    setRenderHint(QPainter::NonCosmeticDefaultPen,false);
    setRenderHint(QPainter::SmoothPixmapTransform,false);
---)I've tried both MinimalViewportUpdate, SmartViewportUpdate,
BoundingRectViewportUpdate, FullViewportUpdate but the the performances
difference between the two viewpot still remains
----)About poulsbo I'm pretty sure to use the latest and stable gma drivers

x) In my animation i do the following work: like a slotmakine i vertically
move a set of 3 simbols of a 10 symbols stripe.

I obtain that result in the following manner.

Load a QImage that represent a stripes of 10 different symbols
striscia = new QImage("media/images/striscia.png");
Randomly choose a sequence of this ten symbols.
Using this sequence i create an empty QPixmap and draw on it the
corresponding symbols taken from the QImage.

Animation cycle :
Using a clipping rectangle and the QPixmap::copy i copy the right portion of
the stripe in the screen that simulate a scrool of the stripe.

ciao
Simone

On Mon, Jul 20, 2009 at 3:02 PM, Enrico Ros <enrico.qt at email.it> wrote:

> Also note that:
>
>  -  Painting performance changes a lot depending on that you have to paint.
> QPainter::fillRect() is faster than Painter::drawEllipse() (since the first
> can be accelerated in OpenGL, the other no).
>
>  - Try to use different Qt Versions (later versions aften accelerate more
> painting commands and more efficiently on opengl)
>
>  - Disable antialiasing in QPainter.
>
>  - Make sure that the QGLWidget is constructed without the SampleBuffer
> support (look at QGLWidget doc, I don't have it here. SampleBuffers are
> OpenGL's way to do AntiAliasing).
>
>  - run some OpenGL benchmarchs (like "glxgears" (should report > 2000 fps
> on
> your desktop)) to make sure OpenGL is accelerated and you're not using the
> software fallback
>
>  - try to see if QPixmap are faster than QImages or vice-versa, and switch
> to
> that implementation.
>
>  - Note that Poulsbo is known to suck more that anything else [1]. Desktop
> performance should be better indeed.
>
> Ciao,
> Enrico
>
> [1] http://www.phoronix.com/scan.php?page=news_item&px=NzAyOQ
>
>
> On Monday 20 July 2009 13:04:33 Alexis Menard wrote:
> > And sometimes it is faster to set the viewport update mode to
> > FullUpdate in OpenGl.
> >
> > On Jul 20, 2009, at 12:48, Srdjan Todorovic wrote:
> > > Hi,
> > >
> > > On 20/07/2009, Simone Artesino <mlist.sa at gmail.com> wrote:
> > >> I've got a terrible performance degradation when switch Viewport from
> > >> QWidget to QGLWidget. The same qt code (no opengl calls in it) that
> > >> make a
> > >> simple animation, it runs 10 times slower (from 40 fps to 4 fps).
> > >> On the
> > >
> > > Are you running OpenGL in software-only mode?
> > > I know from playing games in Linux, that if you do not have hardware
> > > accelerated OpenGL, things are very very slow.
> > >
> > > Hope that helps,
> > > Srdjan
> > > _______________________________________________
> > > Qt-interest mailing list
> > > Qt-interest at trolltech.com
> > > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>  --
>  Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
> autenticato? GRATIS solo con Email.it http://www.email.it/f
>
>  Sponsor:
>  Prenota online la tua vacanza di ferragosto nei Riccione Family Hotels,
> gli alberghi a misura di bambino! Tanti pacchetti e offerte speciali ti
> aspettano!
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid“65&d -7
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090720/22c377d7/attachment.html 


More information about the Qt-interest-old mailing list