mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 18:40:40 -05:00
clutter/offscreen-effect: Simplify paint
Simply chain up to get the pre and post paint methods, instead of reimplementing ClutterEffect.paint() https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340
This commit is contained in:
parent
0d51678bbe
commit
e0a8e824b3
@ -483,15 +483,10 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
|
|||||||
*/
|
*/
|
||||||
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
|
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
|
||||||
{
|
{
|
||||||
ClutterEffectClass *effect_class = CLUTTER_EFFECT_GET_CLASS (effect);
|
ClutterEffectClass *parent_class =
|
||||||
gboolean pre_paint_succeeded;
|
CLUTTER_EFFECT_CLASS (clutter_offscreen_effect_parent_class);
|
||||||
|
|
||||||
pre_paint_succeeded = effect_class->pre_paint (effect, paint_context);
|
parent_class->paint (effect, paint_context, flags);
|
||||||
|
|
||||||
clutter_actor_continue_paint (priv->actor, paint_context);
|
|
||||||
|
|
||||||
if (pre_paint_succeeded)
|
|
||||||
effect_class->post_paint (effect, paint_context);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clutter_offscreen_effect_paint_texture (self, paint_context);
|
clutter_offscreen_effect_paint_texture (self, paint_context);
|
||||||
|
Loading…
Reference in New Issue
Block a user