mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
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:
parent
0ede622f51
commit
74a9b71060
@ -2991,7 +2991,7 @@ clutter_actor_continue_paint (ClutterActor *self)
|
||||
else
|
||||
{
|
||||
ClutterEffect *old_current_effect;
|
||||
ClutterEffectRunFlags run_flags = 0;
|
||||
ClutterEffectPaintFlags run_flags = 0;
|
||||
|
||||
/* Cache the current effect so that we can put it back before
|
||||
returning */
|
||||
@ -3011,7 +3011,7 @@ clutter_actor_continue_paint (ClutterActor *self)
|
||||
(although it should work ok if it does) */
|
||||
if (priv->effect_to_redraw == NULL ||
|
||||
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);
|
||||
@ -3021,7 +3021,7 @@ clutter_actor_continue_paint (ClutterActor *self)
|
||||
/* We can't determine when an actor has been modified since
|
||||
its last pick so lets just assume it has always been
|
||||
modified */
|
||||
run_flags |= CLUTTER_EFFECT_RUN_ACTOR_DIRTY;
|
||||
run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
|
||||
|
||||
_clutter_effect_pick (priv->current_effect, run_flags);
|
||||
}
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
||||
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
void _clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
void _clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
||||
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
void _clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void _clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
* something like this:
|
||||
* </para>
|
||||
* <programlisting>
|
||||
* void effect_paint (ClutterEffect *effect, ClutterEffectRunFlags flags)
|
||||
* void effect_paint (ClutterEffect *effect, ClutterEffectPaintFlags flags)
|
||||
* {
|
||||
* /* Set up initialisation of the paint such as binding a
|
||||
* CoglOffscreen or other operations */
|
||||
@ -228,8 +228,8 @@ clutter_effect_real_get_paint_volume (ClutterEffect *effect,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_effect_real_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
clutter_effect_real_paint (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||
ClutterActor *actor;
|
||||
@ -249,8 +249,8 @@ clutter_effect_real_paint (ClutterEffect *effect,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_effect_real_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
clutter_effect_real_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||
ClutterActor *actor;
|
||||
@ -312,8 +312,8 @@ _clutter_effect_post_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
_clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||
|
||||
@ -321,8 +321,8 @@ _clutter_effect_paint (ClutterEffect *effect,
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
_clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||
|
||||
|
@ -43,18 +43,17 @@ G_BEGIN_DECLS
|
||||
typedef struct _ClutterEffectClass ClutterEffectClass;
|
||||
|
||||
/**
|
||||
* ClutterEffectRunFlags:
|
||||
* @CLUTTER_EFFECT_RUN_ACTOR_DIRTY: The actor or one of its children
|
||||
* has queued a redraw before this paint. This implies that the effect
|
||||
* should call clutter_actor_continue_paint() to chain to the next
|
||||
* effect and can not cache any results from a previous paint.
|
||||
* ClutterEffectPaintFlags:
|
||||
* @CLUTTER_EFFECT_PAINT_ACTOR_DIRTY: The actor or one of its children
|
||||
* has queued a redraw before this paint. This implies that the effect
|
||||
* should call clutter_actor_continue_paint() to chain to the next
|
||||
* effect and can not cache any results from a previous paint.
|
||||
*
|
||||
* Flags passed to the ‘paint’ or ‘pick’ method of #ClutterEffect.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CLUTTER_EFFECT_RUN_ACTOR_DIRTY = (1 << 0)
|
||||
} ClutterEffectRunFlags;
|
||||
typedef enum { /*< prefix=CLUTTER_EFFECT_PAINT >*/
|
||||
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
|
||||
} ClutterEffectPaintFlags;
|
||||
|
||||
/**
|
||||
* ClutterEffect:
|
||||
@ -87,17 +86,16 @@ struct _ClutterEffectClass
|
||||
ClutterActorMetaClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||
void (* post_paint) (ClutterEffect *effect);
|
||||
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||
void (* post_paint) (ClutterEffect *effect);
|
||||
|
||||
gboolean (* get_paint_volume) (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
gboolean (* get_paint_volume) (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
|
||||
/*< private >*/
|
||||
void (* _clutter_effect4) (void);
|
||||
|
@ -407,8 +407,8 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
clutter_offscreen_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||
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
|
||||
in the fbo */
|
||||
if (priv->offscreen == NULL ||
|
||||
(flags & CLUTTER_EFFECT_RUN_ACTOR_DIRTY) ||
|
||||
(flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY) ||
|
||||
!cogl_matrix_equal (&matrix, &priv->last_matrix_drawn))
|
||||
{
|
||||
/* Chain up to the parent paint method which will call the pre and
|
||||
|
@ -39,8 +39,8 @@ G_DEFINE_TYPE (ShiftEffect,
|
||||
CLUTTER_TYPE_SHADER_EFFECT);
|
||||
|
||||
static void
|
||||
shader_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
shader_paint (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterShaderEffect *shader = CLUTTER_SHADER_EFFECT (effect);
|
||||
float tex_width;
|
||||
@ -68,8 +68,8 @@ shader_paint (ClutterEffect *effect,
|
||||
}
|
||||
|
||||
static void
|
||||
shader_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
shader_pick (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
shader_paint (effect, flags);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user