mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 04:28:24 +02:00
compositor: Move weston_surface_commit()
Moving this later in the file lets us drop the prototype for weston_subsurface_commit(). Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
f4bad074e6
commit
cd58c45daa
1 changed files with 14 additions and 17 deletions
|
|
@ -419,9 +419,6 @@ weston_surface_apply_state(struct weston_surface *surface,
|
|||
return status;
|
||||
}
|
||||
|
||||
static enum weston_surface_status
|
||||
weston_subsurface_commit(struct weston_subsurface *sub);
|
||||
|
||||
static enum weston_surface_status
|
||||
weston_subsurface_apply_from_cache(struct weston_subsurface *sub)
|
||||
{
|
||||
|
|
@ -479,20 +476,6 @@ weston_surface_apply(struct weston_surface *surface,
|
|||
return status;
|
||||
}
|
||||
|
||||
enum weston_surface_status
|
||||
weston_surface_commit(struct weston_surface *surface)
|
||||
{
|
||||
struct weston_subsurface *sub = weston_surface_to_subsurface(surface);
|
||||
enum weston_surface_status status;
|
||||
|
||||
if (sub)
|
||||
status = weston_subsurface_commit(sub);
|
||||
else
|
||||
status = weston_surface_apply(surface, &surface->pending);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void
|
||||
weston_surface_state_merge_from(struct weston_surface_state *dst,
|
||||
struct weston_surface_state *src,
|
||||
|
|
@ -595,6 +578,20 @@ weston_subsurface_commit(struct weston_subsurface *sub)
|
|||
return weston_subsurface_apply_from_cache(sub);
|
||||
}
|
||||
|
||||
enum weston_surface_status
|
||||
weston_surface_commit(struct weston_surface *surface)
|
||||
{
|
||||
struct weston_subsurface *sub = weston_surface_to_subsurface(surface);
|
||||
enum weston_surface_status status;
|
||||
|
||||
if (sub)
|
||||
status = weston_subsurface_commit(sub);
|
||||
else
|
||||
status = weston_surface_apply(surface, &surface->pending);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/** Recursively update effectively_synchronized state for a subsurface tree
|
||||
*
|
||||
* \param sub Subsurface to start from
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue