mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-06-19 14:58:39 +02:00
surface-state: refactor weston_surface_commit
Move some code around so we only have a single call to weston_surface_apply(). This will simplify having deferred state updates later. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
8966ea79fe
commit
23b9f92398
1 changed files with 4 additions and 4 deletions
|
|
@ -518,20 +518,20 @@ enum weston_surface_status
|
|||
weston_surface_commit(struct weston_surface *surface)
|
||||
{
|
||||
struct weston_subsurface *sub = weston_surface_to_subsurface(surface);
|
||||
struct weston_surface_state *state = &surface->pending;
|
||||
enum weston_surface_status status;
|
||||
|
||||
if (sub) {
|
||||
weston_surface_state_merge_from(&sub->cached,
|
||||
&surface->pending,
|
||||
state,
|
||||
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);
|
||||
state = &sub->cached;
|
||||
}
|
||||
|
||||
status = weston_surface_apply(surface, state);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue