Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt4-preview-feedback Archive, January 2008
boundingRegion() / granularity / itemCache


Message 1 in thread

Hi all,

I just installed today's 4.4 snapshot  (20080110) to test the feature Andreas mentioned in his blog entry: http://labs.trolltech.com/blogs/2008/01/08/accurate-update-regions-for-thin-qgraphicsitems/

Looking at the ported canvas source I found the granularity for the edge to be set to 0.05.

While I notice a small performance increase, it is yet far from optimal, I would say.

I tried to further increase the performance by enabling the itemCache (http://labs.trolltech.com/blogs/2007/09/05/thoughts-about-graphics-performance/)

      setCacheMode(QGraphicsItem::ItemCoordinateCache);

but that results in QPainter spitting out bunches of errors as soon as I create a mesh:

brws7001-adapt$ QPainter::begin: Cannot paint on a null pixmap
QPainter::renderHints: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::end: Painter not active, aborted
QPainterPath::moveTo: Adding point where x or y is NaN, results are undefined
QPainterPath::lineTo: Adding point where x or y is NaN, results are undefined
  [some hunderd msg deleted]
QPainter::begin: Cannot paint on a null pixmap
QPainter::renderHints: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::end: Painter not active, aborted
QPainter::begin: Cannot paint on a null pixmap
QPainter::renderHints: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::end: Painter not active, aborted

Any idea?

I am under SuSE Linux 10.2.

\Ralf

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 2 in thread

Hi, Ralf.

Ralf Neubersch wrote:
> 
> I just installed today's 4.4 snapshot  (20080110) to test the feature
> Andreas mentioned in his blog entry:
> http://labs.trolltech....update-regions-for-thin-qgraphicsitems/
> Looking at the ported canvas source I found the granularity for the edge
> to be set to 0.05.
> While I notice a small performance increase, it is yet far from optimal, I
> would say.

The purpose of the granular bounding region is to minimize unnecessary
updates; it doesn't prevent items that are crossed from being redrawn.

> I tried to further increase the performance by enabling the itemCache
(http://labs.trolltech.com/blogs/2007/09/05/thoughts-about-graphics-performance/)
>       setCacheMode(QGraphicsItem::ItemCoordinateCache);
> but that results in QPainter spitting out bunches of errors as soon as I
> create a mesh:

The painter warnings are a bug, we're investigating this now.

-- 
 [ signature omitted ]