effect: Rename RunFlags to PaintFlags

Since run() was replaced and both paint() and pick() use the
enumeration.

https://bugzilla.gnome.org/show_bug.cgi?id=651700
This commit is contained in:
Emmanuele Bassi 2011-06-13 15:58:46 +01:00
parent 0ede622f51
commit 74a9b71060
6 changed files with 43 additions and 45 deletions

View File

@ -2991,7 +2991,7 @@ clutter_actor_continue_paint (ClutterActor *self)
else else
{ {
ClutterEffect *old_current_effect; ClutterEffect *old_current_effect;
ClutterEffectRunFlags run_flags = 0; ClutterEffectPaintFlags run_flags = 0;
/* Cache the current effect so that we can put it back before /* Cache the current effect so that we can put it back before
returning */ returning */
@ -3011,7 +3011,7 @@ clutter_actor_continue_paint (ClutterActor *self)
(although it should work ok if it does) */ (although it should work ok if it does) */
if (priv->effect_to_redraw == NULL || if (priv->effect_to_redraw == NULL ||
priv->current_effect != priv->effect_to_redraw) priv->current_effect != priv->effect_to_redraw)
run_flags |= CLUTTER_EFFECT_RUN_ACTOR_DIRTY; run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
} }
_clutter_effect_paint (priv->current_effect, run_flags); _clutter_effect_paint (priv->current_effect, run_flags);
@ -3021,7 +3021,7 @@ clutter_actor_continue_paint (ClutterActor *self)
/* We can't determine when an actor has been modified since /* We can't determine when an actor has been modified since
its last pick so lets just assume it has always been its last pick so lets just assume it has always been
modified */ modified */
run_flags |= CLUTTER_EFFECT_RUN_ACTOR_DIRTY; run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
_clutter_effect_pick (priv->current_effect, run_flags); _clutter_effect_pick (priv->current_effect, run_flags);
} }

View File

@ -10,9 +10,9 @@ void _clutter_effect_post_paint (ClutterEffect *eff
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect, gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
ClutterPaintVolume *volume); ClutterPaintVolume *volume);
void _clutter_effect_paint (ClutterEffect *effect, void _clutter_effect_paint (ClutterEffect *effect,
ClutterEffectRunFlags flags); ClutterEffectPaintFlags flags);
void _clutter_effect_pick (ClutterEffect *effect, void _clutter_effect_pick (ClutterEffect *effect,
ClutterEffectRunFlags flags); ClutterEffectPaintFlags flags);
G_END_DECLS G_END_DECLS

View File

@ -44,7 +44,7 @@
* something like this: * something like this:
* </para> * </para>
* <programlisting> * <programlisting>
* void effect_paint (ClutterEffect *effect, ClutterEffectRunFlags flags) * void effect_paint (ClutterEffect *effect, ClutterEffectPaintFlags flags)
* { * {
* /&ast; Set up initialisation of the paint such as binding a * /&ast; Set up initialisation of the paint such as binding a
* CoglOffscreen or other operations &ast;/ * CoglOffscreen or other operations &ast;/
@ -229,7 +229,7 @@ clutter_effect_real_get_paint_volume (ClutterEffect *effect,
static void static void
clutter_effect_real_paint (ClutterEffect *effect, clutter_effect_real_paint (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect); ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
ClutterActor *actor; ClutterActor *actor;
@ -250,7 +250,7 @@ clutter_effect_real_paint (ClutterEffect *effect,
static void static void
clutter_effect_real_pick (ClutterEffect *effect, clutter_effect_real_pick (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect); ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
ClutterActor *actor; ClutterActor *actor;
@ -313,7 +313,7 @@ _clutter_effect_post_paint (ClutterEffect *effect)
void void
_clutter_effect_paint (ClutterEffect *effect, _clutter_effect_paint (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
g_return_if_fail (CLUTTER_IS_EFFECT (effect)); g_return_if_fail (CLUTTER_IS_EFFECT (effect));
@ -322,7 +322,7 @@ _clutter_effect_paint (ClutterEffect *effect,
void void
_clutter_effect_pick (ClutterEffect *effect, _clutter_effect_pick (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
g_return_if_fail (CLUTTER_IS_EFFECT (effect)); g_return_if_fail (CLUTTER_IS_EFFECT (effect));

View File

@ -43,18 +43,17 @@ G_BEGIN_DECLS
typedef struct _ClutterEffectClass ClutterEffectClass; typedef struct _ClutterEffectClass ClutterEffectClass;
/** /**
* ClutterEffectRunFlags: * ClutterEffectPaintFlags:
* @CLUTTER_EFFECT_RUN_ACTOR_DIRTY: The actor or one of its children * @CLUTTER_EFFECT_PAINT_ACTOR_DIRTY: The actor or one of its children
* has queued a redraw before this paint. This implies that the effect * has queued a redraw before this paint. This implies that the effect
* should call clutter_actor_continue_paint() to chain to the next * should call clutter_actor_continue_paint() to chain to the next
* effect and can not cache any results from a previous paint. * effect and can not cache any results from a previous paint.
* *
* Flags passed to the paint or pick method of #ClutterEffect. * Flags passed to the paint or pick method of #ClutterEffect.
*/ */
typedef enum typedef enum { /*< prefix=CLUTTER_EFFECT_PAINT >*/
{ CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
CLUTTER_EFFECT_RUN_ACTOR_DIRTY = (1 << 0) } ClutterEffectPaintFlags;
} ClutterEffectRunFlags;
/** /**
* ClutterEffect: * ClutterEffect:
@ -94,10 +93,9 @@ struct _ClutterEffectClass
ClutterPaintVolume *volume); ClutterPaintVolume *volume);
void (* paint) (ClutterEffect *effect, void (* paint) (ClutterEffect *effect,
ClutterEffectRunFlags flags); ClutterEffectPaintFlags flags);
void (* pick) (ClutterEffect *effect, void (* pick) (ClutterEffect *effect,
ClutterEffectRunFlags flags); ClutterEffectPaintFlags flags);
/*< private >*/ /*< private >*/
void (* _clutter_effect4) (void); void (* _clutter_effect4) (void);

View File

@ -408,7 +408,7 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
static void static void
clutter_offscreen_effect_paint (ClutterEffect *effect, clutter_offscreen_effect_paint (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect); ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
ClutterOffscreenEffectPrivate *priv = self->priv; ClutterOffscreenEffectPrivate *priv = self->priv;
@ -420,7 +420,7 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
actor hasn't been redrawn then we can just use the cached image actor hasn't been redrawn then we can just use the cached image
in the fbo */ in the fbo */
if (priv->offscreen == NULL || if (priv->offscreen == NULL ||
(flags & CLUTTER_EFFECT_RUN_ACTOR_DIRTY) || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY) ||
!cogl_matrix_equal (&matrix, &priv->last_matrix_drawn)) !cogl_matrix_equal (&matrix, &priv->last_matrix_drawn))
{ {
/* Chain up to the parent paint method which will call the pre and /* Chain up to the parent paint method which will call the pre and

View File

@ -40,7 +40,7 @@ G_DEFINE_TYPE (ShiftEffect,
static void static void
shader_paint (ClutterEffect *effect, shader_paint (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
ClutterShaderEffect *shader = CLUTTER_SHADER_EFFECT (effect); ClutterShaderEffect *shader = CLUTTER_SHADER_EFFECT (effect);
float tex_width; float tex_width;
@ -69,7 +69,7 @@ shader_paint (ClutterEffect *effect,
static void static void
shader_pick (ClutterEffect *effect, shader_pick (ClutterEffect *effect,
ClutterEffectRunFlags flags) ClutterEffectPaintFlags flags)
{ {
shader_paint (effect, flags); shader_paint (effect, flags);
} }