GNOME Bugzilla – Bug 665040
The offscreen effect always recreates the texture if create_texture() is overridden to change the size
Last modified: 2011-11-28 15:49:48 UTC
When a subclass of ClutterOffscreenEffect overrides create_texture to make a bigger texture, the offscreen effect will always recreate the texture when the FBO is updated even if the actor hasn't changed size.
Created attachment 202288 [details] [review] offscreen-effect: Track the size of the actor separately Previously the offscreen effect was keeping track of the size of the texture so that it could detect when a different size is requested and create a new texture. However this breaks if a subclass overrides create_texture to make the texture bigger because in that case the size of the texture will always be different from the calculated size of the actor. This patch makes it also track the size of the fbo that was requested before being passed through create_texture() and it instead uses that to detect when a new FBO is needed.
Review of attachment 202288 [details] [review]: looks good to me.
Thanks. I've pushed it to master as a2774fb0d and to the clutter-1.8 branch as 2e59806.