clutter-effect: Rename get_paint_volume
`_clutter_effect_get_paint_volume` was misleading. Its only purpose is to modify an existing paint volume. So change `get` to `modify`. https://gitlab.gnome.org/GNOME/mutter/merge_requests/115
This commit is contained in:
parent
178b975d6a
commit
c237bc5f45
@ -17551,7 +17551,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
|
|||||||
l != NULL && l->data != priv->current_effect;
|
l != NULL && l->data != priv->current_effect;
|
||||||
l = l->next)
|
l = l->next)
|
||||||
{
|
{
|
||||||
if (!_clutter_effect_get_paint_volume (l->data, pv))
|
if (!_clutter_effect_modify_paint_volume (l->data, pv))
|
||||||
{
|
{
|
||||||
clutter_paint_volume_free (pv);
|
clutter_paint_volume_free (pv);
|
||||||
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
|
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
|
||||||
@ -17569,7 +17569,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
|
|||||||
/* otherwise, get the cumulative volume */
|
/* otherwise, get the cumulative volume */
|
||||||
effects = _clutter_meta_group_peek_metas (priv->effects);
|
effects = _clutter_meta_group_peek_metas (priv->effects);
|
||||||
for (l = effects; l != NULL; l = l->next)
|
for (l = effects; l != NULL; l = l->next)
|
||||||
if (!_clutter_effect_get_paint_volume (l->data, pv))
|
if (!_clutter_effect_modify_paint_volume (l->data, pv))
|
||||||
{
|
{
|
||||||
clutter_paint_volume_free (pv);
|
clutter_paint_volume_free (pv);
|
||||||
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
|
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
|
||||||
|
@ -178,8 +178,8 @@ clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_blur_effect_get_paint_volume (ClutterEffect *effect,
|
clutter_blur_effect_modify_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
gfloat cur_width, cur_height;
|
gfloat cur_width, cur_height;
|
||||||
ClutterVertex origin;
|
ClutterVertex origin;
|
||||||
@ -223,7 +223,7 @@ clutter_blur_effect_class_init (ClutterBlurEffectClass *klass)
|
|||||||
gobject_class->dispose = clutter_blur_effect_dispose;
|
gobject_class->dispose = clutter_blur_effect_dispose;
|
||||||
|
|
||||||
effect_class->pre_paint = clutter_blur_effect_pre_paint;
|
effect_class->pre_paint = clutter_blur_effect_pre_paint;
|
||||||
effect_class->get_paint_volume = clutter_blur_effect_get_paint_volume;
|
effect_class->modify_paint_volume = clutter_blur_effect_modify_paint_volume;
|
||||||
|
|
||||||
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
||||||
offscreen_class->paint_target = clutter_blur_effect_paint_target;
|
offscreen_class->paint_target = clutter_blur_effect_paint_target;
|
||||||
|
@ -7,7 +7,7 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
||||||
void _clutter_effect_post_paint (ClutterEffect *effect);
|
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
gboolean _clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume);
|
ClutterPaintVolume *volume);
|
||||||
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
||||||
void _clutter_effect_paint (ClutterEffect *effect,
|
void _clutter_effect_paint (ClutterEffect *effect,
|
||||||
|
@ -188,8 +188,8 @@ clutter_effect_real_post_paint (ClutterEffect *effect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_effect_real_get_paint_volume (ClutterEffect *effect,
|
clutter_effect_real_modify_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ clutter_effect_class_init (ClutterEffectClass *klass)
|
|||||||
|
|
||||||
klass->pre_paint = clutter_effect_real_pre_paint;
|
klass->pre_paint = clutter_effect_real_pre_paint;
|
||||||
klass->post_paint = clutter_effect_real_post_paint;
|
klass->post_paint = clutter_effect_real_post_paint;
|
||||||
klass->get_paint_volume = clutter_effect_real_get_paint_volume;
|
klass->modify_paint_volume = clutter_effect_real_modify_paint_volume;
|
||||||
klass->paint = clutter_effect_real_paint;
|
klass->paint = clutter_effect_real_paint;
|
||||||
klass->pick = clutter_effect_real_pick;
|
klass->pick = clutter_effect_real_pick;
|
||||||
}
|
}
|
||||||
@ -297,13 +297,14 @@ _clutter_effect_pick (ClutterEffect *effect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_clutter_effect_get_paint_volume (ClutterEffect *effect,
|
_clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||||
g_return_val_if_fail (volume != NULL, FALSE);
|
g_return_val_if_fail (volume != NULL, FALSE);
|
||||||
|
|
||||||
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume (effect, volume);
|
return CLUTTER_EFFECT_GET_CLASS (effect)->modify_paint_volume (effect,
|
||||||
|
volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -311,7 +312,7 @@ _clutter_effect_has_custom_paint_volume (ClutterEffect *effect)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||||
|
|
||||||
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume != clutter_effect_real_get_paint_volume;
|
return CLUTTER_EFFECT_GET_CLASS (effect)->modify_paint_volume != clutter_effect_real_modify_paint_volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,7 @@ struct _ClutterEffect
|
|||||||
* ClutterEffectClass:
|
* ClutterEffectClass:
|
||||||
* @pre_paint: virtual function
|
* @pre_paint: virtual function
|
||||||
* @post_paint: virtual function
|
* @post_paint: virtual function
|
||||||
* @get_paint_volume: virtual function
|
* @modify_paint_volume: virtual function
|
||||||
* @paint: virtual function
|
* @paint: virtual function
|
||||||
* @pick: virtual function
|
* @pick: virtual function
|
||||||
*
|
*
|
||||||
@ -74,16 +74,16 @@ struct _ClutterEffectClass
|
|||||||
ClutterActorMetaClass parent_class;
|
ClutterActorMetaClass parent_class;
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
gboolean (* pre_paint) (ClutterEffect *effect);
|
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||||
void (* post_paint) (ClutterEffect *effect);
|
void (* post_paint) (ClutterEffect *effect);
|
||||||
|
|
||||||
gboolean (* get_paint_volume) (ClutterEffect *effect,
|
gboolean (* modify_paint_volume) (ClutterEffect *effect,
|
||||||
ClutterPaintVolume *volume);
|
ClutterPaintVolume *volume);
|
||||||
|
|
||||||
void (* paint) (ClutterEffect *effect,
|
void (* paint) (ClutterEffect *effect,
|
||||||
ClutterEffectPaintFlags flags);
|
ClutterEffectPaintFlags flags);
|
||||||
void (* pick) (ClutterEffect *effect,
|
void (* pick) (ClutterEffect *effect,
|
||||||
ClutterEffectPaintFlags flags);
|
ClutterEffectPaintFlags flags);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
void (* _clutter_effect4) (void);
|
void (* _clutter_effect4) (void);
|
||||||
|
Loading…
Reference in New Issue
Block a user