GNOME Bugzilla – Bug 670004
Add a method to retrieve the size of the FBO from an OffscreenEffect
Last modified: 2013-03-04 12:33:54 UTC
_clutter_paint_volume_get_stage_paint_box should be public as effects might want to use it to query the FBO's size (like we do in st-scroll-view-fade in gnome-shell).
for the specific case of the StScrollViewFade effect, the size of the FBO should be retrieved by using clutter_offscreen_effect_get_target_size(). if that method does not return the correct size, then we can either fix it, or introduce a new method.
ping?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
(In reply to comment #2) > ping? The size isn't enough we need the origin as well.
Created attachment 237035 [details] [review] offscreen-effect: Add a method to get the target area The target size is not always enough, there are cases where the offset used to paint the target must also be available for developers implementing an OffscreenEffect. The get_target_rect() method returns the rectangle used to paint the target, with the offsets in the ClutterRect:origin and the texture size in the ClutterRect:size fields, respectively. The get_target_size() method should be deprecated, given that its replacement is generally more useful.
Created attachment 237036 [details] [review] deform-effect: Don't use deprecated API The ClutterOffscreenEffect.get_target_size() method has been deprecated, and replaced by the get_target_rect() one. We can easily switch to the latter, and avoid the deprecation warning.
Review of attachment 237035 [details] [review]: Looks good to me and is way more useful than get_target_size()
let's push this to master, then we can cherry pick to clutter-1.14 before the release. Attachment 237035 [details] pushed as 37e3ef2 - offscreen-effect: Add a method to get the target area Attachment 237036 [details] pushed as 78962f9 - deform-effect: Don't use deprecated API