After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665040 - The offscreen effect always recreates the texture if create_texture() is overridden to change the size
The offscreen effect always recreates the texture if create_texture() is over...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterEffect
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-28 13:15 UTC by Neil Roberts
Modified: 2011-11-28 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
offscreen-effect: Track the size of the actor separately (2.35 KB, patch)
2011-11-28 13:15 UTC, Neil Roberts
accepted-commit_now Details | Review

Description Neil Roberts 2011-11-28 13:15:47 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.
Comment 1 Neil Roberts 2011-11-28 13:15:49 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2011-11-28 14:39:14 UTC
Review of attachment 202288 [details] [review]:

looks good to me.
Comment 3 Neil Roberts 2011-11-28 15:49:48 UTC
Thanks. I've pushed it to master as a2774fb0d and to the clutter-1.8 branch as 2e59806.