traverso-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-devel] playhead cpu usage, crosshair like implementation neede


From: Remon
Subject: [Traverso-devel] playhead cpu usage, crosshair like implementation needed ?
Date: Tue, 6 Feb 2007 12:21:47 +0100
User-agent: KMail/1.9.6

Hi,

I've tried _again_ to solve the cpu hogging by playhead painting, but to no 
avail.

What happens:

The canvas (QGraphicsView) internally uses a backinstore (QPixmap). Every time 
a canvas item moves, or calls update(), the rectangle that has to be painted 
is added to the 'exposed region'

This region that consists of all the exposed rectangles is _cleared_, and in 
the paint event all the items that intersect with a given rectangle in the 
region is added in the 'itemstobepaintedlist'

When the playhead moves, the exposed regions simply get cleared!
Now, faking that the playhead is only 1x1 large, and still painting it with 
the vertical size of the canvas view doesn't work, the area isn't in the 
region, and thus doesn't get updated by the backingstore! (and we see a 
playhead of 1 pixel moving at the top)

My idea was, with the above scenario, to first create a copy of the canvas at 
the old position of the playhead, of course only the region that it covers, 
and restore it before it moves. Making a copy of a Pixmap and drawing it back 
is much cheaper then drawing all the items underneath the playhead!!

If any of you have an idea how to 'solve' this issue, let me know please, I'm 
prety much stuck :-(

Regards,

Remon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]