Hi Jeremy Slater <[email protected]> wrote:
> Hi, I am working on a project using clutter and clutter-gst. I am > having some performance problems when I have a large number of actors > on screen with a video playing in the background. With a few actors I > am able to maintain the video framerate of 30fps, but with roughly 100 > actors (and probably fewer) on screen the CPU is maxed and the > framerate drops down to 20 or fewer. > I assume the issue here is that for every video frame, all the actors > are being repainted. Is it possible, maybe through an offscreen > buffer, to paint and update the UI separately from the video and then > just mix this single offscreen buffer/actor with the video at the > 30fps? That would certainly improve performance, at least in the > static case without animation, as from my testing, a single actor over > the video uses virtually no more resources. Clutter currently should already be able to do clipped redraws which should mean that if your actors aren't covering the video then they won't get redrawn anyway Assuming your video is fullscreen then and all of the actors are covering the video you might want to experiment with the new offscreen-redirect property. This is a new property in Clutter git master. If you put all of these overlaying actors into a single group then you could set the offscreen-redirect property to 'always' which should make it automatically paint the actors through an FBO and cache the results so that the second time it is painted if there are no changes it will just draw the cached image. However I don't think it's quite so clear cut that this will improve performance. If your rendering turns out to fill-rate limited then by adding the FBO then you are likely to just increase the number of pixels you are rendering. Eg, if the actors are spread into the corners of the screen then the FBO would have to occupy the full size of the stage which means that you would now also have to paint the transparent areas in the middle of the stage. There's some info about this property in a blog post here: http://www.busydoingnothing.co.uk/blog/2011/05/14#correct-opacity 100 actors sounds disappointingly low so there may be some bigger performance problem somewhere in Clutter or in your app here. Hope that helps. - Neil _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
