wayland-surface: Merge actor_surface_commit back in
Since we do it unconditionally now, the code flows better if it's inline with commit_double_buffered_state.
This commit is contained in:
parent
4ab71ec942
commit
f92c1af24a
@ -152,26 +152,6 @@ cursor_surface_commit (MetaWaylandSurface *surface,
|
|||||||
meta_wayland_seat_update_cursor_surface (surface->compositor->seat);
|
meta_wayland_seat_update_cursor_surface (surface->compositor->seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
actor_surface_commit (MetaWaylandSurface *surface,
|
|
||||||
MetaWaylandDoubleBufferedState *pending)
|
|
||||||
{
|
|
||||||
MetaSurfaceActor *surface_actor = surface->surface_actor;
|
|
||||||
|
|
||||||
if (pending->newly_attached && pending->buffer)
|
|
||||||
{
|
|
||||||
ensure_buffer_texture (pending->buffer);
|
|
||||||
meta_surface_actor_wayland_set_buffer (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor), pending->buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
surface_process_damage (surface, pending->damage);
|
|
||||||
|
|
||||||
if (pending->opaque_region)
|
|
||||||
meta_surface_actor_set_opaque_region (surface_actor, pending->opaque_region);
|
|
||||||
if (pending->input_region)
|
|
||||||
meta_surface_actor_set_input_region (surface_actor, pending->input_region);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
toplevel_surface_commit (MetaWaylandSurface *surface,
|
toplevel_surface_commit (MetaWaylandSurface *surface,
|
||||||
MetaWaylandDoubleBufferedState *pending)
|
MetaWaylandDoubleBufferedState *pending)
|
||||||
@ -333,9 +313,22 @@ commit_double_buffered_state (MetaWaylandSurface *surface,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pending->newly_attached)
|
if (pending->newly_attached)
|
||||||
surface_set_buffer (surface, pending->buffer);
|
{
|
||||||
|
surface_set_buffer (surface, pending->buffer);
|
||||||
|
|
||||||
actor_surface_commit (surface, pending);
|
if (pending->buffer)
|
||||||
|
{
|
||||||
|
ensure_buffer_texture (pending->buffer);
|
||||||
|
meta_surface_actor_wayland_set_buffer (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor), pending->buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
surface_process_damage (surface, pending->damage);
|
||||||
|
|
||||||
|
if (pending->opaque_region)
|
||||||
|
meta_surface_actor_set_opaque_region (surface->surface_actor, pending->opaque_region);
|
||||||
|
if (pending->input_region)
|
||||||
|
meta_surface_actor_set_input_region (surface->surface_actor, pending->input_region);
|
||||||
|
|
||||||
if (surface == compositor->seat->pointer.cursor_surface)
|
if (surface == compositor->seat->pointer.cursor_surface)
|
||||||
cursor_surface_commit (surface, pending);
|
cursor_surface_commit (surface, pending);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user