mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-08 08:58:08 +02:00
compositor: Move cache flush into weston_subsurface_set_synchronized
Do a subsurface cache flush in weston_subsurface_set_effectively_synchronized instead of in the protocol handler. This is just so when I move some functions into another file later, I don't need to expose weston_subsurface_apply_from_cache(). Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
b76e6ebd82
commit
e79c9ceee5
1 changed files with 6 additions and 7 deletions
|
|
@ -5891,12 +5891,17 @@ weston_subsurface_update_effectively_synchronized(struct weston_subsurface *sub)
|
|||
static void
|
||||
weston_subsurface_set_synchronized(struct weston_subsurface *sub, bool sync)
|
||||
{
|
||||
bool old_e_sync = sub->effectively_synchronized;
|
||||
if (sub->synchronized == sync)
|
||||
return;
|
||||
|
||||
sub->synchronized = sync;
|
||||
|
||||
weston_subsurface_update_effectively_synchronized(sub);
|
||||
|
||||
/* If sub became effectively desynchronized, flush */
|
||||
if (old_e_sync && !sub->effectively_synchronized)
|
||||
weston_subsurface_apply_from_cache(sub);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -5918,13 +5923,7 @@ subsurface_set_desync(struct wl_client *client, struct wl_resource *resource)
|
|||
if (!sub)
|
||||
return;
|
||||
|
||||
if (sub->synchronized) {
|
||||
weston_subsurface_set_synchronized(sub, false);
|
||||
|
||||
/* If sub became effectively desynchronized, flush. */
|
||||
if (!sub->effectively_synchronized)
|
||||
weston_subsurface_apply_from_cache(sub);
|
||||
}
|
||||
weston_subsurface_set_synchronized(sub, false);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue