[mutter] compositor/native: Remove redundant function
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] compositor/native: Remove redundant function
- Date: Mon, 1 Aug 2022 21:40:45 +0000 (UTC)
commit ad0e19a034cfbe2a100c3c5d1eda729781440387
Author: Dor Askayo <dor askayo gmail com>
Date: Sat Jul 16 09:48:56 2022 +0300
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>
src/compositor/meta-compositor-native.c | 4 ++--
src/compositor/meta-surface-actor-wayland.c | 17 -----------------
src/compositor/meta-surface-actor-wayland.h | 3 ---
3 files changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/src/compositor/meta-compositor-native.c b/src/compositor/meta-compositor-native.c
index e2614f6f7e..cc635d48cb 100644
--- a/src/compositor/meta-compositor-native.c
+++ b/src/compositor/meta-compositor-native.c
@@ -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;
diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index f6e8f84329..329b88e4e3 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -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 *
diff --git a/src/compositor/meta-surface-actor-wayland.h b/src/compositor/meta-surface-actor-wayland.h
index adb01a2975..1a349af91f 100644
--- a/src/compositor/meta-surface-actor-wayland.h
+++ b/src/compositor/meta-surface-actor-wayland.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]