GNOME Bugzilla – Bug 585012
Add the root pixmap source actor to the stage
Last modified: 2009-06-08 21:18:11 UTC
With clutter changes, we can now no longer clone an actor unless it is part of a stage. So, we hide the root pixmap source, and add it. This means that the logic to free the source actor when the last clone disappears no longer applies, since the stage will also reference it; so we just leave the actor around permanently.
Created attachment 136062 [details] [review] Add the root pixmap source actor to the stage
isn't it kind of bad, video-memory-wise to keep an extra screen-sized texture around forever? but anyway, the patch looks like it does what you said
If the texture_from_pixmap GLX extension is in place and we have zero-copy texture-from-pixmap with DRI2, then the texture won't actually use any memory, other than a few bytes for the Clutter and Cogl objects. This is what we expect to to be the normal case in the future. Otherwise, we have to choose between using the extra memory and scraping the background pixmap out of the X server every time we open the overlay. It's sort of a no-win situation.
Is - ClutterGLXTexturePixmap *root_pixmap; + ClutterActor *root_pixmap; also part of Clutter's API changes, or is it just cleaner? The patch looks good to me too and works well with Clutter 0.9 here. (I guess I cannot test with 1.0 until the other patches are applied.)
(In reply to comment #4) > Is > - ClutterGLXTexturePixmap *root_pixmap; > + ClutterActor *root_pixmap; > also part of Clutter's API changes, or is it just cleaner? Just a cleanup. It really shouldn't be part of this patch, but I was being lazy. Pushed.