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 651700 - Give a chance to effects for running when picking
Give a chance to effects for running when picking
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-02 12:19 UTC by Tomeu Vizoso
Modified: 2011-06-13 22:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch 1 (16.42 KB, patch)
2011-06-02 12:21 UTC, Tomeu Vizoso
none Details | Review
Rename ClutterEffect::run to ClutterEffect::paint (10.33 KB, patch)
2011-06-06 08:40 UTC, Tomeu Vizoso
none Details | Review
Give a chance to effects for running when picking (17.59 KB, patch)
2011-06-06 08:41 UTC, Tomeu Vizoso
none Details | Review
Give a chance to effects for running when picking (19.25 KB, patch)
2011-06-06 14:36 UTC, Tomeu Vizoso
reviewed Details | Review
Give a chance to effects for running when picking (18.67 KB, patch)
2011-06-07 14:34 UTC, Tomeu Vizoso
reviewed Details | Review
Give a chance to effects for running when picking (18.75 KB, patch)
2011-06-07 15:34 UTC, Tomeu Vizoso
none Details | Review
Suggested changes to be squashed into the patch (5.29 KB, patch)
2011-06-13 12:50 UTC, Neil Roberts
none Details | Review
effect: Rename RunFlags to PaintFlags (10.02 KB, patch)
2011-06-13 15:00 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Tomeu Vizoso 2011-06-02 12:19:01 UTC
The tests don't pass on my machines because ClutterShaderEffect causes
artifacts on them (i965 and MEGD).
Comment 1 Tomeu Vizoso 2011-06-02 12:21:01 UTC
Created attachment 189075 [details] [review]
patch 1
Comment 2 Tomeu Vizoso 2011-06-03 09:37:26 UTC
(In reply to comment #0)
> The tests don't pass on my machines because ClutterShaderEffect causes
> artifacts on them (i965 and MEGD).

Tests pass now after updating the machine with i965 to Fedora 15.
Comment 3 Tomeu Vizoso 2011-06-06 08:40:35 UTC
Created attachment 189304 [details] [review]
Rename ClutterEffect::run to ClutterEffect::paint

In preparation for adding ClutterEffect::pick
Comment 4 Tomeu Vizoso 2011-06-06 08:41:32 UTC
Created attachment 189305 [details] [review]
Give a chance to effects for running when picking

Some effects can change the actor's shape and position, so they need
to run when picking.
Comment 5 Tomeu Vizoso 2011-06-06 14:36:10 UTC
Created attachment 189330 [details] [review]
Give a chance to effects for running when picking

Some effects can change the actor's shape and position, so they need
to run when picking.

Invalidates the cached texture in ClutterOffscreenEffect if the picking
mode changes.
Comment 6 Emmanuele Bassi (:ebassi) 2011-06-06 15:51:50 UTC
Review of attachment 189330 [details] [review]:

initial review; I'll let Neil look at the propagated_one_redraw flag issue

::: clutter/clutter-actor.c
@@ +2858,3 @@
+     applications to notify when the value of the
+     has_overlaps virtual changes. */
+  add_or_remove_flatten_effect (self);

add_or_remove_flatten_effect() should only be executed when painting - we're picking actors at full opacity, so we shouldn't use the flatten effect for the opacity.
Comment 7 Tomeu Vizoso 2011-06-07 14:34:47 UTC
Created attachment 189409 [details] [review]
Give a chance to effects for running when picking

Some effects can change the actor's shape and position, so they need
to run when picking.
Comment 8 Emmanuele Bassi (:ebassi) 2011-06-07 15:27:11 UTC
Review of attachment 189409 [details] [review]:

I think this is generally correct and what we discussed.

::: clutter/clutter-effect.h
@@ +102,2 @@
   /*< private >*/
   void (* _clutter_effect3) (void);

you need to remove the corresponding padding from the vtable, otherwise it's an ABI break.
Comment 9 Tomeu Vizoso 2011-06-07 15:34:39 UTC
Created attachment 189412 [details] [review]
Give a chance to effects for running when picking

Some effects can change the actor's shape and position, so they need
to run when picking.
Comment 10 Neil Roberts 2011-06-13 12:50:28 UTC
Created attachment 189820 [details] [review]
Suggested changes to be squashed into the patch

The patches look good to me but I just have a few comments. I don't think we should be clearing the priv->propagated_one_redraw flag when the actor is picked because then if a pick is performed between two paints then it will assume the actor is not dirty. We don't really have a mechanism to determine when a 'pick' is dirty so I think we should just always pass the dirty flag to the effect.

I don't see why ClutterOffscreenEffect needs to change in the second patch. It was changed to check what the pick mode is in pre_paint and use this value to determine whether to use the cached image in the paint() method. I don't think this makes sense because the pre_paint and paint() methods won't get called during a pick but it wouldn't help anyway because pre_paint is called after the paint() method.

I'm attaching a diff with the suggested changes that I think we should squash into Tomeu's patch.
Comment 11 Emmanuele Bassi (:ebassi) 2011-06-13 15:00:46 UTC
Created attachment 189829 [details] [review]
effect: Rename RunFlags to PaintFlags

Since run() was replaced and both paint() and pick() use the
enumeration.
Comment 12 Emmanuele Bassi (:ebassi) 2011-06-13 22:59:41 UTC
pushed the patches, and squashed Neil's patch on top of Tomeu's.

thanks!