traverso-devel
[Top][All Lists]
Advanced

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

Re: [Traverso-devel] playhead cpu usage, crosshair like implementation n


From: Remon
Subject: Re: [Traverso-devel] playhead cpu usage, crosshair like implementation needed ?
Date: Wed, 7 Feb 2007 13:41:07 +0100
User-agent: KMail/1.9.6

> I don't know if this could help, but in my app KyCE I use cairo to
> render my graphics (curves and all that, and playhead) to a GdkDrawable.
>  I do the actual drawing of all items to offscreen cairo surfaces, and
> then I just paint these surfaces onto the GdkDrawable (the actual X11
> window) in the expose callback, and draw the simple playcursor on top of
> that. So, I only need to do actual redraw when any item (curves,
> timegrid, etc..) changes. The expose routine is fast, since it only
> paints the already-drawn surfaces onto the screen.


So, what you do is painting on something like an offscreen 'pixmap', and paint 
the parts that are exposed from these pixmaps to the screen ?
That of course works, but e.g. when audioclips are very large, how do you 
gonna know which part to paint on the pixmap?

What bothers me a little with this approach, all these offscreen pixmaps gonna 
consume tons of memory.. ?

If I understand you correctly, this indeed works, but means a true triple 
buffering approach ?

My proposed solution would only triple buffer the playhead canvas item....

Oh well, after some cleanups the canvas painting has halved in cpu usage, and 
Nicola's ppc can keep up with it nicely now, so I would say, let's not spend 
to much time into this :-)
(CPU usage during playback on my pc == 0.5 % cpu usage, no big deal lol, 
animated flip page ~ 10- 15 %)

Regards,

Remon




reply via email to

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