wayland: Only call frame callbacks when a surface gets drawn on screen
The spec says: "A server should avoid signalling the frame callbacks if the surface is not visible in any way, e.g. the surface is off-screen, or completely obscured by other opaque surfaces." We actually do have the information to do that but we are always calling the frame callbacks in after_stage_paint. So fix that to only call when when the surface gets drawn on screen. https://bugzilla.gnome.org/show_bug.cgi?id=739163
This commit is contained in:
@ -541,7 +541,11 @@ apply_pending_state (MetaWaylandSurface *surface,
|
||||
}
|
||||
|
||||
/* wl_surface.frame */
|
||||
wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);
|
||||
if (surface->surface_actor)
|
||||
meta_surface_actor_wayland_add_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor),
|
||||
&pending->frame_callback_list);
|
||||
else
|
||||
wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);
|
||||
wl_list_init (&pending->frame_callback_list);
|
||||
|
||||
switch (surface->role)
|
||||
|
Reference in New Issue
Block a user