[clutter] clutter-actor: Don't apply shaders during picking
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] clutter-actor: Don't apply shaders during picking
- Date: Tue, 5 Jul 2011 12:31:46 +0000 (UTC)
commit bd3762b7199bf8bc373fb245823e0bb8c730b913
Author: Neil Roberts <neil linux intel com>
Date: Mon Jul 4 18:23:32 2011 +0100
clutter-actor: Don't apply shaders during picking
Commit 0ede622f5132 inadvertently made it so that shaders are applied
during picking. This was making test-shader fail to respond to clicks.
The commit also makes it so that culling is applied during
picking. Presumably this is also unintentional because the commit
message does not mention it. However I think it may make sense to do
culling during picking so it might as well stay that way.
https://bugzilla.gnome.org/show_bug.cgi?id=653959
clutter/clutter-actor.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index df1f59e..ce0b94d 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -2813,6 +2813,8 @@ clutter_actor_paint (ClutterActor *self)
ClutterActorPrivate *priv;
ClutterPickMode pick_mode;
gboolean clip_set = FALSE;
+ gboolean shader_applied = FALSE;
+
CLUTTER_STATIC_COUNTER (actor_paint_counter,
"Actor real-paint counter",
"Increments each time any actor is painted",
@@ -2940,8 +2942,12 @@ clutter_actor_paint (ClutterActor *self)
if (priv->effects == NULL)
{
- if (actor_has_shader_data (self))
- clutter_actor_shader_pre_paint (self, FALSE);
+ if (pick_mode == CLUTTER_PICK_NONE &&
+ actor_has_shader_data (self))
+ {
+ clutter_actor_shader_pre_paint (self, FALSE);
+ shader_applied = TRUE;
+ }
priv->next_effect_to_paint = NULL;
}
else
@@ -2950,8 +2956,7 @@ clutter_actor_paint (ClutterActor *self)
clutter_actor_continue_paint (self);
- if (priv->effects == NULL &&
- actor_has_shader_data (self))
+ if (shader_applied)
clutter_actor_shader_post_paint (self);
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]