window-actor: Add 'render' debug prints

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2680>
This commit is contained in:
Robert Mader 2022-10-28 23:03:42 +02:00 committed by Marge Bot
parent bf6e735ef7
commit 2933ca9e1c
2 changed files with 30 additions and 6 deletions

View File

@ -302,11 +302,19 @@ meta_window_actor_wayland_get_scanout_candidate (MetaWindowActor *actor)
MetaWindow *window;
if (clutter_actor_get_last_child (CLUTTER_ACTOR (self)) != surface_container)
return NULL;
{
meta_topic (META_DEBUG_RENDER,
"Top child of window-actor not a surface");
return FALSE;
}
child_actor = clutter_actor_get_last_child (surface_container);
if (!child_actor)
return NULL;
{
meta_topic (META_DEBUG_RENDER,
"No surface-actor for window-actor");
return FALSE;
}
topmost_surface_actor = META_SURFACE_ACTOR (child_actor);
@ -314,7 +322,11 @@ meta_window_actor_wayland_get_scanout_candidate (MetaWindowActor *actor)
if (!meta_surface_actor_is_opaque (topmost_surface_actor) &&
!(meta_window_is_fullscreen (window) &&
clutter_actor_get_n_children (surface_container) == 1))
return NULL;
{
meta_topic (META_DEBUG_RENDER,
"Window-actor is not opaque");
return FALSE;
}
return topmost_surface_actor;
}

View File

@ -257,14 +257,26 @@ meta_window_actor_x11_get_scanout_candidate (MetaWindowActor *actor)
surface_actor = meta_window_actor_get_surface (actor);
if (!surface_actor)
return NULL;
{
meta_topic (META_DEBUG_RENDER,
"No surface-actor for window-actor");
return NULL;
}
if (CLUTTER_ACTOR (surface_actor) !=
clutter_actor_get_last_child (CLUTTER_ACTOR (actor)))
return NULL;
{
meta_topic (META_DEBUG_RENDER,
"Top child of window-actor not a surface");
return NULL;
}
if (!meta_window_actor_is_opaque (actor))
return NULL;
{
meta_topic (META_DEBUG_RENDER,
"Window-actor is not opaque");
return NULL;
}
return surface_actor;
}