wayland/actor-surface: Queue redraw for frame callback

A frame callback without damage is still expected to be responded to.
Implement this by simply queuing damage if there are any frame callbacks
requested and there is no damage yet. If there already is damage,
we'll be queued already, but with more correct damage. Without we simply
need to make sure we flush the callbacks if any area of surface is not
occluded.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/457

https://gitlab.gnome.org/GNOME/mutter/merge_requests/839
This commit is contained in:
Jonas Ådahl 2019-10-09 21:53:09 +02:00
parent 4c15d32b55
commit d49d10b14f

View File

@ -241,6 +241,11 @@ meta_wayland_actor_surface_commit (MetaWaylandSurfaceRole *surface_role,
if (!priv->actor)
return;
if (!wl_list_empty (&pending->frame_callback_list) &&
cairo_region_is_empty (pending->surface_damage) &&
cairo_region_is_empty (pending->buffer_damage))
clutter_actor_queue_redraw (CLUTTER_ACTOR (priv->actor));
meta_wayland_actor_surface_queue_frame_callbacks (actor_surface, pending);
meta_wayland_actor_surface_sync_actor_state (actor_surface);