mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
surface-actor: Remove 'pre-paint' vfunc
The vfunc was not tied to "paint", but was used by MetaWindowActorX11 as part of the "update" mechanisms. In order to make that more clear, special case it in MetaWindowActorX11 by type checking the surface actor, handling the case without MetaSurfacActor abstraction. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
This commit is contained in:
parent
551101c65c
commit
468bf81307
@ -58,11 +58,6 @@ meta_surface_actor_wayland_process_damage (MetaSurfaceActor *actor,
|
||||
meta_surface_actor_update_area (actor, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_surface_actor_wayland_pre_paint (MetaSurfaceActor *actor)
|
||||
{
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_surface_actor_wayland_is_opaque (MetaSurfaceActor *actor)
|
||||
{
|
||||
@ -113,7 +108,6 @@ meta_surface_actor_wayland_class_init (MetaSurfaceActorWaylandClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
surface_actor_class->process_damage = meta_surface_actor_wayland_process_damage;
|
||||
surface_actor_class->pre_paint = meta_surface_actor_wayland_pre_paint;
|
||||
surface_actor_class->is_opaque = meta_surface_actor_wayland_is_opaque;
|
||||
|
||||
object_class->dispose = meta_surface_actor_wayland_dispose;
|
||||
|
@ -220,10 +220,9 @@ meta_surface_actor_x11_process_damage (MetaSurfaceActor *actor,
|
||||
meta_surface_actor_update_area (actor, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_surface_actor_x11_pre_paint (MetaSurfaceActor *actor)
|
||||
void
|
||||
meta_surface_actor_x11_handle_updates (MetaSurfaceActorX11 *self)
|
||||
{
|
||||
MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
|
||||
MetaDisplay *display = self->display;
|
||||
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
|
||||
|
||||
@ -332,7 +331,6 @@ meta_surface_actor_x11_class_init (MetaSurfaceActorX11Class *klass)
|
||||
object_class->dispose = meta_surface_actor_x11_dispose;
|
||||
|
||||
surface_actor_class->process_damage = meta_surface_actor_x11_process_damage;
|
||||
surface_actor_class->pre_paint = meta_surface_actor_x11_pre_paint;
|
||||
surface_actor_class->is_opaque = meta_surface_actor_x11_is_opaque;
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,8 @@ gboolean meta_surface_actor_x11_is_unredirected (MetaSurfaceActorX11 *self);
|
||||
|
||||
gboolean meta_surface_actor_x11_is_visible (MetaSurfaceActorX11 *self);
|
||||
|
||||
void meta_surface_actor_x11_handle_updates (MetaSurfaceActorX11 *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __META_SURFACE_ACTOR_X11_H__ */
|
||||
|
@ -555,12 +555,6 @@ meta_surface_actor_process_damage (MetaSurfaceActor *self,
|
||||
META_SURFACE_ACTOR_GET_CLASS (self)->process_damage (self, x, y, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
meta_surface_actor_pre_paint (MetaSurfaceActor *self)
|
||||
{
|
||||
META_SURFACE_ACTOR_GET_CLASS (self)->pre_paint (self);
|
||||
}
|
||||
|
||||
void
|
||||
meta_surface_actor_set_frozen (MetaSurfaceActor *self,
|
||||
gboolean frozen)
|
||||
|
@ -24,7 +24,6 @@ struct _MetaSurfaceActorClass
|
||||
|
||||
void (* process_damage) (MetaSurfaceActor *actor,
|
||||
int x, int y, int width, int height);
|
||||
void (* pre_paint) (MetaSurfaceActor *actor);
|
||||
gboolean (* is_opaque) (MetaSurfaceActor *actor);
|
||||
};
|
||||
|
||||
@ -49,7 +48,7 @@ cairo_region_t * meta_surface_actor_get_opaque_region (MetaSurfaceActor *self);
|
||||
|
||||
void meta_surface_actor_process_damage (MetaSurfaceActor *actor,
|
||||
int x, int y, int width, int height);
|
||||
void meta_surface_actor_pre_paint (MetaSurfaceActor *actor);
|
||||
|
||||
gboolean meta_surface_actor_is_opaque (MetaSurfaceActor *actor);
|
||||
|
||||
gboolean meta_surface_actor_is_frozen (MetaSurfaceActor *actor);
|
||||
|
@ -1209,7 +1209,12 @@ handle_updates (MetaWindowActorX11 *actor_x11)
|
||||
return;
|
||||
}
|
||||
|
||||
meta_surface_actor_pre_paint (surface);
|
||||
if (META_IS_SURFACE_ACTOR_X11 (surface))
|
||||
{
|
||||
MetaSurfaceActorX11 *surface_x11 = META_SURFACE_ACTOR_X11 (surface);
|
||||
|
||||
meta_surface_actor_x11_handle_updates (surface_x11);
|
||||
}
|
||||
|
||||
if (!META_IS_SURFACE_ACTOR_X11 (surface) ||
|
||||
!meta_surface_actor_x11_is_visible (META_SURFACE_ACTOR_X11 (surface)))
|
||||
|
Loading…
Reference in New Issue
Block a user