clutter-actor: Don't apply shaders during picking
Commit 0ede622f51
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
This commit is contained in:
parent
805d27fb0d
commit
bd3762b719
@ -2813,6 +2813,8 @@ clutter_actor_paint (ClutterActor *self)
|
|||||||
ClutterActorPrivate *priv;
|
ClutterActorPrivate *priv;
|
||||||
ClutterPickMode pick_mode;
|
ClutterPickMode pick_mode;
|
||||||
gboolean clip_set = FALSE;
|
gboolean clip_set = FALSE;
|
||||||
|
gboolean shader_applied = FALSE;
|
||||||
|
|
||||||
CLUTTER_STATIC_COUNTER (actor_paint_counter,
|
CLUTTER_STATIC_COUNTER (actor_paint_counter,
|
||||||
"Actor real-paint counter",
|
"Actor real-paint counter",
|
||||||
"Increments each time any actor is painted",
|
"Increments each time any actor is painted",
|
||||||
@ -2940,8 +2942,12 @@ clutter_actor_paint (ClutterActor *self)
|
|||||||
|
|
||||||
if (priv->effects == NULL)
|
if (priv->effects == NULL)
|
||||||
{
|
{
|
||||||
if (actor_has_shader_data (self))
|
if (pick_mode == CLUTTER_PICK_NONE &&
|
||||||
|
actor_has_shader_data (self))
|
||||||
|
{
|
||||||
clutter_actor_shader_pre_paint (self, FALSE);
|
clutter_actor_shader_pre_paint (self, FALSE);
|
||||||
|
shader_applied = TRUE;
|
||||||
|
}
|
||||||
priv->next_effect_to_paint = NULL;
|
priv->next_effect_to_paint = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2950,8 +2956,7 @@ clutter_actor_paint (ClutterActor *self)
|
|||||||
|
|
||||||
clutter_actor_continue_paint (self);
|
clutter_actor_continue_paint (self);
|
||||||
|
|
||||||
if (priv->effects == NULL &&
|
if (shader_applied)
|
||||||
actor_has_shader_data (self))
|
|
||||||
clutter_actor_shader_post_paint (self);
|
clutter_actor_shader_post_paint (self);
|
||||||
|
|
||||||
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES &&
|
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES &&
|
||||||
|
Loading…
Reference in New Issue
Block a user