mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-02-05 01:50:28 +01:00
surface-state: remove more subsurface specific paths
weston_subsurface_commit_to_cache and weston_subsurface_commit are trivial functions with single call sites. Eliminate them. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
f322b41b3d
commit
8966ea79fe
1 changed files with 10 additions and 23 deletions
|
|
@ -514,36 +514,23 @@ weston_surface_state_merge_from(struct weston_surface_state *dst,
|
|||
src->status = WESTON_SURFACE_CLEAN;
|
||||
}
|
||||
|
||||
static void
|
||||
weston_subsurface_commit_to_cache(struct weston_subsurface *sub)
|
||||
{
|
||||
struct weston_surface *surface = sub->surface;
|
||||
|
||||
weston_surface_state_merge_from(&sub->cached,
|
||||
&surface->pending,
|
||||
surface);
|
||||
}
|
||||
|
||||
static enum weston_surface_status
|
||||
weston_subsurface_commit(struct weston_subsurface *sub)
|
||||
{
|
||||
weston_subsurface_commit_to_cache(sub);
|
||||
if (sub->effectively_synchronized)
|
||||
return WESTON_SURFACE_CLEAN;
|
||||
|
||||
return weston_surface_apply(sub->surface, &sub->cached);
|
||||
}
|
||||
|
||||
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
|
||||
if (sub) {
|
||||
weston_surface_state_merge_from(&sub->cached,
|
||||
&surface->pending,
|
||||
surface);
|
||||
if (sub->effectively_synchronized)
|
||||
return WESTON_SURFACE_CLEAN;
|
||||
|
||||
status = weston_surface_apply(sub->surface, &sub->cached);
|
||||
} else {
|
||||
status = weston_surface_apply(surface, &surface->pending);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue