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 670004 - Add a method to retrieve the size of the FBO from an OffscreenEffect
Add a method to retrieve the size of the FBO from an OffscreenEffect
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterEffect
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: 691903
 
 
Reported: 2012-02-13 18:16 UTC by drago01
Modified: 2013-03-04 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
offscreen-effect: Add a method to get the target area (5.01 KB, patch)
2013-02-21 13:08 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
deform-effect: Don't use deprecated API (1.57 KB, patch)
2013-02-21 13:12 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description drago01 2012-02-13 18:16:16 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).
Comment 1 Emmanuele Bassi (:ebassi) 2012-02-14 11:25:59 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2012-05-28 14:52:07 UTC
ping?
Comment 3 Emmanuele Bassi (:ebassi) 2012-07-18 20:53:38 UTC
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!
Comment 4 drago01 2013-02-19 18:21:21 UTC
(In reply to comment #2)
> ping?

The size isn't enough we need the origin as well.
Comment 5 Emmanuele Bassi (:ebassi) 2013-02-21 13:08:40 UTC
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.
Comment 6 Emmanuele Bassi (:ebassi) 2013-02-21 13:12:51 UTC
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.
Comment 7 drago01 2013-02-21 13:51:45 UTC
Review of attachment 237035 [details] [review]:

Looks good to me and is way more useful than get_target_size()
Comment 8 Emmanuele Bassi (:ebassi) 2013-03-04 12:33:46 UTC
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