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 = 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_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 */
|
||||
effects = _clutter_meta_group_peek_metas (priv->effects);
|
||||
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_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
|
||||
|
@ -178,8 +178,8 @@ clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_blur_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
clutter_blur_effect_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
gfloat cur_width, cur_height;
|
||||
ClutterVertex origin;
|
||||
@ -223,7 +223,7 @@ clutter_blur_effect_class_init (ClutterBlurEffectClass *klass)
|
||||
gobject_class->dispose = clutter_blur_effect_dispose;
|
||||
|
||||
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->paint_target = clutter_blur_effect_paint_target;
|
||||
|
@ -7,7 +7,7 @@ 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,
|
||||
gboolean _clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
||||
void _clutter_effect_paint (ClutterEffect *effect,
|
||||
|
@ -188,8 +188,8 @@ clutter_effect_real_post_paint (ClutterEffect *effect)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_effect_real_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
clutter_effect_real_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@ -252,7 +252,7 @@ clutter_effect_class_init (ClutterEffectClass *klass)
|
||||
|
||||
klass->pre_paint = clutter_effect_real_pre_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->pick = clutter_effect_real_pick;
|
||||
}
|
||||
@ -297,13 +297,14 @@ _clutter_effect_pick (ClutterEffect *effect,
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
_clutter_effect_modify_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), 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
|
||||
@ -311,7 +312,7 @@ _clutter_effect_has_custom_paint_volume (ClutterEffect *effect)
|
||||
{
|
||||
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:
|
||||
* @pre_paint: virtual function
|
||||
* @post_paint: virtual function
|
||||
* @get_paint_volume: virtual function
|
||||
* @modify_paint_volume: virtual function
|
||||
* @paint: virtual function
|
||||
* @pick: virtual function
|
||||
*
|
||||
@ -74,16 +74,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 (* modify_paint_volume) (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* paint) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void (* pick) (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
|
||||
/*< private >*/
|
||||
void (* _clutter_effect4) (void);
|
||||
|
Loading…
Reference in New Issue
Block a user