mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50: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);
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ void _clutter_effect_post_paint (ClutterEffect *eff
|
||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
void _clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
ClutterEffectPaintFlags flags);
|
||||
void _clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
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 */
|
||||
@ -229,7 +229,7 @@ clutter_effect_real_get_paint_volume (ClutterEffect *effect,
|
||||
|
||||
static void
|
||||
clutter_effect_real_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||
ClutterActor *actor;
|
||||
@ -250,7 +250,7 @@ clutter_effect_real_paint (ClutterEffect *effect,
|
||||
|
||||
static void
|
||||
clutter_effect_real_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterActorMeta *actor_meta = CLUTTER_ACTOR_META (effect);
|
||||
ClutterActor *actor;
|
||||
@ -313,7 +313,7 @@ _clutter_effect_post_paint (ClutterEffect *effect)
|
||||
|
||||
void
|
||||
_clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||
|
||||
@ -322,7 +322,7 @@ _clutter_effect_paint (ClutterEffect *effect,
|
||||
|
||||
void
|
||||
_clutter_effect_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
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
|
||||
* 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:
|
||||
@ -94,10 +93,9 @@ struct _ClutterEffectClass
|
||||
ClutterPaintVolume *volume);
|
||||
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags);
|
||||
ClutterEffectPaintFlags flags);
|
||||
|
||||
/*< private >*/
|
||||
void (* _clutter_effect4) (void);
|
||||
|
@ -408,7 +408,7 @@ clutter_offscreen_effect_post_paint (ClutterEffect *effect)
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
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
|
||||
|
@ -40,7 +40,7 @@ G_DEFINE_TYPE (ShiftEffect,
|
||||
|
||||
static void
|
||||
shader_paint (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
ClutterShaderEffect *shader = CLUTTER_SHADER_EFFECT (effect);
|
||||
float tex_width;
|
||||
@ -69,7 +69,7 @@ shader_paint (ClutterEffect *effect,
|
||||
|
||||
static void
|
||||
shader_pick (ClutterEffect *effect,
|
||||
ClutterEffectRunFlags flags)
|
||||
ClutterEffectPaintFlags flags)
|
||||
{
|
||||
shader_paint (effect, flags);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user