compositor/native: Remove redundant function

All of the checks this function performed internally were already
done before calling it, making it a simple wrapper function without a
meaningful purpose.

Removing this function also reduces the chance of additional checks
being added to the MetaSurfaceActor after it is already chosen as a
scanout candidate.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2526>
This commit is contained in:
Dor Askayo 2022-07-16 09:48:56 +03:00 committed by Marge Bot
parent 66e938bc34
commit ad0e19a034
3 changed files with 2 additions and 22 deletions

View File

@ -135,8 +135,8 @@ maybe_assign_primary_plane (MetaCompositor *compositor)
new_candidate = surface;
onscreen = COGL_ONSCREEN (framebuffer);
scanout = meta_surface_actor_wayland_try_acquire_scanout (surface_actor_wayland,
onscreen);
scanout = meta_wayland_surface_try_acquire_scanout (surface,
onscreen);
if (!scanout)
goto done;

View File

@ -65,23 +65,6 @@ meta_surface_actor_wayland_is_opaque (MetaSurfaceActor *actor)
return meta_shaped_texture_is_opaque (stex);
}
CoglScanout *
meta_surface_actor_wayland_try_acquire_scanout (MetaSurfaceActorWayland *self,
CoglOnscreen *onscreen)
{
MetaWaylandSurface *surface;
CoglScanout *scanout;
surface = meta_surface_actor_wayland_get_surface (self);
g_return_val_if_fail (surface, NULL);
scanout = meta_wayland_surface_try_acquire_scanout (surface, onscreen);
if (!scanout)
return NULL;
return scanout;
}
#define UNOBSCURED_TRESHOLD 0.1
ClutterStageView *

View File

@ -44,9 +44,6 @@ MetaSurfaceActor * meta_surface_actor_wayland_new (MetaWaylandSurface *surface);
MetaWaylandSurface * meta_surface_actor_wayland_get_surface (MetaSurfaceActorWayland *self);
void meta_surface_actor_wayland_surface_destroyed (MetaSurfaceActorWayland *self);
CoglScanout * meta_surface_actor_wayland_try_acquire_scanout (MetaSurfaceActorWayland *self,
CoglOnscreen *onscreen);
ClutterStageView * meta_surface_actor_wayland_get_current_primary_view (MetaSurfaceActor *actor,
ClutterStage *stage);