import mutter-3.32.2-44.el8
This commit is contained in:
parent
bcb64bfb82
commit
c54b5032f1
@ -1,4 +1,4 @@
|
||||
From d0ad5ea18bb02112837bcdf7270d58d8ad235a4d Mon Sep 17 00:00:00 2001
|
||||
From 8d7356fd7439f94f163438d55f2b2d3d918de96d Mon Sep 17 00:00:00 2001
|
||||
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||
Date: Thu, 8 May 2014 18:44:15 -0400
|
||||
Subject: [PATCH] Add support for quad-buffer stereo
|
||||
@ -265,10 +265,10 @@ index a86a2bff0..d0efdd4dc 100644
|
||||
gboolean is_y_inverted);
|
||||
void meta_shaped_texture_set_snippet (MetaShapedTexture *stex,
|
||||
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
|
||||
index ea8daa03d..9a00ccd6d 100644
|
||||
index d64e214e5..e77a32109 100644
|
||||
--- a/src/compositor/meta-shaped-texture.c
|
||||
+++ b/src/compositor/meta-shaped-texture.c
|
||||
@@ -102,8 +102,10 @@ struct _MetaShapedTexture
|
||||
@@ -88,8 +88,10 @@ struct _MetaShapedTexture
|
||||
ClutterActor parent;
|
||||
|
||||
MetaTextureTower *paint_tower;
|
||||
@ -279,15 +279,15 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
CoglTexture *mask_texture;
|
||||
CoglSnippet *snippet;
|
||||
|
||||
@@ -192,6 +194,7 @@ meta_shaped_texture_init (MetaShapedTexture *stex)
|
||||
clutter_backend_get_cogl_context (clutter_backend);
|
||||
|
||||
@@ -160,6 +162,7 @@ static void
|
||||
meta_shaped_texture_init (MetaShapedTexture *stex)
|
||||
{
|
||||
stex->paint_tower = meta_texture_tower_new ();
|
||||
+ stex->paint_tower_right = NULL; /* demand create */
|
||||
|
||||
stex->texture = NULL;
|
||||
stex->mask_texture = NULL;
|
||||
@@ -335,6 +338,9 @@ meta_shaped_texture_dispose (GObject *object)
|
||||
@@ -297,6 +300,9 @@ meta_shaped_texture_dispose (GObject *object)
|
||||
meta_texture_tower_free (stex->paint_tower);
|
||||
stex->paint_tower = NULL;
|
||||
|
||||
@ -297,7 +297,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
g_clear_pointer (&stex->texture, cogl_object_unref);
|
||||
g_clear_pointer (&stex->opaque_region, cairo_region_destroy);
|
||||
|
||||
@@ -611,8 +617,9 @@ paint_clipped_rectangle (MetaShapedTexture *stex,
|
||||
@@ -507,8 +513,9 @@ paint_clipped_rectangle (MetaShapedTexture *stex,
|
||||
}
|
||||
|
||||
static void
|
||||
@ -309,21 +309,19 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
{
|
||||
int width, height;
|
||||
|
||||
@@ -620,10 +627,13 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
@@ -516,8 +523,11 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
|
||||
if (stex->texture)
|
||||
cogl_object_unref (stex->texture);
|
||||
+ if (stex->texture_right)
|
||||
+ cogl_object_unref (stex->texture_right);
|
||||
|
||||
g_clear_pointer (&stex->saved_base_surface, cairo_surface_destroy);
|
||||
|
||||
stex->texture = cogl_tex;
|
||||
+ stex->texture_right = cogl_tex_right;
|
||||
|
||||
if (cogl_tex != NULL)
|
||||
{
|
||||
@@ -637,6 +647,9 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
@@ -531,6 +541,9 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
height = 0;
|
||||
}
|
||||
|
||||
@ -333,7 +331,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
if (stex->tex_width != width ||
|
||||
stex->tex_height != height)
|
||||
{
|
||||
@@ -650,8 +663,23 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
@@ -544,8 +557,23 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
* previous buffer. We only queue a redraw in response to surface
|
||||
* damage. */
|
||||
|
||||
@ -358,7 +356,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -927,7 +955,9 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
@@ -779,7 +807,9 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
{
|
||||
MetaShapedTexture *stex = META_SHAPED_TEXTURE (actor);
|
||||
CoglTexture *paint_tex;
|
||||
@ -368,7 +366,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
|
||||
if (!stex->texture)
|
||||
return;
|
||||
@@ -989,7 +1019,32 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
@@ -841,7 +871,32 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
return;
|
||||
|
||||
fb = cogl_get_draw_framebuffer ();
|
||||
@ -402,7 +400,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1063,6 +1118,12 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||
@@ -915,6 +970,12 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||
stex->create_mipmaps = create_mipmaps;
|
||||
base_texture = create_mipmaps ? stex->texture : NULL;
|
||||
meta_texture_tower_set_base_texture (stex->paint_tower, base_texture);
|
||||
@ -415,7 +413,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1256,6 +1317,12 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
@@ -1046,6 +1107,12 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
clip.y,
|
||||
clip.width,
|
||||
clip.height);
|
||||
@ -428,7 +426,7 @@ index ea8daa03d..9a00ccd6d 100644
|
||||
|
||||
stex->prev_invalidation = stex->last_invalidation;
|
||||
stex->last_invalidation = g_get_monotonic_time ();
|
||||
@@ -1302,17 +1369,18 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
@@ -1092,17 +1159,18 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
}
|
||||
|
||||
/**
|
||||
@ -903,5 +901,5 @@ index da0acfcbb..ddad1a45c 100644
|
||||
meta_shaped_texture_set_is_y_inverted (stex, is_y_inverted);
|
||||
g_clear_pointer (&snippet, cogl_object_unref);
|
||||
--
|
||||
2.23.0
|
||||
2.25.1
|
||||
|
||||
|
@ -0,0 +1,55 @@
|
||||
From 38d88d4e4286c3ada041561426873e44fdba3c40 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Fri, 17 Jan 2020 14:45:00 +0100
|
||||
Subject: [PATCH] Create explicit WacomDevices for tablet "touchpad" devices
|
||||
|
||||
---
|
||||
src/backends/meta-input-settings.c | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
|
||||
index 28dc387ef9..820a3b201e 100644
|
||||
--- a/src/backends/meta-input-settings.c
|
||||
+++ b/src/backends/meta-input-settings.c
|
||||
@@ -521,27 +521,34 @@ static gboolean
|
||||
device_is_tablet_touchpad (MetaInputSettings *input_settings,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
+ gboolean is_tablet = FALSE;
|
||||
#ifdef HAVE_LIBWACOM
|
||||
+ MetaInputSettingsPrivate *priv;
|
||||
WacomIntegrationFlags flags = 0;
|
||||
WacomDevice *wacom_device;
|
||||
|
||||
+ priv = meta_input_settings_get_instance_private (input_settings);
|
||||
+
|
||||
if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
|
||||
return FALSE;
|
||||
|
||||
wacom_device =
|
||||
- meta_input_settings_get_tablet_wacom_device (input_settings,
|
||||
- device);
|
||||
+ libwacom_new_from_path (priv->wacom_db,
|
||||
+ clutter_input_device_get_device_node (device),
|
||||
+ WFALLBACK_NONE, NULL);
|
||||
if (wacom_device)
|
||||
{
|
||||
flags = libwacom_get_integration_flags (wacom_device);
|
||||
|
||||
if ((flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
|
||||
WACOM_DEVICE_INTEGRATED_DISPLAY)) == 0)
|
||||
- return TRUE;
|
||||
+ is_tablet = TRUE;
|
||||
+
|
||||
+ libwacom_destroy (wacom_device);
|
||||
}
|
||||
#endif
|
||||
|
||||
- return FALSE;
|
||||
+ return is_tablet;
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.25.0.rc2
|
||||
|
@ -0,0 +1,28 @@
|
||||
From d9d355bfd8ecfb7dcf65a3810ec30e12f12673ab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 24 Feb 2020 16:09:59 +0100
|
||||
Subject: [PATCH] Revert "MetaMonitorManager: ignore hotplug_mode_update at
|
||||
startup"
|
||||
|
||||
This reverts commit 183f4b0c13f3dc9565bf5f693f2e5d61ca0199c9.
|
||||
---
|
||||
src/backends/meta-monitor-manager.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
|
||||
index 076dca8cb..0adf2100d 100644
|
||||
--- a/src/backends/meta-monitor-manager.c
|
||||
+++ b/src/backends/meta-monitor-manager.c
|
||||
@@ -527,8 +527,7 @@ meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager)
|
||||
static gboolean
|
||||
should_use_stored_config (MetaMonitorManager *manager)
|
||||
{
|
||||
- return (manager->in_init ||
|
||||
- !meta_monitor_manager_has_hotplug_mode_update (manager));
|
||||
+ return !meta_monitor_manager_has_hotplug_mode_update (manager);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
--
|
||||
2.24.1
|
||||
|
@ -0,0 +1,94 @@
|
||||
From dafc9cb414fd47112b972d34c205e73797a3c1c1 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Fri, 21 Feb 2020 16:45:35 +0100
|
||||
Subject: [PATCH] Skip wacom touchpads when updating setting
|
||||
|
||||
---
|
||||
src/backends/meta-input-settings.c | 46 +++++++++++++++++++++++-------
|
||||
1 file changed, 36 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
|
||||
index cdff7b346..7d866594a 100644
|
||||
--- a/src/backends/meta-input-settings.c
|
||||
+++ b/src/backends/meta-input-settings.c
|
||||
@@ -569,20 +569,33 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
|
||||
|
||||
priv = meta_input_settings_get_instance_private (input_settings);
|
||||
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
||||
- enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
- g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
||||
|
||||
if (device)
|
||||
{
|
||||
+ enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
+ g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
||||
settings_device_set_bool_setting (input_settings, device,
|
||||
input_settings_class->set_tap_enabled,
|
||||
enabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
|
||||
- input_settings_class->set_tap_enabled,
|
||||
- enabled);
|
||||
+ const GSList *devices, *l;
|
||||
+
|
||||
+ devices = clutter_device_manager_peek_devices (priv->device_manager);
|
||||
+ for (l = devices; l; l = l->next)
|
||||
+ {
|
||||
+ device = l->data;
|
||||
+
|
||||
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
|
||||
+ continue;
|
||||
+
|
||||
+ enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
+ g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
||||
+ settings_device_set_bool_setting (input_settings, device,
|
||||
+ input_settings_class->set_tap_enabled,
|
||||
+ enabled);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -600,20 +613,33 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings,
|
||||
|
||||
priv = meta_input_settings_get_instance_private (input_settings);
|
||||
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
||||
- enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
- g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
||||
|
||||
if (device)
|
||||
{
|
||||
+ enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
+ g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
||||
settings_device_set_bool_setting (input_settings, device,
|
||||
input_settings_class->set_tap_and_drag_enabled,
|
||||
enabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
|
||||
- input_settings_class->set_tap_and_drag_enabled,
|
||||
- enabled);
|
||||
+ const GSList *devices, *l;
|
||||
+
|
||||
+ devices = clutter_device_manager_peek_devices (priv->device_manager);
|
||||
+ for (l = devices; l; l = l->next)
|
||||
+ {
|
||||
+ device = l->data;
|
||||
+
|
||||
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
|
||||
+ continue;
|
||||
+
|
||||
+ enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
+ g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
||||
+ settings_device_set_bool_setting (input_settings, device,
|
||||
+ input_settings_class->set_tap_and_drag_enabled,
|
||||
+ enabled);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
49
SOURCES/0001-backend-Add-getter-for-MetaScreenCast.patch
Normal file
49
SOURCES/0001-backend-Add-getter-for-MetaScreenCast.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 967d8236d81c8689f2fe60621ec7e66d88b43dea Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 17 Jun 2020 17:46:25 +0200
|
||||
Subject: [PATCH 1/4] backend: Add getter for MetaScreenCast
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
|
||||
---
|
||||
src/backends/meta-backend-private.h | 2 ++
|
||||
src/backends/meta-backend.c | 11 +++++++++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/src/backends/meta-backend-private.h b/src/backends/meta-backend-private.h
|
||||
index 81ec81e5f1..77f4da77c4 100644
|
||||
--- a/src/backends/meta-backend-private.h
|
||||
+++ b/src/backends/meta-backend-private.h
|
||||
@@ -138,6 +138,8 @@ MetaEgl * meta_backend_get_egl (MetaBackend *backend);
|
||||
|
||||
#ifdef HAVE_REMOTE_DESKTOP
|
||||
MetaRemoteDesktop * meta_backend_get_remote_desktop (MetaBackend *backend);
|
||||
+
|
||||
+MetaScreenCast * meta_backend_get_screen_cast (MetaBackend *backend);
|
||||
#endif
|
||||
|
||||
gboolean meta_backend_grab_device (MetaBackend *backend,
|
||||
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
|
||||
index 750a9248a8..b498b7aa44 100644
|
||||
--- a/src/backends/meta-backend.c
|
||||
+++ b/src/backends/meta-backend.c
|
||||
@@ -965,6 +965,17 @@ meta_backend_get_remote_desktop (MetaBackend *backend)
|
||||
|
||||
return priv->remote_desktop;
|
||||
}
|
||||
+
|
||||
+/**
|
||||
+ * meta_backend_get_screen_cast: (skip)
|
||||
+ */
|
||||
+MetaScreenCast *
|
||||
+meta_backend_get_screen_cast (MetaBackend *backend)
|
||||
+{
|
||||
+ MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
+
|
||||
+ return priv->screen_cast;
|
||||
+}
|
||||
#endif /* HAVE_REMOTE_DESKTOP */
|
||||
|
||||
/**
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,7 +1,61 @@
|
||||
From f14730e7307679cb979aa521b20f246dfc5082da Mon Sep 17 00:00:00 2001
|
||||
From 20fcc3e045287c1ca591f3e795b19e120479a89a Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Wed, 12 Feb 2020 20:26:56 +0100
|
||||
Subject: [PATCH 1/2] backends/x11: Implement is_grouped for X11
|
||||
|
||||
If the devices have a wacom description, compare those. Otherwise,
|
||||
look up the devices' VID:PID, if they match they should also be
|
||||
grouped.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/971
|
||||
---
|
||||
.../clutter/x11/clutter-input-device-xi2.c | 25 +++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/clutter/clutter/x11/clutter-input-device-xi2.c b/clutter/clutter/x11/clutter-input-device-xi2.c
|
||||
index ae2fa27..9eca34d 100644
|
||||
--- a/clutter/clutter/x11/clutter-input-device-xi2.c
|
||||
+++ b/clutter/clutter/x11/clutter-input-device-xi2.c
|
||||
@@ -98,6 +98,31 @@ static gboolean
|
||||
clutter_input_device_xi2_is_grouped (ClutterInputDevice *device,
|
||||
ClutterInputDevice *other_device)
|
||||
{
|
||||
+#ifdef HAVE_LIBWACOM
|
||||
+ ClutterInputDeviceXI2 *device_x11 = CLUTTER_INPUT_DEVICE_XI2 (device);
|
||||
+ ClutterInputDeviceXI2 *other_device_x11 = CLUTTER_INPUT_DEVICE_XI2 (other_device);
|
||||
+
|
||||
+ if (device_x11->wacom_device &&
|
||||
+ other_device_x11->wacom_device &&
|
||||
+ libwacom_compare (device_x11->wacom_device,
|
||||
+ other_device_x11->wacom_device,
|
||||
+ WCOMPARE_NORMAL) == 0)
|
||||
+ return TRUE;
|
||||
+#endif
|
||||
+
|
||||
+ /* Devices with the same VID:PID get grouped together */
|
||||
+ if (clutter_input_device_get_vendor_id (device) &&
|
||||
+ clutter_input_device_get_product_id (device) &&
|
||||
+ clutter_input_device_get_vendor_id (other_device) &&
|
||||
+ clutter_input_device_get_product_id (other_device))
|
||||
+ {
|
||||
+ if (strcmp (clutter_input_device_get_vendor_id (device),
|
||||
+ clutter_input_device_get_vendor_id (other_device)) == 0 &&
|
||||
+ strcmp (clutter_input_device_get_product_id (device),
|
||||
+ clutter_input_device_get_product_id (other_device)) == 0)
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 5914ab9ac79ce42da054036c4a8f118a3a868cc0 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Fri, 13 Dec 2019 15:26:05 +0100
|
||||
Subject: [PATCH] backends: Check both input settings and mapper for tablet
|
||||
Subject: [PATCH 2/2] backends: Check both input settings and mapper for tablet
|
||||
monitors
|
||||
|
||||
The upper layers (OSDs basically) want to know the monitor that a
|
||||
@ -17,13 +71,13 @@ again in the right place.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/971
|
||||
---
|
||||
src/backends/meta-input-mapper-private.h | 3 +++
|
||||
src/backends/meta-input-mapper.c | 26 ++++++++++++++++++++++++
|
||||
src/backends/meta-input-settings.c | 11 ++++++++--
|
||||
3 files changed, 38 insertions(+), 2 deletions(-)
|
||||
src/backends/meta-input-mapper-private.h | 3 ++
|
||||
src/backends/meta-input-mapper.c | 26 ++++++++++++
|
||||
src/backends/meta-input-settings.c | 54 +++++++++++++++++++++++-
|
||||
3 files changed, 81 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-input-mapper-private.h b/src/backends/meta-input-mapper-private.h
|
||||
index 34314577f..cdfdccde9 100644
|
||||
index 3431457..cdfdccd 100644
|
||||
--- a/src/backends/meta-input-mapper-private.h
|
||||
+++ b/src/backends/meta-input-mapper-private.h
|
||||
@@ -42,5 +42,8 @@ ClutterInputDevice *
|
||||
@ -36,10 +90,10 @@ index 34314577f..cdfdccde9 100644
|
||||
|
||||
#endif /* META_INPUT_MAPPER_H */
|
||||
diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c
|
||||
index acc9b1618..571b3983c 100644
|
||||
index fc4f3bd..fe02ab8 100644
|
||||
--- a/src/backends/meta-input-mapper.c
|
||||
+++ b/src/backends/meta-input-mapper.c
|
||||
@@ -684,3 +684,29 @@ meta_input_mapper_get_logical_monitor_device (MetaInputMapper *mapper,
|
||||
@@ -675,3 +675,29 @@ meta_input_mapper_get_logical_monitor_device (MetaInputMapper *mapper,
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -70,10 +124,65 @@ index acc9b1618..571b3983c 100644
|
||||
+ return NULL;
|
||||
+}
|
||||
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
|
||||
index b7aec8d6d..a923aa971 100644
|
||||
index b84595e..ab80bee 100644
|
||||
--- a/src/backends/meta-input-settings.c
|
||||
+++ b/src/backends/meta-input-settings.c
|
||||
@@ -1922,8 +1922,15 @@ meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
|
||||
@@ -1937,6 +1937,42 @@ meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
|
||||
return info ? g_object_ref (info->settings) : NULL;
|
||||
}
|
||||
|
||||
+static ClutterInputDevice *
|
||||
+find_grouped_pen (MetaInputSettings *settings,
|
||||
+ ClutterInputDevice *device)
|
||||
+{
|
||||
+ MetaInputSettingsPrivate *priv;
|
||||
+ GSList *l, *devices;
|
||||
+ ClutterInputDeviceType device_type;
|
||||
+ ClutterInputDevice *pen = NULL;
|
||||
+
|
||||
+ device_type = clutter_input_device_get_device_type (device);
|
||||
+
|
||||
+ if (device_type == CLUTTER_TABLET_DEVICE ||
|
||||
+ device_type == CLUTTER_PEN_DEVICE)
|
||||
+ return device;
|
||||
+
|
||||
+ priv = meta_input_settings_get_instance_private (settings);
|
||||
+ devices = clutter_device_manager_peek_devices (priv->device_manager);
|
||||
+
|
||||
+ for (l = devices; l; l = l->next)
|
||||
+ {
|
||||
+ ClutterInputDevice *device = l->data;
|
||||
+
|
||||
+ device_type = clutter_input_device_get_device_type (l->data);
|
||||
+
|
||||
+ if ((device_type == CLUTTER_TABLET_DEVICE ||
|
||||
+ device_type == CLUTTER_PEN_DEVICE) &&
|
||||
+ clutter_input_device_is_grouped (device, l->data))
|
||||
+ {
|
||||
+ pen = l->data;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return pen;
|
||||
+}
|
||||
+
|
||||
MetaLogicalMonitor *
|
||||
meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
|
||||
ClutterInputDevice *device)
|
||||
@@ -1948,13 +1984,27 @@ meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
|
||||
g_return_val_if_fail (META_IS_INPUT_SETTINGS (settings), NULL);
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL);
|
||||
|
||||
+ if (clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
|
||||
+ {
|
||||
+ device = find_grouped_pen (settings, device);
|
||||
+ if (!device)
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
priv = meta_input_settings_get_instance_private (settings);
|
||||
info = g_hash_table_lookup (priv->mappable_devices, device);
|
||||
if (!info)
|
||||
return NULL;
|
||||
|
||||
@ -92,5 +201,5 @@ index b7aec8d6d..a923aa971 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
||||
|
@ -42,7 +42,7 @@ index 1254aca3a..c33adffc2 100644
|
||||
+ {
|
||||
+ button_group = clutter_input_device_xi2_get_button_group (device, i);
|
||||
+ if (button_group == group)
|
||||
+ switch_buttons = g_list_prepend (switch_buttons, GINT_TO_POINTER (button));
|
||||
+ switch_buttons = g_list_prepend (switch_buttons, GINT_TO_POINTER (i));
|
||||
+ }
|
||||
+
|
||||
+ switch_buttons = g_list_reverse (switch_buttons);
|
||||
@ -53,7 +53,7 @@ index 1254aca3a..c33adffc2 100644
|
||||
+ /* If there's multiple switch buttons, we don't toggle but assign a mode
|
||||
+ * to each of those buttons.
|
||||
+ */
|
||||
+ next_mode = g_list_position (switch_buttons, GINT_TO_POINTER (button));
|
||||
+ next_mode = g_list_index (switch_buttons, GINT_TO_POINTER (button));
|
||||
+ }
|
||||
+ else if (switch_buttons)
|
||||
+ {
|
||||
|
@ -0,0 +1,118 @@
|
||||
From 5a486f5b6bf5f838db5dc2bfc5819a0cba5d2d19 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
|
||||
Date: Thu, 23 May 2019 18:15:28 +0800
|
||||
Subject: [PATCH] background: Reload when GPU memory is invalidated
|
||||
|
||||
Fixes corrupt background wallpaper when resuming from suspend on the
|
||||
Nvidia driver.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1084
|
||||
|
||||
(cherry picked from commit a5265365dd268e15a461a58000a10b122d0bccba)
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/777
|
||||
---
|
||||
src/compositor/meta-background.c | 46 +++++++++++++++++++++++++-------
|
||||
1 file changed, 36 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
|
||||
index c033395fe..387ce5dd3 100644
|
||||
--- a/src/compositor/meta-background.c
|
||||
+++ b/src/compositor/meta-background.c
|
||||
@@ -252,12 +252,11 @@ static void
|
||||
set_file (MetaBackground *self,
|
||||
GFile **filep,
|
||||
MetaBackgroundImage **imagep,
|
||||
- GFile *file)
|
||||
+ GFile *file,
|
||||
+ gboolean force_reload)
|
||||
{
|
||||
- if (!file_equal0 (*filep, file))
|
||||
+ if (force_reload || !file_equal0 (*filep, file))
|
||||
{
|
||||
- g_clear_object (filep);
|
||||
-
|
||||
if (*imagep)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (*imagep,
|
||||
@@ -267,11 +266,12 @@ set_file (MetaBackground *self,
|
||||
*imagep = NULL;
|
||||
}
|
||||
|
||||
+ g_set_object (filep, file);
|
||||
+
|
||||
if (file)
|
||||
{
|
||||
MetaBackgroundImageCache *cache = meta_background_image_cache_get_default ();
|
||||
|
||||
- *filep = g_object_ref (file);
|
||||
*imagep = meta_background_image_cache_load (cache, file);
|
||||
g_signal_connect (*imagep, "loaded",
|
||||
G_CALLBACK (on_background_loaded), self);
|
||||
@@ -279,6 +279,32 @@ set_file (MetaBackground *self,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+on_gl_video_memory_purged (MetaBackground *self)
|
||||
+{
|
||||
+ MetaBackgroundImageCache *cache = meta_background_image_cache_get_default ();
|
||||
+
|
||||
+ /* The GPU memory that just got invalidated is the texture inside
|
||||
+ * self->background_image1,2 and/or its mipmaps. However, to save memory the
|
||||
+ * original pixbuf isn't kept in RAM so we can't do a simple re-upload. The
|
||||
+ * only copy of the image was the one in texture memory that got invalidated.
|
||||
+ * So we need to do a full reload from disk.
|
||||
+ */
|
||||
+ if (self->file1)
|
||||
+ {
|
||||
+ meta_background_image_cache_purge (cache, self->file1);
|
||||
+ set_file (self, &self->file1, &self->background_image1, self->file1, TRUE);
|
||||
+ }
|
||||
+
|
||||
+ if (self->file2)
|
||||
+ {
|
||||
+ meta_background_image_cache_purge (cache, self->file2);
|
||||
+ set_file (self, &self->file2, &self->background_image2, self->file2, TRUE);
|
||||
+ }
|
||||
+
|
||||
+ mark_changed (self);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
meta_background_dispose (GObject *object)
|
||||
{
|
||||
@@ -287,8 +313,8 @@ meta_background_dispose (GObject *object)
|
||||
free_color_texture (self);
|
||||
free_wallpaper_texture (self);
|
||||
|
||||
- set_file (self, &self->file1, &self->background_image1, NULL);
|
||||
- set_file (self, &self->file2, &self->background_image2, NULL);
|
||||
+ set_file (self, &self->file1, &self->background_image1, NULL, FALSE);
|
||||
+ set_file (self, &self->file2, &self->background_image2, NULL, FALSE);
|
||||
|
||||
set_display (self, NULL);
|
||||
|
||||
@@ -312,7 +338,7 @@ meta_background_constructed (GObject *object)
|
||||
G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
|
||||
|
||||
g_signal_connect_object (self->display, "gl-video-memory-purged",
|
||||
- G_CALLBACK (mark_changed), object, G_CONNECT_SWAPPED);
|
||||
+ G_CALLBACK (on_gl_video_memory_purged), object, G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect_object (monitor_manager, "monitors-changed",
|
||||
G_CALLBACK (on_monitors_changed), self,
|
||||
@@ -937,8 +963,8 @@ meta_background_set_blend (MetaBackground *self,
|
||||
g_return_if_fail (META_IS_BACKGROUND (self));
|
||||
g_return_if_fail (blend_factor >= 0.0 && blend_factor <= 1.0);
|
||||
|
||||
- set_file (self, &self->file1, &self->background_image1, file1);
|
||||
- set_file (self, &self->file2, &self->background_image2, file2);
|
||||
+ set_file (self, &self->file1, &self->background_image1, file1, FALSE);
|
||||
+ set_file (self, &self->file2, &self->background_image2, file2, FALSE);
|
||||
|
||||
self->blend_factor = blend_factor;
|
||||
self->style = style;
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 4c1c3541efa37acf3a03822289a8ab8705cbbc4e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hergert <chergert@redhat.com>
|
||||
Date: Sun, 23 Feb 2020 17:27:08 -0800
|
||||
Subject: [PATCH 1/3] clutter: avoid redundant _clutter_paint_node_init_types()
|
||||
|
||||
This only needs to be initialized once but is in the hot path of creating
|
||||
new paint nodes (for which we create many). Instead, do this as part of
|
||||
the clutter_init() workflow to keep it out of the hot path.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1087
|
||||
---
|
||||
clutter/clutter/clutter-main.c | 4 ++++
|
||||
clutter/clutter/clutter-paint-node.c | 2 --
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
|
||||
index 71ec0d80c..645c8bceb 100644
|
||||
--- a/clutter/clutter/clutter-main.c
|
||||
+++ b/clutter/clutter/clutter-main.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-master-clock.h"
|
||||
#include "clutter-mutter.h"
|
||||
+#include "clutter-paint-node-private.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-settings-private.h"
|
||||
#include "clutter-stage-manager.h"
|
||||
@@ -1366,6 +1367,9 @@ clutter_init_real (GError **error)
|
||||
if (clutter_enable_accessibility)
|
||||
cally_accessibility_init ();
|
||||
|
||||
+ /* Initialize types required for paint nodes */
|
||||
+ _clutter_paint_node_init_types ();
|
||||
+
|
||||
return CLUTTER_INIT_SUCCESS;
|
||||
}
|
||||
|
||||
diff --git a/clutter/clutter/clutter-paint-node.c b/clutter/clutter/clutter-paint-node.c
|
||||
index e731ca60a..73765a4e9 100644
|
||||
--- a/clutter/clutter/clutter-paint-node.c
|
||||
+++ b/clutter/clutter/clutter-paint-node.c
|
||||
@@ -1177,8 +1177,6 @@ _clutter_paint_node_create (GType gtype)
|
||||
{
|
||||
g_return_val_if_fail (g_type_is_a (gtype, CLUTTER_TYPE_PAINT_NODE), NULL);
|
||||
|
||||
- _clutter_paint_node_init_types ();
|
||||
-
|
||||
return (gpointer) g_type_create_instance (gtype);
|
||||
}
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
@ -1,136 +0,0 @@
|
||||
From 78bb1fff1155462638b0d6037ccddf1328482842 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 11:01:38 -0500
|
||||
Subject: [PATCH 1/9] cogl: add new UNSTABLE_TEXTURES feature
|
||||
|
||||
The proprietary nvidia driver garbles texture memory on suspend.
|
||||
|
||||
Before we can address that, we need to be able to detect it.
|
||||
|
||||
This commit adds a new UNSTABLE_TEXTURES feature that gets set if
|
||||
the proprietary nvidia driver is in use.
|
||||
---
|
||||
cogl/cogl/cogl-context.h | 1 +
|
||||
cogl/cogl/cogl-types.h | 5 ++++-
|
||||
cogl/cogl/winsys/cogl-winsys-egl.c | 11 +++++++++++
|
||||
cogl/cogl/winsys/cogl-winsys-glx.c | 13 +++++++++++--
|
||||
4 files changed, 27 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/cogl/cogl/cogl-context.h b/cogl/cogl/cogl-context.h
|
||||
index d4104625e..a20c54549 100644
|
||||
--- a/cogl/cogl/cogl-context.h
|
||||
+++ b/cogl/cogl/cogl-context.h
|
||||
@@ -261,6 +261,7 @@ typedef enum _CoglFeatureID
|
||||
COGL_FEATURE_ID_TEXTURE_RG,
|
||||
COGL_FEATURE_ID_BUFFER_AGE,
|
||||
COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
||||
+ COGL_FEATURE_ID_UNSTABLE_TEXTURES,
|
||||
|
||||
/*< private >*/
|
||||
_COGL_N_FEATURE_IDS /*< skip >*/
|
||||
diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h
|
||||
index 690daa16a..5b980a43c 100644
|
||||
--- a/cogl/cogl/cogl-types.h
|
||||
+++ b/cogl/cogl/cogl-types.h
|
||||
@@ -354,6 +354,8 @@ typedef enum /*< prefix=COGL_PIXEL_FORMAT >*/
|
||||
* supported with CoglBufferAccess including write support.
|
||||
* @COGL_FEATURE_DEPTH_TEXTURE: Whether #CoglFramebuffer support rendering the
|
||||
* depth buffer to a texture.
|
||||
+ * @COGL_FEATURE_UNSTABLE_TEXTURES: Whether textures require redrawing on
|
||||
+ * resume or not.
|
||||
*
|
||||
* Flags for the supported features.
|
||||
*
|
||||
@@ -383,7 +385,8 @@ typedef enum
|
||||
COGL_FEATURE_MAP_BUFFER_FOR_READ = (1 << 21),
|
||||
COGL_FEATURE_MAP_BUFFER_FOR_WRITE = (1 << 22),
|
||||
COGL_FEATURE_ONSCREEN_MULTIPLE = (1 << 23),
|
||||
- COGL_FEATURE_DEPTH_TEXTURE = (1 << 24)
|
||||
+ COGL_FEATURE_DEPTH_TEXTURE = (1 << 24),
|
||||
+ COGL_FEATURE_UNSTABLE_TEXTURES = (1 << 25)
|
||||
} CoglFeatureFlags;
|
||||
|
||||
/**
|
||||
diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c
|
||||
index 903c6492d..dd450d4f3 100644
|
||||
--- a/cogl/cogl/winsys/cogl-winsys-egl.c
|
||||
+++ b/cogl/cogl/winsys/cogl-winsys-egl.c
|
||||
@@ -499,6 +499,7 @@ _cogl_winsys_context_init (CoglContext *context, CoglError **error)
|
||||
CoglRenderer *renderer = context->display->renderer;
|
||||
CoglDisplayEGL *egl_display = context->display->winsys;
|
||||
CoglRendererEGL *egl_renderer = renderer->winsys;
|
||||
+ CoglGpuInfo *info;
|
||||
|
||||
context->winsys = g_new0 (CoglContextEGL, 1);
|
||||
|
||||
@@ -511,6 +512,16 @@ _cogl_winsys_context_init (CoglContext *context, CoglError **error)
|
||||
if (!_cogl_context_update_features (context, error))
|
||||
return FALSE;
|
||||
|
||||
+ info = &context->gpu;
|
||||
+
|
||||
+ if (info->vendor == COGL_GPU_INFO_VENDOR_NVIDIA)
|
||||
+ {
|
||||
+ context->feature_flags |= COGL_FEATURE_UNSTABLE_TEXTURES;
|
||||
+ COGL_FLAGS_SET (context->features,
|
||||
+ COGL_FEATURE_ID_UNSTABLE_TEXTURES,
|
||||
+ TRUE);
|
||||
+ }
|
||||
+
|
||||
if (egl_renderer->private_features & COGL_EGL_WINSYS_FEATURE_SWAP_REGION)
|
||||
{
|
||||
COGL_FLAGS_SET (context->winsys_features,
|
||||
diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c
|
||||
index 235cfe81f..7e87dc15f 100644
|
||||
--- a/cogl/cogl/winsys/cogl-winsys-glx.c
|
||||
+++ b/cogl/cogl/winsys/cogl-winsys-glx.c
|
||||
@@ -830,12 +830,15 @@ update_winsys_features (CoglContext *context, CoglError **error)
|
||||
{
|
||||
CoglGLXDisplay *glx_display = context->display->winsys;
|
||||
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
|
||||
+ CoglGpuInfo *info;
|
||||
|
||||
_COGL_RETURN_VAL_IF_FAIL (glx_display->glx_context, FALSE);
|
||||
|
||||
if (!_cogl_context_update_features (context, error))
|
||||
return FALSE;
|
||||
|
||||
+ info = &context->gpu;
|
||||
+
|
||||
memcpy (context->winsys_features,
|
||||
glx_renderer->base_winsys_features,
|
||||
sizeof (context->winsys_features));
|
||||
@@ -848,7 +851,6 @@ update_winsys_features (CoglContext *context, CoglError **error)
|
||||
|
||||
if (glx_renderer->glXCopySubBuffer || context->glBlitFramebuffer)
|
||||
{
|
||||
- CoglGpuInfo *info = &context->gpu;
|
||||
CoglGpuInfoArchitecture arch = info->architecture;
|
||||
|
||||
COGL_FLAGS_SET (context->winsys_features, COGL_WINSYS_FEATURE_SWAP_REGION, TRUE);
|
||||
@@ -897,7 +899,6 @@ update_winsys_features (CoglContext *context, CoglError **error)
|
||||
}
|
||||
else
|
||||
{
|
||||
- CoglGpuInfo *info = &context->gpu;
|
||||
if (glx_display->have_vblank_counter &&
|
||||
context->display->renderer->xlib_enable_threaded_swap_wait &&
|
||||
info->vendor == COGL_GPU_INFO_VENDOR_NVIDIA)
|
||||
@@ -919,6 +920,14 @@ update_winsys_features (CoglContext *context, CoglError **error)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (info->vendor == COGL_GPU_INFO_VENDOR_NVIDIA)
|
||||
+ {
|
||||
+ context->feature_flags |= COGL_FEATURE_UNSTABLE_TEXTURES;
|
||||
+ COGL_FLAGS_SET (context->features,
|
||||
+ COGL_FEATURE_ID_UNSTABLE_TEXTURES,
|
||||
+ TRUE);
|
||||
+ }
|
||||
+
|
||||
/* We'll manually handle queueing dirty events in response to
|
||||
* Expose events from X */
|
||||
COGL_FLAGS_SET (context->private_features,
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,73 @@
|
||||
From bac090f571e6f413ba2a362ed2d70146b7701d16 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 24 Feb 2020 17:37:34 +0100
|
||||
Subject: [PATCH] crtc-xrandr: Respect configured RANDR panning
|
||||
|
||||
A user may have configured an output to be panning, e.g. using xrandr
|
||||
--output <output> --mode <mode> --panning <size>. Respect this by making
|
||||
the logical monitor use the panning size, instead of the mode. This
|
||||
makes e.g. makes the background cover the whole panning size, and panels
|
||||
etc will cover the whole top of the panned area, instead of just the top
|
||||
left part covering the monitor if having panned to (0, 0).
|
||||
|
||||
No support is added to configuring panning, i.e. a panned monitor
|
||||
configuration cannot be stored in monitors.xml.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1085
|
||||
---
|
||||
src/backends/x11/meta-crtc-xrandr.c | 31 +++++++++++++++++++++++++----
|
||||
1 file changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/backends/x11/meta-crtc-xrandr.c b/src/backends/x11/meta-crtc-xrandr.c
|
||||
index d201b8581..dc3f931e3 100644
|
||||
--- a/src/backends/x11/meta-crtc-xrandr.c
|
||||
+++ b/src/backends/x11/meta-crtc-xrandr.c
|
||||
@@ -177,7 +177,14 @@ meta_create_xrandr_crtc (MetaGpuXrandr *gpu_xrandr,
|
||||
RRCrtc crtc_id,
|
||||
XRRScreenResources *resources)
|
||||
{
|
||||
+ MetaGpu *gpu = META_GPU (gpu_xrandr);
|
||||
+ MetaMonitorManager *monitor_manager = meta_gpu_get_monitor_manager (gpu);
|
||||
+ MetaMonitorManagerXrandr *monitor_manager_xrandr =
|
||||
+ META_MONITOR_MANAGER_XRANDR (monitor_manager);
|
||||
+ Display *xdisplay =
|
||||
+ meta_monitor_manager_xrandr_get_xdisplay (monitor_manager_xrandr);
|
||||
MetaCrtc *crtc;
|
||||
+ XRRPanning *panning;
|
||||
unsigned int i;
|
||||
GList *modes;
|
||||
|
||||
@@ -185,10 +192,26 @@ meta_create_xrandr_crtc (MetaGpuXrandr *gpu_xrandr,
|
||||
|
||||
crtc->gpu = META_GPU (gpu_xrandr);
|
||||
crtc->crtc_id = crtc_id;
|
||||
- crtc->rect.x = xrandr_crtc->x;
|
||||
- crtc->rect.y = xrandr_crtc->y;
|
||||
- crtc->rect.width = xrandr_crtc->width;
|
||||
- crtc->rect.height = xrandr_crtc->height;
|
||||
+
|
||||
+ panning = XRRGetPanning (xdisplay, resources, crtc_id);
|
||||
+ if (panning && panning->width > 0 && panning->height > 0)
|
||||
+ {
|
||||
+ crtc->rect = (MetaRectangle) {
|
||||
+ .x = panning->left,
|
||||
+ .y = panning->top,
|
||||
+ .width = panning->width,
|
||||
+ .height = panning->height,
|
||||
+ };
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ crtc->rect = (MetaRectangle) {
|
||||
+ .x = xrandr_crtc->x,
|
||||
+ .y = xrandr_crtc->y,
|
||||
+ .width = xrandr_crtc->width,
|
||||
+ .height = xrandr_crtc->height,
|
||||
+ };
|
||||
+ }
|
||||
crtc->is_dirty = FALSE;
|
||||
crtc->transform =
|
||||
meta_monitor_transform_from_xrandr (xrandr_crtc->rotation);
|
||||
--
|
||||
2.24.1
|
||||
|
@ -0,0 +1,108 @@
|
||||
From d107b52939ca0acb1f8dacf1275278edba64eebe Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Tue, 1 Oct 2019 11:53:57 +0200
|
||||
Subject: [PATCH] renderer: Add API to check whether renderer is hardware
|
||||
accelerated
|
||||
|
||||
Also expose an introspected variant via the MetaBackend.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
|
||||
---
|
||||
src/backends/meta-backend.c | 15 +++++++++++++++
|
||||
src/backends/meta-renderer.c | 27 +++++++++++++++++++++++++++
|
||||
src/backends/meta-renderer.h | 2 ++
|
||||
src/meta/meta-backend.h | 3 +++
|
||||
4 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
|
||||
index 72cfbdaf3..e61181f9a 100644
|
||||
--- a/src/backends/meta-backend.c
|
||||
+++ b/src/backends/meta-backend.c
|
||||
@@ -985,6 +985,21 @@ meta_backend_get_remote_access_controller (MetaBackend *backend)
|
||||
#endif
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * meta_backend_is_rendering_hardware_accelerated:
|
||||
+ * @backend: A #MetaBackend
|
||||
+ *
|
||||
+ * Returns: %TRUE if the rendering is hardware accelerated, otherwise
|
||||
+ * %FALSE.
|
||||
+ */
|
||||
+gboolean
|
||||
+meta_backend_is_rendering_hardware_accelerated (MetaBackend *backend)
|
||||
+{
|
||||
+ MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
+
|
||||
+ return meta_renderer_is_hardware_accelerated (renderer);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* meta_backend_grab_device: (skip)
|
||||
*/
|
||||
diff --git a/src/backends/meta-renderer.c b/src/backends/meta-renderer.c
|
||||
index 87ba9f9f0..470220fc8 100644
|
||||
--- a/src/backends/meta-renderer.c
|
||||
+++ b/src/backends/meta-renderer.c
|
||||
@@ -166,6 +166,33 @@ meta_renderer_get_view_from_logical_monitor (MetaRenderer *renderer,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+gboolean
|
||||
+meta_renderer_is_hardware_accelerated (MetaRenderer *renderer)
|
||||
+{
|
||||
+ MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
|
||||
+ MetaBackend *backend = meta_get_backend ();
|
||||
+ ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||
+ CoglContext *cogl_context =
|
||||
+ clutter_backend_get_cogl_context (clutter_backend);
|
||||
+ CoglGpuInfo *info = &cogl_context->gpu;
|
||||
+
|
||||
+ switch (info->architecture)
|
||||
+ {
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_UNKNOWN:
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_SANDYBRIDGE:
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_SGX:
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_MALI:
|
||||
+ return TRUE;
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE:
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE:
|
||||
+ case COGL_GPU_INFO_ARCHITECTURE_SWRAST:
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ g_assert_not_reached ();
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
meta_renderer_finalize (GObject *object)
|
||||
{
|
||||
diff --git a/src/backends/meta-renderer.h b/src/backends/meta-renderer.h
|
||||
index 478baee91..97bf36860 100644
|
||||
--- a/src/backends/meta-renderer.h
|
||||
+++ b/src/backends/meta-renderer.h
|
||||
@@ -59,4 +59,6 @@ GList * meta_renderer_get_views (MetaRenderer *renderer);
|
||||
MetaRendererView * meta_renderer_get_view_from_logical_monitor (MetaRenderer *renderer,
|
||||
MetaLogicalMonitor *logical_monitor);
|
||||
|
||||
+gboolean meta_renderer_is_hardware_accelerated (MetaRenderer *renderer);
|
||||
+
|
||||
#endif /* META_RENDERER_H */
|
||||
diff --git a/src/meta/meta-backend.h b/src/meta/meta-backend.h
|
||||
index aaa6aae97..8edc0bf2c 100644
|
||||
--- a/src/meta/meta-backend.h
|
||||
+++ b/src/meta/meta-backend.h
|
||||
@@ -64,6 +64,9 @@ MetaSettings *meta_backend_get_settings (MetaBackend *backend);
|
||||
META_EXPORT
|
||||
MetaRemoteAccessController * meta_backend_get_remote_access_controller (MetaBackend *backend);
|
||||
|
||||
+META_EXPORT
|
||||
+gboolean meta_backend_is_rendering_hardware_accelerated (MetaBackend *backend);
|
||||
+
|
||||
META_EXPORT
|
||||
void meta_clutter_init (void);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,40 @@
|
||||
From b32ae04c122f4f76ffad296c15ba00a13800db57 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Tue, 2 Jun 2020 16:33:05 +0000
|
||||
Subject: [PATCH 1/2] screen-cast-src: Destroy hash dmabuf table after stream
|
||||
|
||||
The stream will clean up the buffers, so let it do that before we
|
||||
destroy them under its feet. Note that it'll only do this after the
|
||||
following PipeWire commit:
|
||||
|
||||
commit fbaa4ddedd84afdffca16f090dcc4b0db8ccfc29
|
||||
Author: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Mon Jun 1 15:36:09 2020 +0200
|
||||
|
||||
stream: allow NULL param and 0 buffers in disconnect
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1283
|
||||
|
||||
|
||||
(cherry picked from commit 97175f8fa14171606ecb95d0bf107ef8b2d71b74)
|
||||
---
|
||||
src/backends/meta-screen-cast-stream-src.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
|
||||
index 0500bfec5..ff4af440c 100644
|
||||
--- a/src/backends/meta-screen-cast-stream-src.c
|
||||
+++ b/src/backends/meta-screen-cast-stream-src.c
|
||||
@@ -988,8 +988,8 @@ meta_screen_cast_stream_src_finalize (GObject *object)
|
||||
if (meta_screen_cast_stream_src_is_enabled (src))
|
||||
meta_screen_cast_stream_src_disable (src);
|
||||
|
||||
- g_clear_pointer (&priv->dmabuf_handles, g_hash_table_destroy);
|
||||
g_clear_pointer (&priv->pipewire_stream, pw_stream_destroy);
|
||||
+ g_clear_pointer (&priv->dmabuf_handles, g_hash_table_destroy);
|
||||
g_clear_pointer (&priv->pipewire_core, pw_core_disconnect);
|
||||
g_clear_pointer (&priv->pipewire_context, pw_context_destroy);
|
||||
g_source_destroy (&priv->pipewire_source->base);
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,101 @@
|
||||
From 639b7ba7f2729a95593c0b85d4789f76152e6099 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Thu, 18 Jun 2020 21:17:29 +0200
|
||||
Subject: [PATCH] stage/x11: Check that message is WM_PROTOCOLS before assuming
|
||||
so
|
||||
|
||||
When a touch sequence was rejected, we'd update the event timestamps of
|
||||
incoming touch events to help with implementing grabs. This was done by
|
||||
sending a ClientMessage with a counter, and comparing the counter to
|
||||
decide whether we're seing a replayed event or not.
|
||||
|
||||
This had the unforseen consequence that we would potentially end up
|
||||
destroying all actors including the stage, since, when mutter receives a
|
||||
ClientMessage event, it would assume that it's a WM_PROTOCOLS event, and
|
||||
handle it as such. The problem with this approach is that it would
|
||||
ignore fact that there might be other ClientMessage types sent to it,
|
||||
for example the touch synchronization one. What could happen is that the
|
||||
touch count value would match up with the value of the WM_DELETE_WINDOW
|
||||
atom, clutter would treat this as WM_PROTOCOLS:WM_DELETE_WINDOW, which
|
||||
it'd translate to clutter_actor_destroy(stage).
|
||||
|
||||
Destroying the stage in such a way is not expected, and caused wierd
|
||||
crashes in different places depending on what was going on.
|
||||
|
||||
This commit make sure we only treat WM_PROTOCOLS client messages as
|
||||
WM_PROTOCOLS client messages effectively avoiding the issue.
|
||||
|
||||
This fixes crashes such as:
|
||||
|
||||
#0 meta_window_get_buffer_rect (window=0x0, rect=rect@entry=0x7ffd7fc62e40) at core/window.c:4396
|
||||
#1 0x00007f1e2634837f in get_top_visible_window_actor (compositor=0x297d700, compositor=0x297d700) at compositor/compositor.c:1059
|
||||
#2 meta_compositor_sync_stack (compositor=0x297d700, stack=<optimized out>, stack@entry=0x26e3140) at compositor/compositor.c:1176
|
||||
#3 0x00007f1e263757ac in meta_stack_tracker_sync_stack (tracker=0x297dbc0) at core/stack-tracker.c:871
|
||||
#4 0x00007f1e26375899 in stack_tracker_sync_stack_later (data=<optimized out>) at core/stack-tracker.c:881
|
||||
#5 0x00007f1e26376914 in run_repaint_laters (laters_list=0x7f1e2663b7d8 <laters+24>) at core/util.c:809
|
||||
#6 run_all_repaint_laters (data=<optimized out>) at core/util.c:826
|
||||
#7 0x00007f1e26b18325 in _clutter_run_repaint_functions (flags=flags@entry=CLUTTER_REPAINT_FLAGS_PRE_PAINT) at clutter-main.c:3448
|
||||
#8 0x00007f1e26b18fc5 in master_clock_update_stages (master_clock=0x32d6a80, stages=0x4e5a740) at clutter-master-clock-default.c:437
|
||||
#9 clutter_clock_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at clutter-master-clock-default.c:567
|
||||
#10 0x00007f1e27e48049 in g_main_dispatch (context=0x225b8d0) at gmain.c:3175
|
||||
#11 g_main_context_dispatch (context=context@entry=0x225b8d0) at gmain.c:3828
|
||||
#12 0x00007f1e27e483a8 in g_main_context_iterate (context=0x225b8d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3901
|
||||
#13 0x00007f1e27e4867a in g_main_loop_run (loop=0x24e29f0) at gmain.c:4097
|
||||
#14 0x00007f1e2636a3dc in meta_run () at core/main.c:666
|
||||
#15 0x000000000040219c in main (argc=1, argv=0x7ffd7fc63238) at ../src/main.c:534
|
||||
|
||||
and
|
||||
|
||||
#0 0x00007f93943c1f25 in raise () at /usr/lib/libc.so.6
|
||||
#1 0x00007f93943ab897 in abort () at /usr/lib/libc.so.6
|
||||
#2 0x00007f9393e1e062 in g_assertion_message (domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=0x7f93933e6860 <__func__.116322> "meta_x11_get_stage_window",
|
||||
#3 0x00007f9393e4ab1d in g_assertion_message_expr ()
|
||||
#4 0x00007f939338ecd7 in meta_x11_get_stage_window (stage=<optimized out>) at ../mutter/src/backends/x11/meta-stage-x11.c:923
|
||||
#5 0x00007f939339e599 in meta_backend_x11_cm_translate_device_event (x11=<optimized out>, device_event=0x55bc8bcfd6b0) at ../mutter/src/backends/x11/cm/meta-backend-x11-cm.c:381
|
||||
#6 0x00007f939339f2e2 in meta_backend_x11_translate_device_event (device_event=0x55bc8bcfd6b0, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:179
|
||||
#7 0x00007f939339f2e2 in translate_device_event (device_event=0x55bc8bcfd6b0, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:208
|
||||
#8 0x00007f939339f2e2 in maybe_spoof_event_as_stage_event (input_event=0x55bc8bcfd6b0, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:284
|
||||
#9 0x00007f939339f2e2 in handle_input_event (event=0x7fff62d60490, x11=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:309
|
||||
#10 0x00007f939339f2e2 in handle_host_xevent (event=0x7fff62d60490, backend=0x55bc89dd5220) at ../mutter/src/backends/x11/meta-backend-x11.c:413
|
||||
#11 0x00007f939339f2e2 in x_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../mutter/src/backends/x11/meta-backend-x11.c:467
|
||||
#12 0x00007f9393e6c39e in g_main_dispatch (context=0x55bc89dd03e0) at ../glib/glib/gmain.c:3179
|
||||
#13 0x00007f9393e6c39e in g_main_context_dispatch (context=context@entry=0x55bc89dd03e0) at ../glib/glib/gmain.c:3844
|
||||
#14 0x00007f9393e6e1b1 in g_main_context_iterate (context=0x55bc89dd03e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:3917
|
||||
#15 0x00007f9393e6f0c3 in g_main_loop_run (loop=0x55bc8a042640) at ../glib/glib/gmain.c:4111
|
||||
#16 0x00007f9393369a0c in meta_run () at ../mutter/src/core/main.c:676
|
||||
#17 0x000055bc880f2426 in main (argc=<optimized out>, argv=<optimized out>) at ../gnome-shell/src/main.c:552
|
||||
|
||||
Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/338
|
||||
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/951
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1317
|
||||
---
|
||||
clutter/clutter/x11/clutter-stage-x11.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/clutter/clutter/x11/clutter-stage-x11.c b/clutter/clutter/x11/clutter-stage-x11.c
|
||||
index d043bcf31d..123078fc22 100644
|
||||
--- a/clutter/clutter/x11/clutter-stage-x11.c
|
||||
+++ b/clutter/clutter/x11/clutter-stage-x11.c
|
||||
@@ -1306,11 +1306,14 @@ clutter_stage_x11_translate_event (ClutterEventTranslator *translator,
|
||||
_clutter_actor_get_debug_name (CLUTTER_ACTOR (stage)),
|
||||
stage,
|
||||
(unsigned int) stage_xwindow);
|
||||
- if (handle_wm_protocols_event (backend_x11, stage_x11, xevent))
|
||||
+ if (xevent->xclient.message_type == backend_x11->atom_WM_PROTOCOLS)
|
||||
{
|
||||
- event->any.type = CLUTTER_DELETE;
|
||||
- event->any.stage = stage;
|
||||
- res = CLUTTER_TRANSLATE_QUEUE;
|
||||
+ if (handle_wm_protocols_event (backend_x11, stage_x11, xevent))
|
||||
+ {
|
||||
+ event->any.type = CLUTTER_DELETE;
|
||||
+ event->any.stage = stage;
|
||||
+ res = CLUTTER_TRANSLATE_QUEUE;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 24ddf60768412fd3f5f7b432449b9ed2ea0d18b3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Tue, 18 Feb 2020 23:01:28 +0100
|
||||
Subject: [PATCH] window-actor: Don't show actor until meta_window_actor_show()
|
||||
|
||||
By default clutter will show an actor as it is added to a parent. This
|
||||
means that after we create the window actor, when it's added to the
|
||||
window group, we implicitly show it. What we really want is to not show
|
||||
it until the window is supposed to be shown, which happens when
|
||||
meta_window_actor_show() is called, as showing prior to that, could
|
||||
cause issues.
|
||||
|
||||
Avoid the implicit show by setting the "show-on-set-parent" property on
|
||||
the window actor to `FALSE` on window actor construction.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1066
|
||||
---
|
||||
src/compositor/compositor.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
|
||||
index a6ae55abb9..ce2c1b8a3b 100644
|
||||
--- a/src/compositor/compositor.c
|
||||
+++ b/src/compositor/compositor.c
|
||||
@@ -810,6 +810,7 @@ meta_compositor_add_window (MetaCompositor *compositor,
|
||||
|
||||
window_actor = g_object_new (window_actor_type,
|
||||
"meta-window", window,
|
||||
+ "show-on-set-parent", FALSE,
|
||||
NULL);
|
||||
|
||||
if (window->layer == META_LAYER_OVERRIDE_REDIRECT)
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,163 +0,0 @@
|
||||
From 063db6c9a7504a4d7baae28f7899bd661c459c41 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Mon, 14 Jan 2019 11:11:01 -0500
|
||||
Subject: [PATCH 2/9] backend: switch to using generated logind proxy
|
||||
|
||||
Right now we listen to prepare-for-sleep using
|
||||
raw gdbus calls.
|
||||
|
||||
This commit switches it over to use a generated
|
||||
proxy, which will become useful in a future commit,
|
||||
for adding suspending inhibitors.
|
||||
---
|
||||
src/backends/meta-backend.c | 60 ++++++++++++++++++++++------------
|
||||
src/org.freedesktop.login1.xml | 13 ++++++++
|
||||
2 files changed, 52 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
|
||||
index 23ab2faec..5d71977c6 100644
|
||||
--- a/src/backends/meta-backend.c
|
||||
+++ b/src/backends/meta-backend.c
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "meta/main.h"
|
||||
#include "meta/meta-backend.h"
|
||||
#include "meta/util.h"
|
||||
+#include "meta-dbus-login1.h"
|
||||
|
||||
#ifdef HAVE_REMOTE_DESKTOP
|
||||
#include "backends/meta-dbus-session-watcher.h"
|
||||
@@ -145,10 +146,12 @@ struct _MetaBackendPrivate
|
||||
GDBusProxy *upower_proxy;
|
||||
gboolean lid_is_closed;
|
||||
|
||||
- guint sleep_signal_id;
|
||||
GCancellable *cancellable;
|
||||
GDBusConnection *system_bus;
|
||||
|
||||
+ Login1Manager *logind_proxy;
|
||||
+ int inhibit_sleep_fd;
|
||||
+
|
||||
gboolean was_headless;
|
||||
};
|
||||
typedef struct _MetaBackendPrivate MetaBackendPrivate;
|
||||
@@ -156,6 +159,10 @@ typedef struct _MetaBackendPrivate MetaBackendPrivate;
|
||||
static void
|
||||
initable_iface_init (GInitableIface *initable_iface);
|
||||
|
||||
+
|
||||
+static void prepare_for_sleep_cb (MetaBackend *backend,
|
||||
+ gboolean suspending);
|
||||
+
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (MetaBackend, meta_backend, G_TYPE_OBJECT,
|
||||
G_ADD_PRIVATE (MetaBackend)
|
||||
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
|
||||
@@ -177,8 +184,6 @@ meta_backend_finalize (GObject *object)
|
||||
g_clear_object (&priv->remote_access_controller);
|
||||
#endif
|
||||
|
||||
- if (priv->sleep_signal_id)
|
||||
- g_dbus_connection_signal_unsubscribe (priv->system_bus, priv->sleep_signal_id);
|
||||
if (priv->upower_watch_id)
|
||||
g_bus_unwatch_name (priv->upower_watch_id);
|
||||
g_cancellable_cancel (priv->cancellable);
|
||||
@@ -764,13 +769,8 @@ meta_backend_create_renderer (MetaBackend *backend,
|
||||
}
|
||||
|
||||
static void
|
||||
-prepare_for_sleep_cb (GDBusConnection *connection,
|
||||
- const gchar *sender_name,
|
||||
- const gchar *object_path,
|
||||
- const gchar *interface_name,
|
||||
- const gchar *signal_name,
|
||||
- GVariant *parameters,
|
||||
- gpointer user_data)
|
||||
+prepare_for_sleep_cb (MetaBackend *backend,
|
||||
+ gboolean suspending)
|
||||
{
|
||||
gboolean suspending;
|
||||
|
||||
@@ -780,12 +780,31 @@ prepare_for_sleep_cb (GDBusConnection *connection,
|
||||
meta_idle_monitor_reset_idletime (meta_idle_monitor_get_core ());
|
||||
}
|
||||
|
||||
+static Login1Manager *
|
||||
+get_logind_proxy (GCancellable *cancellable,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ Login1Manager *proxy;
|
||||
+
|
||||
+ proxy =
|
||||
+ login1_manager_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||
+ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||
+ "org.freedesktop.login1",
|
||||
+ "/org/freedesktop/login1",
|
||||
+ cancellable, error);
|
||||
+ if (!proxy)
|
||||
+ g_prefix_error (error, "Could not get logind proxy: ");
|
||||
+
|
||||
+ return proxy;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
system_bus_gotten_cb (GObject *object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaBackendPrivate *priv;
|
||||
+ g_autoptr (GError) error = NULL;
|
||||
GDBusConnection *bus;
|
||||
|
||||
bus = g_bus_get_finish (res, NULL);
|
||||
@@ -794,17 +813,16 @@ system_bus_gotten_cb (GObject *object,
|
||||
|
||||
priv = meta_backend_get_instance_private (user_data);
|
||||
priv->system_bus = bus;
|
||||
- priv->sleep_signal_id =
|
||||
- g_dbus_connection_signal_subscribe (priv->system_bus,
|
||||
- "org.freedesktop.login1",
|
||||
- "org.freedesktop.login1.Manager",
|
||||
- "PrepareForSleep",
|
||||
- "/org/freedesktop/login1",
|
||||
- NULL,
|
||||
- G_DBUS_SIGNAL_FLAGS_NONE,
|
||||
- prepare_for_sleep_cb,
|
||||
- NULL,
|
||||
- NULL);
|
||||
+ priv->logind_proxy = get_logind_proxy (priv->cancellable, &error);
|
||||
+
|
||||
+ if (!priv->logind_proxy)
|
||||
+ g_warning ("Failed to get logind proxy: %s", error->message);
|
||||
+
|
||||
+ g_signal_connect_object (priv->logind_proxy,
|
||||
+ "prepare-for-sleep",
|
||||
+ G_CALLBACK (prepare_for_sleep_cb),
|
||||
+ user_data,
|
||||
+ G_CONNECT_SWAPPED);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
diff --git a/src/org.freedesktop.login1.xml b/src/org.freedesktop.login1.xml
|
||||
index 765475132..1ecfd976f 100644
|
||||
--- a/src/org.freedesktop.login1.xml
|
||||
+++ b/src/org.freedesktop.login1.xml
|
||||
@@ -43,4 +43,17 @@
|
||||
<arg name="vt" type="u"/>
|
||||
</method>
|
||||
</interface>
|
||||
+
|
||||
+ <interface name="org.freedesktop.login1.Manager">
|
||||
+ <method name="Inhibit">
|
||||
+ <arg name="what" type="s" direction="in"/>
|
||||
+ <arg name="who" type="s" direction="in"/>
|
||||
+ <arg name="why" type="s" direction="in"/>
|
||||
+ <arg name="mode" type="s" direction="in"/>
|
||||
+ <arg name="fd" type="h" direction="out"/>
|
||||
+ </method>
|
||||
+ <signal name="PrepareForSleep">
|
||||
+ <arg name="active" type="b"/>
|
||||
+ </signal>
|
||||
+ </interface>
|
||||
</node>
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,192 @@
|
||||
From 6881aa5ca235ee0737c2a409ffab966a10e5971e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hergert <christian@hergert.me>
|
||||
Date: Mon, 24 Feb 2020 22:36:27 +0000
|
||||
Subject: [PATCH 2/3] clutter: avoid g_signal_emit_by_name() from ClutterActor
|
||||
|
||||
g_signal_emit_by_name() is used to emit signals on ClutterContainer when
|
||||
actors are removed or added. It happens to do various interface lookups
|
||||
which are a bit unneccessary and can allocate memory.
|
||||
|
||||
Simply using emission wrappers makes all of that go away.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1083
|
||||
---
|
||||
clutter/clutter/cally/cally-actor.c | 5 +--
|
||||
clutter/clutter/clutter-actor.c | 17 ++++++++--
|
||||
clutter/clutter/clutter-actor.h | 5 ++-
|
||||
clutter/clutter/clutter-container-private.h | 36 +++++++++++++++++++++
|
||||
clutter/clutter/clutter-container.c | 21 ++++++++++++
|
||||
5 files changed, 78 insertions(+), 6 deletions(-)
|
||||
create mode 100644 clutter/clutter/clutter-container-private.h
|
||||
|
||||
diff --git a/clutter/clutter/cally/cally-actor.c b/clutter/clutter/cally/cally-actor.c
|
||||
index 548615f48..517969625 100644
|
||||
--- a/clutter/clutter/cally/cally-actor.c
|
||||
+++ b/clutter/clutter/cally/cally-actor.c
|
||||
@@ -604,10 +604,11 @@ cally_actor_real_remove_actor (ClutterActor *container,
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), 0);
|
||||
|
||||
atk_parent = ATK_OBJECT (data);
|
||||
- atk_child = clutter_actor_get_accessible (actor);
|
||||
|
||||
- if (atk_child)
|
||||
+ if (clutter_actor_has_accessible (actor))
|
||||
{
|
||||
+ atk_child = clutter_actor_get_accessible (actor);
|
||||
+
|
||||
g_value_init (&values.old_value, G_TYPE_POINTER);
|
||||
g_value_set_pointer (&values.old_value, atk_parent);
|
||||
|
||||
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
|
||||
index 803f76aae..93d0a93ef 100644
|
||||
--- a/clutter/clutter/clutter-actor.c
|
||||
+++ b/clutter/clutter/clutter-actor.c
|
||||
@@ -624,7 +624,7 @@
|
||||
#include "clutter-color-static.h"
|
||||
#include "clutter-color.h"
|
||||
#include "clutter-constraint-private.h"
|
||||
-#include "clutter-container.h"
|
||||
+#include "clutter-container-private.h"
|
||||
#include "clutter-content-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-easing.h"
|
||||
@@ -4372,7 +4372,7 @@ clutter_actor_remove_child_internal (ClutterActor *self,
|
||||
|
||||
/* we need to emit the signal before dropping the reference */
|
||||
if (emit_actor_removed)
|
||||
- g_signal_emit_by_name (self, "actor-removed", child);
|
||||
+ _clutter_container_emit_actor_removed (CLUTTER_CONTAINER (self), child);
|
||||
|
||||
if (notify_first_last)
|
||||
{
|
||||
@@ -13060,7 +13060,7 @@ clutter_actor_add_child_internal (ClutterActor *self,
|
||||
}
|
||||
|
||||
if (emit_actor_added)
|
||||
- g_signal_emit_by_name (self, "actor-added", child);
|
||||
+ _clutter_container_emit_actor_added (CLUTTER_CONTAINER (self), child);
|
||||
|
||||
if (notify_first_last)
|
||||
{
|
||||
@@ -21448,3 +21448,14 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
|
||||
|
||||
return node;
|
||||
}
|
||||
+
|
||||
+gboolean
|
||||
+clutter_actor_has_accessible (ClutterActor *actor)
|
||||
+{
|
||||
+ g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE);
|
||||
+
|
||||
+ if (CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible)
|
||||
+ return CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible (actor);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h
|
||||
index 7d2168af1..d286f2843 100644
|
||||
--- a/clutter/clutter/clutter-actor.h
|
||||
+++ b/clutter/clutter/clutter-actor.h
|
||||
@@ -296,10 +296,11 @@ struct _ClutterActorClass
|
||||
|
||||
gboolean (* touch_event) (ClutterActor *self,
|
||||
ClutterTouchEvent *event);
|
||||
+ gboolean (* has_accessible) (ClutterActor *self);
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
- gpointer _padding_dummy[26];
|
||||
+ gpointer _padding_dummy[25];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -369,6 +370,8 @@ CLUTTER_EXPORT
|
||||
const gchar * clutter_actor_get_name (ClutterActor *self);
|
||||
CLUTTER_EXPORT
|
||||
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
|
||||
+CLUTTER_EXPORT
|
||||
+gboolean clutter_actor_has_accessible (ClutterActor *self);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_is_visible (ClutterActor *self);
|
||||
diff --git a/clutter/clutter/clutter-container-private.h b/clutter/clutter/clutter-container-private.h
|
||||
new file mode 100644
|
||||
index 000000000..d619a6531
|
||||
--- /dev/null
|
||||
+++ b/clutter/clutter/clutter-container-private.h
|
||||
@@ -0,0 +1,36 @@
|
||||
+/*
|
||||
+ * Clutter.
|
||||
+ *
|
||||
+ * An OpenGL based 'interactive canvas' library.
|
||||
+ *
|
||||
+ * Copyright 2020 Red Hat, Inc.
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __CLUTTER_CONTAINER_PRIVATE_H__
|
||||
+#define __CLUTTER_CONTAINER_PRIVATE_H__
|
||||
+
|
||||
+#include <clutter/clutter-container.h>
|
||||
+
|
||||
+G_BEGIN_DECLS
|
||||
+
|
||||
+void _clutter_container_emit_actor_added (ClutterContainer *container,
|
||||
+ ClutterActor *actor);
|
||||
+void _clutter_container_emit_actor_removed (ClutterContainer *container,
|
||||
+ ClutterActor *actor);
|
||||
+
|
||||
+G_END_DECLS
|
||||
+
|
||||
+#endif /* __CLUTTER_CONTAINER_PRIVATE_H__ */
|
||||
diff --git a/clutter/clutter/clutter-container.c b/clutter/clutter/clutter-container.c
|
||||
index 0f611ae55..79abb5b4f 100644
|
||||
--- a/clutter/clutter/clutter-container.c
|
||||
+++ b/clutter/clutter/clutter-container.c
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "clutter-actor-private.h"
|
||||
#include "clutter-child-meta.h"
|
||||
+#include "clutter-container-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-marshal.h"
|
||||
@@ -1446,3 +1447,23 @@ clutter_container_child_notify (ClutterContainer *container,
|
||||
child,
|
||||
pspec);
|
||||
}
|
||||
+
|
||||
+void
|
||||
+_clutter_container_emit_actor_added (ClutterContainer *container,
|
||||
+ ClutterActor *actor)
|
||||
+{
|
||||
+ g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||
+ g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
||||
+
|
||||
+ g_signal_emit (container, container_signals[ACTOR_ADDED], 0, actor);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+_clutter_container_emit_actor_removed (ClutterContainer *container,
|
||||
+ ClutterActor *actor)
|
||||
+{
|
||||
+ g_return_if_fail (CLUTTER_IS_CONTAINER (container));
|
||||
+ g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
||||
+
|
||||
+ g_signal_emit (container, container_signals[ACTOR_REMOVED], 0, actor);
|
||||
+}
|
||||
--
|
||||
2.26.0
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 63455680096e015eaf023760466593b6f42f9cf5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Thu, 12 Sep 2019 11:50:34 +0200
|
||||
Subject: [PATCH 2/4] renderer/native: Add API to get primary GPU
|
||||
|
||||
Will be used when acquiring scanouts from Wayland buffers.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/798
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 6 ++++++
|
||||
src/backends/native/meta-renderer-native.h | 2 ++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index dbb88edb8e..25833b6cf6 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -317,6 +317,12 @@ meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms)
|
||||
return renderer_gpu_data->gbm.device;
|
||||
}
|
||||
|
||||
+MetaGpuKms *
|
||||
+meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native)
|
||||
+{
|
||||
+ return renderer_native->primary_gpu_kms;
|
||||
+}
|
||||
+
|
||||
static MetaRendererNativeGpuData *
|
||||
meta_create_renderer_native_gpu_data (MetaGpuKms *gpu_kms)
|
||||
{
|
||||
diff --git a/src/backends/native/meta-renderer-native.h b/src/backends/native/meta-renderer-native.h
|
||||
index 9eecdead1c..b59366e267 100644
|
||||
--- a/src/backends/native/meta-renderer-native.h
|
||||
+++ b/src/backends/native/meta-renderer-native.h
|
||||
@@ -53,6 +53,8 @@ struct gbm_device * meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms);
|
||||
|
||||
gboolean meta_renderer_native_supports_mirroring (MetaRendererNative *renderer_native);
|
||||
|
||||
+MetaGpuKms * meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native);
|
||||
+
|
||||
void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
|
||||
|
||||
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 2e4d3e22aff7cc8e41fa08d798c55a39a542476c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Tue, 2 Jun 2020 18:34:57 +0200
|
||||
Subject: [PATCH 2/2] renderer-native: Don't leak DMA buffer CoglFramebuffer
|
||||
|
||||
When we created the DMA buffer backed CoglFramebuffer, we handed it over
|
||||
to CoglDmaBufHandle which took its own reference. What we failed to do
|
||||
was to release our own reference to it, effectively leaking it.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1283
|
||||
(cherry picked from commit c823b5ddba18d30e1fdb74d6764cd40637dc4054)
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index ba98de650..dbb88edb8 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -2633,6 +2633,7 @@ meta_renderer_native_create_dma_buf (CoglRenderer *cogl_renderer,
|
||||
case META_RENDERER_NATIVE_MODE_GBM:
|
||||
{
|
||||
CoglFramebuffer *dmabuf_fb;
|
||||
+ CoglDmaBufHandle *dmabuf_handle;
|
||||
struct gbm_bo *new_bo;
|
||||
int dmabuf_fd = -1;
|
||||
|
||||
@@ -2669,8 +2670,11 @@ meta_renderer_native_create_dma_buf (CoglRenderer *cogl_renderer,
|
||||
if (!dmabuf_fb)
|
||||
return NULL;
|
||||
|
||||
- return cogl_dma_buf_handle_new (dmabuf_fb, dmabuf_fd, new_bo,
|
||||
- (GDestroyNotify) gbm_bo_destroy);
|
||||
+ dmabuf_handle =
|
||||
+ cogl_dma_buf_handle_new (dmabuf_fb, dmabuf_fd, new_bo,
|
||||
+ (GDestroyNotify) gbm_bo_destroy);
|
||||
+ cogl_object_unref (dmabuf_fb);
|
||||
+ return dmabuf_handle;
|
||||
}
|
||||
break;
|
||||
#ifdef HAVE_EGL_DEVICE
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,181 +0,0 @@
|
||||
From c5020c3d303ab211a970d88638e7d723034688db Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 10 Jan 2019 10:47:19 -0500
|
||||
Subject: [PATCH 3/9] backend: add signals for reporting suspend and resume
|
||||
|
||||
This commit adds "suspending" and "resuming" signals
|
||||
to MetaBackend.
|
||||
|
||||
It's preliminary work needed for tracking when to purge
|
||||
and recreate all textures (needed by nvidia).
|
||||
---
|
||||
src/backends/meta-backend.c | 98 ++++++++++++++++++++++++++++++----
|
||||
src/org.freedesktop.login1.xml | 1 +
|
||||
2 files changed, 88 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
|
||||
index 5d71977c6..f59b899b7 100644
|
||||
--- a/src/backends/meta-backend.c
|
||||
+++ b/src/backends/meta-backend.c
|
||||
@@ -53,6 +53,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
+#include <gio/gunixfdlist.h>
|
||||
+
|
||||
#include "backends/meta-cursor-tracker-private.h"
|
||||
#include "backends/meta-idle-monitor-private.h"
|
||||
#include "backends/meta-input-settings-private.h"
|
||||
@@ -87,6 +89,8 @@ enum
|
||||
LAST_DEVICE_CHANGED,
|
||||
LID_IS_CLOSED_CHANGED,
|
||||
|
||||
+ SUSPENDING,
|
||||
+ RESUMING,
|
||||
N_SIGNALS
|
||||
};
|
||||
|
||||
@@ -745,6 +749,20 @@ meta_backend_class_init (MetaBackendClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
|
||||
+ signals[SUSPENDING] =
|
||||
+ g_signal_new ("suspending",
|
||||
+ G_TYPE_FROM_CLASS (object_class),
|
||||
+ G_SIGNAL_RUN_LAST,
|
||||
+ 0,
|
||||
+ NULL, NULL, NULL,
|
||||
+ G_TYPE_NONE, 0);
|
||||
+ signals[RESUMING] =
|
||||
+ g_signal_new ("resuming",
|
||||
+ G_TYPE_FROM_CLASS (object_class),
|
||||
+ G_SIGNAL_RUN_LAST,
|
||||
+ 0,
|
||||
+ NULL, NULL, NULL,
|
||||
+ G_TYPE_NONE, 0);
|
||||
|
||||
mutter_stage_views = g_getenv ("MUTTER_STAGE_VIEWS");
|
||||
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
|
||||
@@ -768,15 +786,66 @@ meta_backend_create_renderer (MetaBackend *backend,
|
||||
return META_BACKEND_GET_CLASS (backend)->create_renderer (backend, error);
|
||||
}
|
||||
|
||||
+static void
|
||||
+inhibit_sleep (MetaBackend *backend)
|
||||
+{
|
||||
+ MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
+ g_autoptr (GVariant) fd_variant = NULL;
|
||||
+ g_autoptr (GUnixFDList) fd_list = NULL;
|
||||
+ g_autoptr (GError) error = NULL;
|
||||
+ int handle, fd;
|
||||
+
|
||||
+ if (priv->inhibit_sleep_fd >= 0)
|
||||
+ return;
|
||||
+
|
||||
+ if (!login1_manager_call_inhibit_sync (priv->logind_proxy,
|
||||
+ "sleep",
|
||||
+ "Display Server",
|
||||
+ "Prepare for suspend",
|
||||
+ "delay",
|
||||
+ NULL,
|
||||
+ &fd_variant,
|
||||
+ &fd_list,
|
||||
+ priv->cancellable,
|
||||
+ &error))
|
||||
+ {
|
||||
+ g_warning ("Failed to inhibit sleep: %s", error->message);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ handle = g_variant_get_handle (fd_variant);
|
||||
+ fd = g_unix_fd_list_get (fd_list, handle, &error);
|
||||
+
|
||||
+ if (fd < 0)
|
||||
+ {
|
||||
+ g_warning ("Failed to fetch sleep inhibitor fd: %s", error->message);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ priv->inhibit_sleep_fd = fd;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+uninhibit_sleep (MetaBackend *backend)
|
||||
+{
|
||||
+ MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
+
|
||||
+ close (priv->inhibit_sleep_fd);
|
||||
+ priv->inhibit_sleep_fd = -1;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
prepare_for_sleep_cb (MetaBackend *backend,
|
||||
gboolean suspending)
|
||||
{
|
||||
- gboolean suspending;
|
||||
-
|
||||
- g_variant_get (parameters, "(b)", &suspending);
|
||||
- if (suspending)
|
||||
+ if (suspending) {
|
||||
+ g_signal_emit (backend, signals[SUSPENDING], 0);
|
||||
+ uninhibit_sleep (backend);
|
||||
return;
|
||||
+ }
|
||||
+
|
||||
+ inhibit_sleep (backend);
|
||||
+ g_signal_emit (backend, signals[RESUMING], 0);
|
||||
meta_idle_monitor_reset_idletime (meta_idle_monitor_get_core ());
|
||||
}
|
||||
|
||||
@@ -803,6 +872,7 @@ system_bus_gotten_cb (GObject *object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
+ MetaBackend *backend = META_BACKEND (user_data);
|
||||
MetaBackendPrivate *priv;
|
||||
g_autoptr (GError) error = NULL;
|
||||
GDBusConnection *bus;
|
||||
@@ -814,15 +884,21 @@ system_bus_gotten_cb (GObject *object,
|
||||
priv = meta_backend_get_instance_private (user_data);
|
||||
priv->system_bus = bus;
|
||||
priv->logind_proxy = get_logind_proxy (priv->cancellable, &error);
|
||||
+ priv->inhibit_sleep_fd = -1;
|
||||
|
||||
if (!priv->logind_proxy)
|
||||
- g_warning ("Failed to get logind proxy: %s", error->message);
|
||||
-
|
||||
- g_signal_connect_object (priv->logind_proxy,
|
||||
- "prepare-for-sleep",
|
||||
- G_CALLBACK (prepare_for_sleep_cb),
|
||||
- user_data,
|
||||
- G_CONNECT_SWAPPED);
|
||||
+ {
|
||||
+ g_warning ("Failed to get logind proxy: %s", error->message);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ inhibit_sleep (backend);
|
||||
+ g_signal_connect_object (priv->logind_proxy,
|
||||
+ "prepare-for-sleep",
|
||||
+ G_CALLBACK (prepare_for_sleep_cb),
|
||||
+ user_data,
|
||||
+ G_CONNECT_SWAPPED);
|
||||
+ }
|
||||
}
|
||||
|
||||
static gboolean
|
||||
diff --git a/src/org.freedesktop.login1.xml b/src/org.freedesktop.login1.xml
|
||||
index 1ecfd976f..7db8f373c 100644
|
||||
--- a/src/org.freedesktop.login1.xml
|
||||
+++ b/src/org.freedesktop.login1.xml
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
<interface name="org.freedesktop.login1.Manager">
|
||||
<method name="Inhibit">
|
||||
+ <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
|
||||
<arg name="what" type="s" direction="in"/>
|
||||
<arg name="who" type="s" direction="in"/>
|
||||
<arg name="why" type="s" direction="in"/>
|
||||
--
|
||||
2.21.0
|
||||
|
167
SOURCES/0003-clutter-fix-hole-in-ClutterPaintNode.patch
Normal file
167
SOURCES/0003-clutter-fix-hole-in-ClutterPaintNode.patch
Normal file
@ -0,0 +1,167 @@
|
||||
From df565fcb681a50aac5046981c5aba04073d14856 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hergert <christian@hergert.me>
|
||||
Date: Fri, 21 Feb 2020 22:36:31 +0000
|
||||
Subject: [PATCH 3/3] clutter: fix hole in ClutterPaintNode
|
||||
|
||||
Fixing the missalignment takes the structure from 80 bytes down to 72.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1081
|
||||
---
|
||||
clutter/clutter/clutter-actor.c | 8 +++----
|
||||
clutter/clutter/clutter-canvas.c | 2 +-
|
||||
clutter/clutter/clutter-image.c | 2 +-
|
||||
clutter/clutter/clutter-paint-node-private.h | 6 ++---
|
||||
clutter/clutter/clutter-paint-node.c | 23 +++++++++++++++-----
|
||||
clutter/clutter/clutter-paint-node.h | 3 +++
|
||||
6 files changed, 30 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
|
||||
index 93d0a93ef..ff5c4a69d 100644
|
||||
--- a/clutter/clutter/clutter-actor.c
|
||||
+++ b/clutter/clutter/clutter-actor.c
|
||||
@@ -3758,7 +3758,7 @@ clutter_actor_paint_node (ClutterActor *actor,
|
||||
clear_flags |= COGL_BUFFER_BIT_COLOR;
|
||||
|
||||
node = clutter_root_node_new (fb, &bg_color, clear_flags);
|
||||
- clutter_paint_node_set_name (node, "stageClear");
|
||||
+ clutter_paint_node_set_static_name (node, "stageClear");
|
||||
clutter_paint_node_add_rectangle (node, &box);
|
||||
clutter_paint_node_add_child (root, node);
|
||||
clutter_paint_node_unref (node);
|
||||
@@ -3773,7 +3773,7 @@ clutter_actor_paint_node (ClutterActor *actor,
|
||||
/ 255;
|
||||
|
||||
node = clutter_color_node_new (&bg_color);
|
||||
- clutter_paint_node_set_name (node, "backgroundColor");
|
||||
+ clutter_paint_node_set_static_name (node, "backgroundColor");
|
||||
clutter_paint_node_add_rectangle (node, &box);
|
||||
clutter_paint_node_add_child (root, node);
|
||||
clutter_paint_node_unref (node);
|
||||
@@ -4069,7 +4069,7 @@ clutter_actor_continue_paint (ClutterActor *self)
|
||||
* virtual function can then be called directly.
|
||||
*/
|
||||
dummy = _clutter_dummy_node_new (self);
|
||||
- clutter_paint_node_set_name (dummy, "Root");
|
||||
+ clutter_paint_node_set_static_name (dummy, "Root");
|
||||
|
||||
/* XXX - for 1.12, we use the return value of paint_node() to
|
||||
* decide whether we should emit the ::paint signal.
|
||||
@@ -21427,7 +21427,7 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
|
||||
color.alpha = clutter_actor_get_paint_opacity_internal (self);
|
||||
|
||||
node = clutter_texture_node_new (texture, &color, priv->min_filter, priv->mag_filter);
|
||||
- clutter_paint_node_set_name (node, "Texture");
|
||||
+ clutter_paint_node_set_static_name (node, "Texture");
|
||||
|
||||
if (priv->content_repeat == CLUTTER_REPEAT_NONE)
|
||||
clutter_paint_node_add_rectangle (node, &box);
|
||||
diff --git a/clutter/clutter/clutter-canvas.c b/clutter/clutter/clutter-canvas.c
|
||||
index b0f1f080c..89c031be2 100644
|
||||
--- a/clutter/clutter/clutter-canvas.c
|
||||
+++ b/clutter/clutter/clutter-canvas.c
|
||||
@@ -351,7 +351,7 @@ clutter_canvas_paint_content (ClutterContent *content,
|
||||
return;
|
||||
|
||||
node = clutter_actor_create_texture_paint_node (actor, priv->texture);
|
||||
- clutter_paint_node_set_name (node, "Canvas Content");
|
||||
+ clutter_paint_node_set_static_name (node, "Canvas Content");
|
||||
clutter_paint_node_add_child (root, node);
|
||||
clutter_paint_node_unref (node);
|
||||
|
||||
diff --git a/clutter/clutter/clutter-image.c b/clutter/clutter/clutter-image.c
|
||||
index 266c68799..790e09521 100644
|
||||
--- a/clutter/clutter/clutter-image.c
|
||||
+++ b/clutter/clutter/clutter-image.c
|
||||
@@ -129,7 +129,7 @@ clutter_image_paint_content (ClutterContent *content,
|
||||
return;
|
||||
|
||||
node = clutter_actor_create_texture_paint_node (actor, priv->texture);
|
||||
- clutter_paint_node_set_name (node, "Image Content");
|
||||
+ clutter_paint_node_set_static_name (node, "Image Content");
|
||||
clutter_paint_node_add_child (root, node);
|
||||
clutter_paint_node_unref (node);
|
||||
}
|
||||
diff --git a/clutter/clutter/clutter-paint-node-private.h b/clutter/clutter/clutter-paint-node-private.h
|
||||
index d61b89951..720df1458 100644
|
||||
--- a/clutter/clutter/clutter-paint-node-private.h
|
||||
+++ b/clutter/clutter/clutter-paint-node-private.h
|
||||
@@ -48,11 +48,11 @@ struct _ClutterPaintNode
|
||||
ClutterPaintNode *next_sibling;
|
||||
ClutterPaintNode *last_child;
|
||||
|
||||
- guint n_children;
|
||||
-
|
||||
GArray *operations;
|
||||
|
||||
- gchar *name;
|
||||
+ const gchar *name;
|
||||
+
|
||||
+ guint n_children;
|
||||
|
||||
volatile int ref_count;
|
||||
};
|
||||
diff --git a/clutter/clutter/clutter-paint-node.c b/clutter/clutter/clutter-paint-node.c
|
||||
index 73765a4e9..1f9451a43 100644
|
||||
--- a/clutter/clutter/clutter-paint-node.c
|
||||
+++ b/clutter/clutter/clutter-paint-node.c
|
||||
@@ -171,8 +171,6 @@ clutter_paint_node_real_finalize (ClutterPaintNode *node)
|
||||
{
|
||||
ClutterPaintNode *iter;
|
||||
|
||||
- g_free (node->name);
|
||||
-
|
||||
if (node->operations != NULL)
|
||||
{
|
||||
guint i;
|
||||
@@ -294,7 +292,8 @@ clutter_paint_node_get_type (void)
|
||||
*
|
||||
* The @name will be used for debugging purposes.
|
||||
*
|
||||
- * The @node will copy the passed string.
|
||||
+ * The @node will intern @name using g_intern_string(). If you have access to a
|
||||
+ * static string, use clutter_paint_node_set_static_name() instead.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
@@ -304,8 +303,22 @@ clutter_paint_node_set_name (ClutterPaintNode *node,
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
|
||||
|
||||
- g_free (node->name);
|
||||
- node->name = g_strdup (name);
|
||||
+ node->name = g_intern_string (name);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * clutter_paint_node_set_static_name: (skip)
|
||||
+ *
|
||||
+ * Like clutter_paint_node_set_name() but uses a static or interned string
|
||||
+ * containing the name.
|
||||
+ */
|
||||
+void
|
||||
+clutter_paint_node_set_static_name (ClutterPaintNode *node,
|
||||
+ const char *name)
|
||||
+{
|
||||
+ g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
|
||||
+
|
||||
+ node->name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/clutter/clutter/clutter-paint-node.h b/clutter/clutter/clutter-paint-node.h
|
||||
index c42abbc3d..7d25f1681 100644
|
||||
--- a/clutter/clutter/clutter-paint-node.h
|
||||
+++ b/clutter/clutter/clutter-paint-node.h
|
||||
@@ -55,6 +55,9 @@ void clutter_paint_node_paint (Clutter
|
||||
CLUTTER_EXPORT
|
||||
void clutter_paint_node_set_name (ClutterPaintNode *node,
|
||||
const char *name);
|
||||
+CLUTTER_EXPORT
|
||||
+void clutter_paint_node_set_static_name (ClutterPaintNode *node,
|
||||
+ const char *name);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_paint_node_add_child (ClutterPaintNode *node,
|
||||
--
|
||||
2.26.0
|
||||
|
@ -0,0 +1,108 @@
|
||||
From 914fd2bec65c2e9928b03d5bc94930bc0151f998 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 17 Jun 2020 17:48:05 +0200
|
||||
Subject: [PATCH 3/4] screen-cast: Move DMA buffer allocation to MetaScreenCast
|
||||
|
||||
The aim with centralizing it is to be able to apply global policy to DMA
|
||||
buffer allocations, e.g. disabling due to various hueristics.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
|
||||
---
|
||||
src/backends/meta-screen-cast-stream-src.c | 18 ++++++--------
|
||||
src/backends/meta-screen-cast.c | 28 ++++++++++++++++++++++
|
||||
src/backends/meta-screen-cast.h | 4 ++++
|
||||
3 files changed, 39 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
|
||||
index ff4af440c1..b77186415f 100644
|
||||
--- a/src/backends/meta-screen-cast-stream-src.c
|
||||
+++ b/src/backends/meta-screen-cast-stream-src.c
|
||||
@@ -649,10 +649,10 @@ on_stream_add_buffer (void *data,
|
||||
MetaScreenCastStreamSrc *src = data;
|
||||
MetaScreenCastStreamSrcPrivate *priv =
|
||||
meta_screen_cast_stream_src_get_instance_private (src);
|
||||
- CoglContext *context =
|
||||
- clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
- CoglRenderer *renderer = cogl_context_get_renderer (context);
|
||||
- g_autoptr (GError) error = NULL;
|
||||
+ MetaScreenCastStream *stream = meta_screen_cast_stream_src_get_stream (src);
|
||||
+ MetaScreenCastSession *session = meta_screen_cast_stream_get_session (stream);
|
||||
+ MetaScreenCast *screen_cast =
|
||||
+ meta_screen_cast_session_get_screen_cast (session);
|
||||
CoglDmaBufHandle *dmabuf_handle;
|
||||
struct spa_buffer *spa_buffer = buffer->buffer;
|
||||
struct spa_data *spa_data = spa_buffer->datas;
|
||||
@@ -664,13 +664,9 @@ on_stream_add_buffer (void *data,
|
||||
spa_data[0].mapoffset = 0;
|
||||
spa_data[0].maxsize = stride * priv->video_format.size.height;
|
||||
|
||||
- dmabuf_handle = cogl_renderer_create_dma_buf (renderer,
|
||||
- priv->stream_width,
|
||||
- priv->stream_height,
|
||||
- &error);
|
||||
-
|
||||
- if (error)
|
||||
- g_debug ("Error exporting DMA buffer handle: %s", error->message);
|
||||
+ dmabuf_handle = meta_screen_cast_create_dma_buf_handle (screen_cast,
|
||||
+ priv->stream_width,
|
||||
+ priv->stream_height);
|
||||
|
||||
if (dmabuf_handle)
|
||||
{
|
||||
diff --git a/src/backends/meta-screen-cast.c b/src/backends/meta-screen-cast.c
|
||||
index 46bc268389..5f1ca8b5ca 100644
|
||||
--- a/src/backends/meta-screen-cast.c
|
||||
+++ b/src/backends/meta-screen-cast.c
|
||||
@@ -94,6 +94,34 @@ meta_screen_cast_get_backend (MetaScreenCast *screen_cast)
|
||||
return screen_cast->backend;
|
||||
}
|
||||
|
||||
+CoglDmaBufHandle *
|
||||
+meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
|
||||
+ int width,
|
||||
+ int height)
|
||||
+{
|
||||
+ ClutterBackend *clutter_backend =
|
||||
+ meta_backend_get_clutter_backend (screen_cast->backend);
|
||||
+ CoglContext *cogl_context =
|
||||
+ clutter_backend_get_cogl_context (clutter_backend);
|
||||
+ CoglRenderer *cogl_renderer = cogl_context_get_renderer (cogl_context);
|
||||
+ g_autoptr (GError) error = NULL;
|
||||
+ CoglDmaBufHandle *dmabuf_handle;
|
||||
+
|
||||
+ dmabuf_handle = cogl_renderer_create_dma_buf (cogl_renderer,
|
||||
+ width, height,
|
||||
+ &error);
|
||||
+ if (!dmabuf_handle)
|
||||
+ {
|
||||
+ g_warning ("Failed to allocate DMA buffer, "
|
||||
+ "disabling DMA buffer based screen casting: %s",
|
||||
+ error->message);
|
||||
+ screen_cast->disable_dma_bufs = TRUE;
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return dmabuf_handle;
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
register_remote_desktop_screen_cast_session (MetaScreenCastSession *session,
|
||||
const char *remote_desktop_session_id,
|
||||
diff --git a/src/backends/meta-screen-cast.h b/src/backends/meta-screen-cast.h
|
||||
index a3b650cd80..fb5a38f34f 100644
|
||||
--- a/src/backends/meta-screen-cast.h
|
||||
+++ b/src/backends/meta-screen-cast.h
|
||||
@@ -50,6 +50,10 @@ GDBusConnection * meta_screen_cast_get_connection (MetaScreenCast *screen_cast);
|
||||
|
||||
MetaBackend * meta_screen_cast_get_backend (MetaScreenCast *screen_cast);
|
||||
|
||||
+CoglDmaBufHandle * meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
|
||||
+ int width,
|
||||
+ int height);
|
||||
+
|
||||
MetaScreenCast * meta_screen_cast_new (MetaBackend *backend,
|
||||
MetaDbusSessionWatcher *session_watcher);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,209 @@
|
||||
From a239886e159e6609c3e298effbd0243af8d0e333 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Tue, 16 Jun 2020 11:30:11 +0200
|
||||
Subject: [PATCH 4/4] screen-cast: Disable DMA buffer based screen casting for
|
||||
QXL
|
||||
|
||||
QXL doesn't support mmap():ing a DMA buffer allocated in mutter inside
|
||||
the PipeWire stream consumer process. To make screen casting work again
|
||||
on QXL, disable DMA buffer based screen casting for QXL.
|
||||
|
||||
Eventually, it should be the client that renegotiates the supported
|
||||
buffer types, but until then we need this list.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318
|
||||
---
|
||||
src/backends/meta-screen-cast.c | 11 ++++++
|
||||
src/backends/meta-screen-cast.h | 2 ++
|
||||
src/backends/native/meta-backend-native.c | 41 +++++++++++++++++++++++
|
||||
src/backends/native/meta-gpu-kms.c | 26 ++++++++++++++
|
||||
src/backends/native/meta-gpu-kms.h | 2 ++
|
||||
5 files changed, 82 insertions(+)
|
||||
|
||||
diff --git a/src/backends/meta-screen-cast.c b/src/backends/meta-screen-cast.c
|
||||
index 5f1ca8b5ca..268155e7b3 100644
|
||||
--- a/src/backends/meta-screen-cast.c
|
||||
+++ b/src/backends/meta-screen-cast.c
|
||||
@@ -46,6 +46,8 @@ struct _MetaScreenCast
|
||||
|
||||
MetaDbusSessionWatcher *session_watcher;
|
||||
MetaBackend *backend;
|
||||
+
|
||||
+ gboolean disable_dma_bufs;
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -94,6 +96,12 @@ meta_screen_cast_get_backend (MetaScreenCast *screen_cast)
|
||||
return screen_cast->backend;
|
||||
}
|
||||
|
||||
+void
|
||||
+meta_screen_cast_disable_dma_bufs (MetaScreenCast *screen_cast)
|
||||
+{
|
||||
+ screen_cast->disable_dma_bufs = TRUE;
|
||||
+}
|
||||
+
|
||||
CoglDmaBufHandle *
|
||||
meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
|
||||
int width,
|
||||
@@ -107,6 +115,9 @@ meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
|
||||
g_autoptr (GError) error = NULL;
|
||||
CoglDmaBufHandle *dmabuf_handle;
|
||||
|
||||
+ if (screen_cast->disable_dma_bufs)
|
||||
+ return NULL;
|
||||
+
|
||||
dmabuf_handle = cogl_renderer_create_dma_buf (cogl_renderer,
|
||||
width, height,
|
||||
&error);
|
||||
diff --git a/src/backends/meta-screen-cast.h b/src/backends/meta-screen-cast.h
|
||||
index fb5a38f34f..fa54be729f 100644
|
||||
--- a/src/backends/meta-screen-cast.h
|
||||
+++ b/src/backends/meta-screen-cast.h
|
||||
@@ -50,6 +50,8 @@ GDBusConnection * meta_screen_cast_get_connection (MetaScreenCast *screen_cast);
|
||||
|
||||
MetaBackend * meta_screen_cast_get_backend (MetaScreenCast *screen_cast);
|
||||
|
||||
+void meta_screen_cast_disable_dma_bufs (MetaScreenCast *screen_cast);
|
||||
+
|
||||
CoglDmaBufHandle * meta_screen_cast_create_dma_buf_handle (MetaScreenCast *screen_cast,
|
||||
int width,
|
||||
int height);
|
||||
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
|
||||
index c473681cb0..2bf7f5e7e2 100644
|
||||
--- a/src/backends/native/meta-backend-native.c
|
||||
+++ b/src/backends/native/meta-backend-native.c
|
||||
@@ -57,6 +57,10 @@
|
||||
#include "core/meta-border.h"
|
||||
#include "meta/main.h"
|
||||
|
||||
+#ifdef HAVE_REMOTE_DESKTOP
|
||||
+#include "backends/meta-screen-cast.h"
|
||||
+#endif
|
||||
+
|
||||
struct _MetaBackendNative
|
||||
{
|
||||
MetaBackend parent;
|
||||
@@ -327,6 +331,39 @@ meta_backend_native_create_clutter_backend (MetaBackend *backend)
|
||||
return g_object_new (META_TYPE_CLUTTER_BACKEND_NATIVE, NULL);
|
||||
}
|
||||
|
||||
+#ifdef HAVE_REMOTE_DESKTOP
|
||||
+static void
|
||||
+maybe_disable_screen_cast_dma_bufs (MetaBackendNative *native)
|
||||
+{
|
||||
+ MetaBackend *backend = META_BACKEND (native);
|
||||
+ MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
+ MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
|
||||
+ MetaGpuKms *primary_gpu;
|
||||
+ const char *driver_name;
|
||||
+ int i;
|
||||
+ static const char *disable_dma_buf_drivers[] = {
|
||||
+ "qxl",
|
||||
+ };
|
||||
+
|
||||
+ primary_gpu = meta_renderer_native_get_primary_gpu (renderer_native);
|
||||
+ driver_name = meta_gpu_kms_get_driver_name (primary_gpu);
|
||||
+
|
||||
+ for (i = 0; i < G_N_ELEMENTS (disable_dma_buf_drivers); i++)
|
||||
+ {
|
||||
+ if (g_strcmp0 (driver_name, disable_dma_buf_drivers[i]) == 0)
|
||||
+ {
|
||||
+ MetaScreenCast *screen_cast = meta_backend_get_screen_cast (backend);
|
||||
+
|
||||
+ g_message ("The '%s' driver doesn't support DMA buffer screen sharing, disabling.",
|
||||
+ driver_name);
|
||||
+
|
||||
+ meta_screen_cast_disable_dma_bufs (screen_cast);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+#endif /* HAVE_REMOTE_DESKTOP */
|
||||
+
|
||||
static void
|
||||
meta_backend_native_post_init (MetaBackend *backend)
|
||||
{
|
||||
@@ -338,6 +375,10 @@ meta_backend_native_post_init (MetaBackend *backend)
|
||||
NULL, NULL);
|
||||
clutter_evdev_set_relative_motion_filter (manager, relative_motion_filter,
|
||||
meta_backend_get_monitor_manager (backend));
|
||||
+
|
||||
+#ifdef HAVE_REMOTE_DESKTOP
|
||||
+ maybe_disable_screen_cast_dma_bufs (META_BACKEND_NATIVE (backend));
|
||||
+#endif
|
||||
}
|
||||
|
||||
static MetaMonitorManager *
|
||||
diff --git a/src/backends/native/meta-gpu-kms.c b/src/backends/native/meta-gpu-kms.c
|
||||
index c569b948ef..93e509def5 100644
|
||||
--- a/src/backends/native/meta-gpu-kms.c
|
||||
+++ b/src/backends/native/meta-gpu-kms.c
|
||||
@@ -66,6 +66,8 @@ struct _MetaGpuKms
|
||||
char *file_path;
|
||||
GSource *source;
|
||||
|
||||
+ char *driver_name;
|
||||
+
|
||||
clockid_t clock_id;
|
||||
|
||||
drmModeConnector **connectors;
|
||||
@@ -790,6 +792,27 @@ init_outputs (MetaGpuKms *gpu_kms,
|
||||
setup_output_clones (gpu);
|
||||
}
|
||||
|
||||
+static void
|
||||
+init_info (MetaGpuKms *gpu_kms)
|
||||
+{
|
||||
+ drmVersion *drm_version;
|
||||
+
|
||||
+ drm_version = drmGetVersion (gpu_kms->fd);
|
||||
+ if (!drm_version)
|
||||
+ return;
|
||||
+
|
||||
+ gpu_kms->driver_name = g_strndup (drm_version->name,
|
||||
+ drm_version->name_len);
|
||||
+
|
||||
+ drmFreeVersion (drm_version);
|
||||
+}
|
||||
+
|
||||
+const char *
|
||||
+meta_gpu_kms_get_driver_name (MetaGpuKms *gpu_kms)
|
||||
+{
|
||||
+ return gpu_kms->driver_name;
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
meta_kms_resources_init (MetaKmsResources *resources,
|
||||
int fd,
|
||||
@@ -865,6 +888,7 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
|
||||
init_crtcs (gpu_kms, &resources);
|
||||
init_outputs (gpu_kms, &resources);
|
||||
init_frame_clock (gpu_kms);
|
||||
+ init_info (gpu_kms);
|
||||
|
||||
meta_kms_resources_release (&resources);
|
||||
|
||||
@@ -940,6 +964,8 @@ meta_gpu_kms_finalize (GObject *object)
|
||||
|
||||
free_resources (gpu_kms);
|
||||
|
||||
+ g_free (gpu_kms->driver_name);
|
||||
+
|
||||
G_OBJECT_CLASS (meta_gpu_kms_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
diff --git a/src/backends/native/meta-gpu-kms.h b/src/backends/native/meta-gpu-kms.h
|
||||
index 1f7a939e27..6096e58341 100644
|
||||
--- a/src/backends/native/meta-gpu-kms.h
|
||||
+++ b/src/backends/native/meta-gpu-kms.h
|
||||
@@ -108,4 +108,6 @@ MetaGpuKmsFlipClosureContainer * meta_gpu_kms_wrap_flip_closure (MetaGpuKms *gpu
|
||||
|
||||
void meta_gpu_kms_flip_closure_container_free (MetaGpuKmsFlipClosureContainer *closure_container);
|
||||
|
||||
+const char * meta_gpu_kms_get_driver_name (MetaGpuKms *gpu_kms);
|
||||
+
|
||||
#endif /* META_GPU_KMS_H */
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,118 +0,0 @@
|
||||
From a4a703c75e208badf78c81558994a249797dbb0a Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Sat, 12 Jan 2019 12:38:01 -0500
|
||||
Subject: [PATCH 4/9] wayland: force X clients to redraw on resume
|
||||
|
||||
On nvidia, the textures backing Xwayland client window contents get
|
||||
corrupted on suspend. Xwayland currently doesn't handle this situation
|
||||
itself.
|
||||
|
||||
For now, in order to work around this issue, send an empty output
|
||||
change event to Xwayland. This will cause it to force Expose events
|
||||
to get sent to all clients and get them to redraw.
|
||||
---
|
||||
.../native/meta-monitor-manager-kms.c | 7 +++
|
||||
src/wayland/meta-wayland-outputs.c | 47 +++++++++++++++++++
|
||||
src/wayland/meta-wayland-outputs.h | 1 +
|
||||
3 files changed, 55 insertions(+)
|
||||
|
||||
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
|
||||
index 9a0364441..7bcceee97 100644
|
||||
--- a/src/backends/native/meta-monitor-manager-kms.c
|
||||
+++ b/src/backends/native/meta-monitor-manager-kms.c
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "clutter/clutter.h"
|
||||
#include "meta/main.h"
|
||||
#include "meta/meta-x11-errors.h"
|
||||
+#include "wayland/meta-wayland-outputs.h"
|
||||
|
||||
#define DRM_CARD_UDEV_DEVICE_TYPE "drm_minor"
|
||||
|
||||
@@ -505,9 +506,15 @@ void
|
||||
meta_monitor_manager_kms_resume (MetaMonitorManagerKms *manager_kms)
|
||||
{
|
||||
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_kms);
|
||||
+ ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||
+ CoglContext *cogl_context =
|
||||
+ clutter_backend_get_cogl_context (clutter_backend);
|
||||
|
||||
meta_monitor_manager_kms_connect_uevent_handler (manager_kms);
|
||||
handle_hotplug_event (manager);
|
||||
+
|
||||
+ if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
||||
+ meta_wayland_outputs_redraw (meta_wayland_compositor_get_default ());
|
||||
}
|
||||
|
||||
static gboolean
|
||||
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
|
||||
index 099e87ab9..bc69d699d 100644
|
||||
--- a/src/wayland/meta-wayland-outputs.c
|
||||
+++ b/src/wayland/meta-wayland-outputs.c
|
||||
@@ -496,6 +496,53 @@ meta_wayland_compositor_update_outputs (MetaWaylandCompositor *compositor,
|
||||
return new_table;
|
||||
}
|
||||
|
||||
+void
|
||||
+meta_wayland_outputs_redraw (MetaWaylandCompositor *compositor)
|
||||
+{
|
||||
+ MetaMonitorManager *monitor_manager;
|
||||
+ GList *logical_monitors, *l;
|
||||
+
|
||||
+ monitor_manager = meta_monitor_manager_get ();
|
||||
+
|
||||
+ logical_monitors =
|
||||
+ meta_monitor_manager_get_logical_monitors (monitor_manager);
|
||||
+
|
||||
+ for (l = logical_monitors; l; l = l->next)
|
||||
+ {
|
||||
+ MetaLogicalMonitor *logical_monitor = l->data;
|
||||
+ MetaWaylandOutput *wayland_output;
|
||||
+ GList *iter;
|
||||
+
|
||||
+ if (logical_monitor->winsys_id == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ wayland_output =
|
||||
+ g_hash_table_lookup (compositor->outputs,
|
||||
+ GSIZE_TO_POINTER (logical_monitor->winsys_id));
|
||||
+
|
||||
+ if (wayland_output == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ /* Just output a "changes done" event for one of the outputs, with no actual changes.
|
||||
+ * xwayland takes this as a cue to send expose events to all X clients.
|
||||
+ */
|
||||
+ for (iter = wayland_output->resources; iter; iter = iter->next)
|
||||
+ {
|
||||
+ struct wl_resource *resource = iter->data;
|
||||
+ if (wl_resource_get_version (resource) >= WL_OUTPUT_DONE_SINCE_VERSION)
|
||||
+ wl_output_send_done (resource);
|
||||
+ }
|
||||
+
|
||||
+ for (iter = wayland_output->xdg_output_resources; iter; iter = iter->next)
|
||||
+ {
|
||||
+ struct wl_resource *xdg_output = iter->data;
|
||||
+ zxdg_output_v1_send_done (xdg_output);
|
||||
+ }
|
||||
+
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
on_monitors_changed (MetaMonitorManager *monitors,
|
||||
MetaWaylandCompositor *compositor)
|
||||
diff --git a/src/wayland/meta-wayland-outputs.h b/src/wayland/meta-wayland-outputs.h
|
||||
index ff15a81bd..d649e0fa1 100644
|
||||
--- a/src/wayland/meta-wayland-outputs.h
|
||||
+++ b/src/wayland/meta-wayland-outputs.h
|
||||
@@ -49,5 +49,6 @@ struct _MetaWaylandOutput
|
||||
};
|
||||
|
||||
void meta_wayland_outputs_init (MetaWaylandCompositor *compositor);
|
||||
+void meta_wayland_outputs_redraw (MetaWaylandCompositor *compositor);
|
||||
|
||||
#endif /* META_WAYLAND_OUTPUTS_H */
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 122d7726e450712b8b2fc85db41e3c8ab7b6ad56 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 10:29:55 -0500
|
||||
Subject: [PATCH 5/9] backends/native: emit gl-video-memory-purged when
|
||||
becoming active
|
||||
|
||||
The proprietary NVIDIA driver garbles memory on suspend. In order
|
||||
to work around that limitation, mutter needs to refresh all its
|
||||
textures on resuem.
|
||||
|
||||
This commit lays the way toward doing that by emitting the
|
||||
"gl-video-memory-purged" signal when the compositor becomes active
|
||||
by logind (which happens on VT switch and on resume).
|
||||
---
|
||||
src/backends/native/meta-backend-native.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
|
||||
index c473681cb..f593197e7 100644
|
||||
--- a/src/backends/native/meta-backend-native.c
|
||||
+++ b/src/backends/native/meta-backend-native.c
|
||||
@@ -653,8 +653,15 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaMonitorManagerKms *monitor_manager_kms =
|
||||
META_MONITOR_MANAGER_KMS (monitor_manager);
|
||||
+ MetaDisplay *display = meta_get_display ();
|
||||
+ ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||
+ CoglContext *cogl_context =
|
||||
+ clutter_backend_get_cogl_context (clutter_backend);
|
||||
MetaIdleMonitor *idle_monitor;
|
||||
|
||||
+ if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
||||
+ g_signal_emit_by_name (display, "gl-video-memory-purged");
|
||||
+
|
||||
meta_monitor_manager_kms_resume (monitor_manager_kms);
|
||||
|
||||
clutter_evdev_reclaim_devices ();
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 762ffddfa6157fe50bfa394ecbe4ba707d15f368 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 10:29:55 -0500
|
||||
Subject: [PATCH 6/9] backends/native: update glyph cache on resume
|
||||
|
||||
As mentioned in a previous commit, the proprietary NVIDIA
|
||||
driver garbles memory on suspend. That behavior, means that
|
||||
clutter's glyph cache (which is stored in GPU memory) gets
|
||||
corrupted on suspend.
|
||||
|
||||
This commit ensures the glyph cache is blown away when
|
||||
the logind session becomes active (on VT switch and resume).
|
||||
---
|
||||
src/backends/native/meta-backend-native.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
|
||||
index f593197e7..db9b63ac4 100644
|
||||
--- a/src/backends/native/meta-backend-native.c
|
||||
+++ b/src/backends/native/meta-backend-native.c
|
||||
@@ -660,7 +660,10 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
||||
MetaIdleMonitor *idle_monitor;
|
||||
|
||||
if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
||||
- g_signal_emit_by_name (display, "gl-video-memory-purged");
|
||||
+ {
|
||||
+ clutter_clear_glyph_cache ();
|
||||
+ g_signal_emit_by_name (display, "gl-video-memory-purged");
|
||||
+ }
|
||||
|
||||
meta_monitor_manager_kms_resume (monitor_manager_kms);
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 59ba24c09e5d2a3210ca3d259789f7ba5ae6266a Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 10:29:55 -0500
|
||||
Subject: [PATCH 7/9] backends/native: update cursor on resume
|
||||
|
||||
As mentioned in a previous commit, the proprietary NVIDIA
|
||||
driver garbles memory on suspend. That behavior, means that
|
||||
the cursor gets corrupted on suspend.
|
||||
|
||||
This commit forces the cursor to redraw itself when the
|
||||
logind session becomes active (on VT switch and resume).
|
||||
---
|
||||
src/backends/native/meta-backend-native.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
|
||||
index db9b63ac4..479e9326b 100644
|
||||
--- a/src/backends/native/meta-backend-native.c
|
||||
+++ b/src/backends/native/meta-backend-native.c
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "backends/native/meta-renderer-native.h"
|
||||
#include "backends/native/meta-stage-native.h"
|
||||
#include "clutter/evdev/clutter-evdev.h"
|
||||
+#include "core/display-private.h"
|
||||
#include "core/meta-border.h"
|
||||
#include "meta/main.h"
|
||||
|
||||
@@ -662,6 +663,7 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
||||
if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
||||
{
|
||||
clutter_clear_glyph_cache ();
|
||||
+ meta_display_update_cursor (display);
|
||||
g_signal_emit_by_name (display, "gl-video-memory-purged");
|
||||
}
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,110 +0,0 @@
|
||||
From c78a614b0d45a4bc8101a93c7138c9fb6102d13c Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 9 Jan 2019 16:57:05 -0500
|
||||
Subject: [PATCH 8/9] background: purge all background textures on suspend
|
||||
|
||||
This commit makes sure all background textures get purged
|
||||
on suspend, which is important for nvidia.
|
||||
---
|
||||
src/compositor/meta-background-image.c | 28 ++++++++++++++++++++++++++
|
||||
src/compositor/meta-background.c | 17 +++++++++++++++-
|
||||
src/meta/meta-background-image.h | 2 ++
|
||||
3 files changed, 46 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/compositor/meta-background-image.c b/src/compositor/meta-background-image.c
|
||||
index 14d3baf57..98909cb53 100644
|
||||
--- a/src/compositor/meta-background-image.c
|
||||
+++ b/src/compositor/meta-background-image.c
|
||||
@@ -283,6 +283,34 @@ meta_background_image_cache_purge (MetaBackgroundImageCache *cache,
|
||||
image->in_cache = FALSE;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * meta_background_image_cache_unload_all:
|
||||
+ * @cache: a #MetaBackgroundImageCache
|
||||
+ *
|
||||
+ * Remove all entries from the cache and unloads them; this would be used
|
||||
+ * if textures in video memory have been invalidated.
|
||||
+ */
|
||||
+void
|
||||
+meta_background_image_cache_unload_all (MetaBackgroundImageCache *cache)
|
||||
+{
|
||||
+ GHashTableIter iter;
|
||||
+ gpointer key, value;
|
||||
+
|
||||
+ g_return_if_fail (META_IS_BACKGROUND_IMAGE_CACHE (cache));
|
||||
+
|
||||
+ g_hash_table_iter_init (&iter, cache->images);
|
||||
+ while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
+ {
|
||||
+ MetaBackgroundImage *image = value;
|
||||
+
|
||||
+ g_clear_pointer (&image->texture, cogl_object_unref);
|
||||
+ image->in_cache = FALSE;
|
||||
+ image->loaded = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ g_hash_table_remove_all (cache->images);
|
||||
+}
|
||||
+
|
||||
G_DEFINE_TYPE (MetaBackgroundImage, meta_background_image, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
|
||||
index c033395fe..abdfcc7df 100644
|
||||
--- a/src/compositor/meta-background.c
|
||||
+++ b/src/compositor/meta-background.c
|
||||
@@ -303,6 +303,18 @@ meta_background_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (meta_background_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
+static void
|
||||
+free_textures (MetaBackground *self)
|
||||
+{
|
||||
+ free_color_texture (self);
|
||||
+ free_wallpaper_texture (self);
|
||||
+
|
||||
+ set_file (self, &self->file1, &self->background_image1, NULL);
|
||||
+ set_file (self, &self->file2, &self->background_image2, NULL);
|
||||
+
|
||||
+ mark_changed (self);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
meta_background_constructed (GObject *object)
|
||||
{
|
||||
@@ -312,7 +324,7 @@ meta_background_constructed (GObject *object)
|
||||
G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
|
||||
|
||||
g_signal_connect_object (self->display, "gl-video-memory-purged",
|
||||
- G_CALLBACK (mark_changed), object, G_CONNECT_SWAPPED);
|
||||
+ G_CALLBACK (free_textures), object, G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect_object (monitor_manager, "monitors-changed",
|
||||
G_CALLBACK (on_monitors_changed), self,
|
||||
@@ -950,8 +962,11 @@ meta_background_set_blend (MetaBackground *self,
|
||||
void
|
||||
meta_background_refresh_all (void)
|
||||
{
|
||||
+ MetaBackgroundImageCache *cache = meta_background_image_cache_get_default ();
|
||||
GSList *l;
|
||||
|
||||
+ meta_background_image_cache_unload_all (cache);
|
||||
+
|
||||
for (l = all_backgrounds; l; l = l->next)
|
||||
mark_changed (l->data);
|
||||
}
|
||||
diff --git a/src/meta/meta-background-image.h b/src/meta/meta-background-image.h
|
||||
index 137a6ff8e..87e40d251 100644
|
||||
--- a/src/meta/meta-background-image.h
|
||||
+++ b/src/meta/meta-background-image.h
|
||||
@@ -66,4 +66,6 @@ META_EXPORT
|
||||
void meta_background_image_cache_purge (MetaBackgroundImageCache *cache,
|
||||
GFile *file);
|
||||
|
||||
+void meta_background_image_cache_unload_all (MetaBackgroundImageCache *cache);
|
||||
+
|
||||
#endif /* __META_BACKGROUND_IMAGE_H__ */
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,712 +0,0 @@
|
||||
From d8cc418899276b45cb1a787493e0998e3b008fe5 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 10 Jan 2019 10:48:02 -0500
|
||||
Subject: [PATCH 9/9] MetaShapedTexture: save and restore textures on suspend
|
||||
|
||||
The proprietary nvidia driver garbles GPU memory on suspend.
|
||||
|
||||
In order to workaround that limitation, this commit copies all
|
||||
textures to host memory on suspend and restores them on resume.
|
||||
|
||||
One complication comes from external textures (such as those
|
||||
given to us by Xwayland for X clients). We can't just restore
|
||||
those textures, since they aren't writable.
|
||||
|
||||
This commit addresses that complication by keeping a local texture
|
||||
around for those external textures, and using it instead for parts
|
||||
of the window that haven't been redrawn since resume.
|
||||
---
|
||||
src/compositor/meta-shaped-texture.c | 487 +++++++++++++++++++++++++--
|
||||
src/meta/meta-shaped-texture.h | 2 +
|
||||
2 files changed, 468 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
|
||||
index d64e214e5..ea8daa03d 100644
|
||||
--- a/src/compositor/meta-shaped-texture.c
|
||||
+++ b/src/compositor/meta-shaped-texture.c
|
||||
@@ -40,7 +40,9 @@
|
||||
#include "compositor/meta-texture-tower.h"
|
||||
#include "compositor/region-utils.h"
|
||||
#include "core/boxes-private.h"
|
||||
+#include <meta/meta-backend.h>
|
||||
#include "meta/meta-shaped-texture.h"
|
||||
+#include "meta-texture-rectangle.h"
|
||||
|
||||
/* MAX_MIPMAPPING_FPS needs to be as small as possible for the best GPU
|
||||
* performance, but higher than the refresh rate of commonly slow updating
|
||||
@@ -72,8 +74,12 @@ static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
|
||||
|
||||
static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
|
||||
|
||||
+static void disable_backing_store (MetaShapedTexture *stex);
|
||||
+
|
||||
static void cullable_iface_init (MetaCullableInterface *iface);
|
||||
|
||||
+static gboolean meta_debug_show_backing_store = FALSE;
|
||||
+
|
||||
enum
|
||||
{
|
||||
SIZE_CHANGED,
|
||||
@@ -83,6 +89,14 @@ enum
|
||||
|
||||
static guint signals[LAST_SIGNAL];
|
||||
|
||||
+typedef struct
|
||||
+{
|
||||
+ CoglTexture *texture;
|
||||
+ CoglTexture *mask_texture;
|
||||
+ cairo_surface_t *mask_surface;
|
||||
+ cairo_region_t *region;
|
||||
+} MetaTextureBackingStore;
|
||||
+
|
||||
struct _MetaShapedTexture
|
||||
{
|
||||
ClutterActor parent;
|
||||
@@ -114,6 +128,16 @@ struct _MetaShapedTexture
|
||||
int viewport_dst_width;
|
||||
int viewport_dst_height;
|
||||
|
||||
+ /* textures get corrupted on suspend, so save them */
|
||||
+ cairo_surface_t *saved_base_surface;
|
||||
+ cairo_surface_t *saved_mask_surface;
|
||||
+
|
||||
+ /* We can't just restore external textures, so we need to track
|
||||
+ * which parts of the external texture are freshly drawn from
|
||||
+ * the client after corruption, and fill in the rest from our
|
||||
+ * saved snapshot */
|
||||
+ MetaTextureBackingStore *backing_store;
|
||||
+
|
||||
int tex_width, tex_height;
|
||||
int fallback_width, fallback_height;
|
||||
int dst_width, dst_height;
|
||||
@@ -148,6 +172,9 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
+
|
||||
+ if (g_getenv ("MUTTER_DEBUG_BACKING_STORE"))
|
||||
+ meta_debug_show_backing_store = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -159,6 +186,11 @@ invalidate_size (MetaShapedTexture *stex)
|
||||
static void
|
||||
meta_shaped_texture_init (MetaShapedTexture *stex)
|
||||
{
|
||||
+ MetaBackend *backend = meta_get_backend ();
|
||||
+ ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||
+ CoglContext *cogl_context =
|
||||
+ clutter_backend_get_cogl_context (clutter_backend);
|
||||
+
|
||||
stex->paint_tower = meta_texture_tower_new ();
|
||||
|
||||
stex->texture = NULL;
|
||||
@@ -171,6 +203,12 @@ meta_shaped_texture_init (MetaShapedTexture *stex)
|
||||
"notify::scale-x",
|
||||
G_CALLBACK (invalidate_size),
|
||||
stex);
|
||||
+
|
||||
+ if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
|
||||
+ {
|
||||
+ g_signal_connect_object (backend, "suspending", G_CALLBACK (meta_shaped_texture_save), stex, G_CONNECT_SWAPPED);
|
||||
+ g_signal_connect_object (backend, "resuming", G_CALLBACK (meta_shaped_texture_restore), stex, G_CONNECT_SWAPPED);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -311,24 +349,72 @@ meta_shaped_texture_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
+static int
|
||||
+get_layer_indices (MetaShapedTexture *stex,
|
||||
+ int *main_layer_index,
|
||||
+ int *backing_mask_layer_index,
|
||||
+ int *backing_layer_index,
|
||||
+ int *mask_layer_index)
|
||||
+{
|
||||
+ int next_layer_index = 0;
|
||||
+
|
||||
+ if (main_layer_index)
|
||||
+ *main_layer_index = next_layer_index;
|
||||
+
|
||||
+ next_layer_index++;
|
||||
+
|
||||
+ if (stex->backing_store)
|
||||
+ {
|
||||
+ if (backing_mask_layer_index)
|
||||
+ *backing_mask_layer_index = next_layer_index;
|
||||
+ next_layer_index++;
|
||||
+ if (backing_layer_index)
|
||||
+ *backing_layer_index = next_layer_index;
|
||||
+ next_layer_index++;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (backing_mask_layer_index)
|
||||
+ *backing_mask_layer_index = -1;
|
||||
+ if (backing_layer_index)
|
||||
+ *backing_layer_index = -1;
|
||||
+ }
|
||||
+
|
||||
+ if (mask_layer_index)
|
||||
+ *mask_layer_index = next_layer_index;
|
||||
+
|
||||
+ return next_layer_index;
|
||||
+}
|
||||
+
|
||||
static CoglPipeline *
|
||||
get_base_pipeline (MetaShapedTexture *stex,
|
||||
CoglContext *ctx)
|
||||
{
|
||||
CoglPipeline *pipeline;
|
||||
+ int main_layer_index;
|
||||
+ int backing_layer_index;
|
||||
+ int backing_mask_layer_index;
|
||||
+ int i, number_of_layers;
|
||||
|
||||
if (stex->base_pipeline)
|
||||
return stex->base_pipeline;
|
||||
|
||||
pipeline = cogl_pipeline_new (ctx);
|
||||
- cogl_pipeline_set_layer_wrap_mode_s (pipeline, 0,
|
||||
- COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
|
||||
- cogl_pipeline_set_layer_wrap_mode_t (pipeline, 0,
|
||||
- COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
|
||||
- cogl_pipeline_set_layer_wrap_mode_s (pipeline, 1,
|
||||
- COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
|
||||
- cogl_pipeline_set_layer_wrap_mode_t (pipeline, 1,
|
||||
- COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
|
||||
+
|
||||
+ number_of_layers = get_layer_indices (stex,
|
||||
+ &main_layer_index,
|
||||
+ &backing_mask_layer_index,
|
||||
+ &backing_layer_index,
|
||||
+ NULL);
|
||||
+
|
||||
+ for (i = 0; i < number_of_layers; i++)
|
||||
+ {
|
||||
+ cogl_pipeline_set_layer_wrap_mode_s (pipeline, i,
|
||||
+ COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
|
||||
+ cogl_pipeline_set_layer_wrap_mode_t (pipeline, i,
|
||||
+ COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
|
||||
+ }
|
||||
+
|
||||
if (!stex->is_y_inverted)
|
||||
{
|
||||
CoglMatrix matrix;
|
||||
@@ -336,7 +422,22 @@ get_base_pipeline (MetaShapedTexture *stex,
|
||||
cogl_matrix_init_identity (&matrix);
|
||||
cogl_matrix_scale (&matrix, 1, -1, 1);
|
||||
cogl_matrix_translate (&matrix, 0, -1, 0);
|
||||
- cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);
|
||||
+ cogl_pipeline_set_layer_matrix (pipeline, main_layer_index, &matrix);
|
||||
+ }
|
||||
+
|
||||
+ if (stex->backing_store)
|
||||
+ {
|
||||
+ g_autofree char *backing_description = NULL;
|
||||
+ cogl_pipeline_set_layer_combine (pipeline, backing_mask_layer_index,
|
||||
+ "RGBA = REPLACE(PREVIOUS)",
|
||||
+ NULL);
|
||||
+ backing_description = g_strdup_printf ("RGBA = INTERPOLATE(PREVIOUS, TEXTURE_%d, TEXTURE_%d[A])",
|
||||
+ backing_layer_index,
|
||||
+ backing_mask_layer_index);
|
||||
+ cogl_pipeline_set_layer_combine (pipeline,
|
||||
+ backing_layer_index,
|
||||
+ backing_description,
|
||||
+ NULL);
|
||||
}
|
||||
|
||||
if (stex->transform != META_MONITOR_TRANSFORM_NORMAL)
|
||||
@@ -379,7 +480,7 @@ get_base_pipeline (MetaShapedTexture *stex,
|
||||
}
|
||||
|
||||
if (stex->snippet)
|
||||
- cogl_pipeline_add_layer_snippet (pipeline, 0, stex->snippet);
|
||||
+ cogl_pipeline_add_layer_snippet (pipeline, main_layer_index, stex->snippet);
|
||||
|
||||
stex->base_pipeline = pipeline;
|
||||
|
||||
@@ -398,12 +499,15 @@ get_masked_pipeline (MetaShapedTexture *stex,
|
||||
CoglContext *ctx)
|
||||
{
|
||||
CoglPipeline *pipeline;
|
||||
+ int mask_layer_index;
|
||||
|
||||
if (stex->masked_pipeline)
|
||||
return stex->masked_pipeline;
|
||||
|
||||
+ get_layer_indices (stex, NULL, NULL, NULL, &mask_layer_index);
|
||||
+
|
||||
pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
|
||||
- cogl_pipeline_set_layer_combine (pipeline, 1,
|
||||
+ cogl_pipeline_set_layer_combine (pipeline, mask_layer_index,
|
||||
"RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
|
||||
NULL);
|
||||
|
||||
@@ -517,6 +621,8 @@ set_cogl_texture (MetaShapedTexture *stex,
|
||||
if (stex->texture)
|
||||
cogl_object_unref (stex->texture);
|
||||
|
||||
+ g_clear_pointer (&stex->saved_base_surface, cairo_surface_destroy);
|
||||
+
|
||||
stex->texture = cogl_tex;
|
||||
|
||||
if (cogl_tex != NULL)
|
||||
@@ -579,6 +685,10 @@ do_paint (MetaShapedTexture *stex,
|
||||
CoglContext *ctx;
|
||||
ClutterActorBox alloc;
|
||||
CoglPipelineFilter filter;
|
||||
+ int main_layer_index;
|
||||
+ int backing_mask_layer_index;
|
||||
+ int backing_layer_index;
|
||||
+ int mask_layer_index;
|
||||
|
||||
clutter_actor_get_scale (CLUTTER_ACTOR (stex), &tex_scale, NULL);
|
||||
ensure_size_valid (stex);
|
||||
@@ -665,6 +775,12 @@ do_paint (MetaShapedTexture *stex,
|
||||
}
|
||||
}
|
||||
|
||||
+ get_layer_indices (stex,
|
||||
+ &main_layer_index,
|
||||
+ &backing_mask_layer_index,
|
||||
+ &backing_layer_index,
|
||||
+ &mask_layer_index);
|
||||
+
|
||||
/* First, paint the unblended parts, which are part of the opaque region. */
|
||||
if (use_opaque_region)
|
||||
{
|
||||
@@ -686,8 +802,24 @@ do_paint (MetaShapedTexture *stex,
|
||||
if (!cairo_region_is_empty (region))
|
||||
{
|
||||
opaque_pipeline = get_unblended_pipeline (stex, ctx);
|
||||
- cogl_pipeline_set_layer_texture (opaque_pipeline, 0, paint_tex);
|
||||
- cogl_pipeline_set_layer_filters (opaque_pipeline, 0, filter, filter);
|
||||
+ cogl_pipeline_set_layer_texture (opaque_pipeline, main_layer_index, paint_tex);
|
||||
+ cogl_pipeline_set_layer_filters (opaque_pipeline, main_layer_index, filter, filter);
|
||||
+
|
||||
+ if (stex->backing_store)
|
||||
+ {
|
||||
+ cogl_pipeline_set_layer_texture (opaque_pipeline,
|
||||
+ backing_mask_layer_index,
|
||||
+ stex->backing_store->mask_texture);
|
||||
+ cogl_pipeline_set_layer_filters (opaque_pipeline,
|
||||
+ backing_mask_layer_index,
|
||||
+ filter, filter);
|
||||
+ cogl_pipeline_set_layer_texture (opaque_pipeline,
|
||||
+ backing_layer_index,
|
||||
+ stex->backing_store->texture);
|
||||
+ cogl_pipeline_set_layer_filters (opaque_pipeline,
|
||||
+ backing_layer_index,
|
||||
+ filter, filter);
|
||||
+ }
|
||||
|
||||
n_rects = cairo_region_num_rectangles (region);
|
||||
for (i = 0; i < n_rects; i++)
|
||||
@@ -726,12 +858,28 @@ do_paint (MetaShapedTexture *stex,
|
||||
else
|
||||
{
|
||||
blended_pipeline = get_masked_pipeline (stex, ctx);
|
||||
- cogl_pipeline_set_layer_texture (blended_pipeline, 1, stex->mask_texture);
|
||||
- cogl_pipeline_set_layer_filters (blended_pipeline, 1, filter, filter);
|
||||
+ cogl_pipeline_set_layer_texture (blended_pipeline, mask_layer_index, stex->mask_texture);
|
||||
+ cogl_pipeline_set_layer_filters (blended_pipeline, mask_layer_index, filter, filter);
|
||||
}
|
||||
|
||||
- cogl_pipeline_set_layer_texture (blended_pipeline, 0, paint_tex);
|
||||
- cogl_pipeline_set_layer_filters (blended_pipeline, 0, filter, filter);
|
||||
+ cogl_pipeline_set_layer_texture (blended_pipeline, main_layer_index, paint_tex);
|
||||
+ cogl_pipeline_set_layer_filters (blended_pipeline, main_layer_index, filter, filter);
|
||||
+
|
||||
+ if (stex->backing_store)
|
||||
+ {
|
||||
+ cogl_pipeline_set_layer_texture (blended_pipeline,
|
||||
+ backing_mask_layer_index,
|
||||
+ stex->backing_store->mask_texture);
|
||||
+ cogl_pipeline_set_layer_filters (blended_pipeline,
|
||||
+ backing_mask_layer_index,
|
||||
+ filter, filter);
|
||||
+ cogl_pipeline_set_layer_texture (blended_pipeline,
|
||||
+ backing_layer_index,
|
||||
+ stex->backing_store->texture);
|
||||
+ cogl_pipeline_set_layer_filters (blended_pipeline,
|
||||
+ backing_layer_index,
|
||||
+ filter, filter);
|
||||
+ }
|
||||
|
||||
CoglColor color;
|
||||
cogl_color_init_from_4ub (&color, opacity, opacity, opacity, opacity);
|
||||
@@ -925,6 +1073,7 @@ meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
g_clear_pointer (&stex->mask_texture, cogl_object_unref);
|
||||
+ g_clear_pointer (&stex->saved_mask_surface, cairo_surface_destroy);
|
||||
|
||||
if (mask_texture != NULL)
|
||||
{
|
||||
@@ -946,6 +1095,65 @@ meta_shaped_texture_is_obscured (MetaShapedTexture *stex)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+static void
|
||||
+meta_texture_backing_store_redraw_mask (MetaTextureBackingStore *backing_store)
|
||||
+{
|
||||
+ CoglError *error = NULL;
|
||||
+
|
||||
+ if (!cogl_texture_set_data (backing_store->mask_texture, COGL_PIXEL_FORMAT_A_8,
|
||||
+ cairo_image_surface_get_stride (backing_store->mask_surface),
|
||||
+ cairo_image_surface_get_data (backing_store->mask_surface), 0,
|
||||
+ &error))
|
||||
+ {
|
||||
+
|
||||
+ g_warning ("Failed to update backing mask texture");
|
||||
+ g_clear_pointer (&error, cogl_error_free);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+meta_texture_backing_store_shrink (MetaTextureBackingStore *backing_store,
|
||||
+ const cairo_rectangle_int_t *area)
|
||||
+{
|
||||
+ cairo_t *cr;
|
||||
+
|
||||
+ cairo_region_subtract_rectangle (backing_store->region, area);
|
||||
+
|
||||
+ /* If the client has finally redrawn the entire surface, we can
|
||||
+ * ditch our snapshot
|
||||
+ */
|
||||
+ if (cairo_region_is_empty (backing_store->region))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ cr = cairo_create (backing_store->mask_surface);
|
||||
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
|
||||
+ cairo_paint (cr);
|
||||
+ gdk_cairo_region (cr, backing_store->region);
|
||||
+ cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
|
||||
+ cairo_fill (cr);
|
||||
+ cairo_destroy (cr);
|
||||
+
|
||||
+ meta_texture_backing_store_redraw_mask (backing_store);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+shrink_backing_region (MetaShapedTexture *stex,
|
||||
+ const cairo_rectangle_int_t *area)
|
||||
+{
|
||||
+ gboolean still_backing_texture;
|
||||
+
|
||||
+ if (!stex->backing_store)
|
||||
+ return;
|
||||
+
|
||||
+ still_backing_texture =
|
||||
+ meta_texture_backing_store_shrink (stex->backing_store, area);
|
||||
+
|
||||
+ if (!still_backing_texture)
|
||||
+ disable_backing_store (stex);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* meta_shaped_texture_update_area:
|
||||
* @stex: #MetaShapedTexture
|
||||
@@ -1041,6 +1249,8 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
&clip);
|
||||
}
|
||||
|
||||
+ shrink_backing_region (stex, &clip);
|
||||
+
|
||||
meta_texture_tower_update_area (stex->paint_tower,
|
||||
clip.x,
|
||||
clip.y,
|
||||
@@ -1268,8 +1478,9 @@ should_get_via_offscreen (MetaShapedTexture *stex)
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
-get_image_via_offscreen (MetaShapedTexture *stex,
|
||||
- cairo_rectangle_int_t *clip)
|
||||
+get_image_via_offscreen (MetaShapedTexture *stex,
|
||||
+ cairo_rectangle_int_t *clip,
|
||||
+ CoglTexture **texture)
|
||||
{
|
||||
ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||
CoglContext *cogl_context =
|
||||
@@ -1340,9 +1551,29 @@ get_image_via_offscreen (MetaShapedTexture *stex,
|
||||
clip->width, clip->height,
|
||||
CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
cairo_image_surface_get_data (surface));
|
||||
+ cairo_surface_mark_dirty (surface);
|
||||
+
|
||||
+ if (texture)
|
||||
+ {
|
||||
+ *texture = cogl_object_ref (image_texture);
|
||||
+
|
||||
+ if (G_UNLIKELY (meta_debug_show_backing_store))
|
||||
+ {
|
||||
+ cairo_t *cr;
|
||||
+
|
||||
+ cr = cairo_create (surface);
|
||||
+ cairo_set_source_rgba (cr, 1.0, 0.0, 0.0, 0.75);
|
||||
+ cairo_paint (cr);
|
||||
+ cairo_destroy (cr);
|
||||
+ }
|
||||
+
|
||||
+ cogl_texture_set_data (*texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ cairo_image_surface_get_stride (surface),
|
||||
+ cairo_image_surface_get_data (surface), 0, NULL);
|
||||
+ }
|
||||
+
|
||||
cogl_object_unref (fb);
|
||||
|
||||
- cairo_surface_mark_dirty (surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
@@ -1404,7 +1635,7 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
}
|
||||
|
||||
if (should_get_via_offscreen (stex))
|
||||
- return get_image_via_offscreen (stex, transformed_clip);
|
||||
+ return get_image_via_offscreen (stex, transformed_clip, NULL);
|
||||
|
||||
if (transformed_clip)
|
||||
texture = cogl_texture_new_from_sub_texture (texture,
|
||||
@@ -1465,6 +1696,220 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
return surface;
|
||||
}
|
||||
|
||||
+static void
|
||||
+meta_texture_backing_store_free (MetaTextureBackingStore *backing_store)
|
||||
+{
|
||||
+ g_clear_pointer (&backing_store->texture, cogl_object_unref);
|
||||
+ g_clear_pointer (&backing_store->mask_texture, cogl_object_unref);
|
||||
+ g_clear_pointer (&backing_store->mask_surface, cairo_surface_destroy);
|
||||
+ g_clear_pointer (&backing_store->region, cairo_region_destroy);
|
||||
+
|
||||
+ g_slice_free (MetaTextureBackingStore, backing_store);
|
||||
+}
|
||||
+
|
||||
+static MetaTextureBackingStore *
|
||||
+meta_texture_backing_store_new (CoglTexture *texture)
|
||||
+{
|
||||
+ MetaTextureBackingStore *backing_store = NULL;
|
||||
+ ClutterBackend *backend = clutter_get_default_backend ();
|
||||
+ CoglContext *context = clutter_backend_get_cogl_context (backend);
|
||||
+ CoglTexture *mask_texture = NULL;
|
||||
+ guchar *mask_data;
|
||||
+ int width, height, stride;
|
||||
+ cairo_surface_t *surface;
|
||||
+ cairo_region_t *region;
|
||||
+ cairo_rectangle_int_t backing_rectangle;
|
||||
+
|
||||
+ width = cogl_texture_get_width (texture);
|
||||
+ height = cogl_texture_get_height (texture);
|
||||
+ stride = cairo_format_stride_for_width (CAIRO_FORMAT_A8, width);
|
||||
+
|
||||
+ /* we start off by only letting the backing texture through, and none of the real texture */
|
||||
+ backing_rectangle.x = 0;
|
||||
+ backing_rectangle.y = 0;
|
||||
+ backing_rectangle.width = width;
|
||||
+ backing_rectangle.height = height;
|
||||
+
|
||||
+ region = cairo_region_create_rectangle (&backing_rectangle);
|
||||
+
|
||||
+ /* initialize mask to transparent, so the entire backing store shows through
|
||||
+ * up front
|
||||
+ */
|
||||
+ mask_data = g_malloc0 (stride * height);
|
||||
+ surface = cairo_image_surface_create_for_data (mask_data,
|
||||
+ CAIRO_FORMAT_A8,
|
||||
+ width,
|
||||
+ height,
|
||||
+ stride);
|
||||
+
|
||||
+ if (meta_texture_rectangle_check (texture))
|
||||
+ {
|
||||
+ mask_texture = COGL_TEXTURE (cogl_texture_rectangle_new_with_size (context,
|
||||
+ width,
|
||||
+ height));
|
||||
+ cogl_texture_set_components (mask_texture, COGL_TEXTURE_COMPONENTS_A);
|
||||
+ cogl_texture_set_region (mask_texture,
|
||||
+ 0, 0,
|
||||
+ 0, 0,
|
||||
+ width, height,
|
||||
+ width, height,
|
||||
+ COGL_PIXEL_FORMAT_A_8,
|
||||
+ stride, mask_data);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ CoglError *error = NULL;
|
||||
+
|
||||
+ mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (context, width, height,
|
||||
+ COGL_PIXEL_FORMAT_A_8,
|
||||
+ stride, mask_data, &error));
|
||||
+
|
||||
+ if (error)
|
||||
+ {
|
||||
+ g_warning ("Failed to allocate mask texture: %s", error->message);
|
||||
+ cogl_error_free (error);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (mask_texture)
|
||||
+ {
|
||||
+ backing_store = g_slice_new0 (MetaTextureBackingStore);
|
||||
+ backing_store->texture = cogl_object_ref (texture);
|
||||
+ backing_store->mask_texture = mask_texture;
|
||||
+ backing_store->mask_surface = surface;
|
||||
+ backing_store->region = region;
|
||||
+ }
|
||||
+
|
||||
+ return backing_store;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+enable_backing_store (MetaShapedTexture *stex,
|
||||
+ CoglTexture *texture)
|
||||
+{
|
||||
+ g_clear_pointer (&stex->backing_store, meta_texture_backing_store_free);
|
||||
+
|
||||
+ stex->backing_store = meta_texture_backing_store_new (texture);
|
||||
+
|
||||
+ meta_shaped_texture_reset_pipelines (stex);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+disable_backing_store (MetaShapedTexture *stex)
|
||||
+{
|
||||
+ g_clear_pointer (&stex->backing_store, meta_texture_backing_store_free);
|
||||
+
|
||||
+ meta_shaped_texture_reset_pipelines (stex);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+meta_shaped_texture_save (MetaShapedTexture *stex)
|
||||
+{
|
||||
+
|
||||
+ CoglTexture *texture, *mask_texture;
|
||||
+ cairo_surface_t *surface;
|
||||
+
|
||||
+ g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
+
|
||||
+ texture = COGL_TEXTURE (stex->texture);
|
||||
+
|
||||
+ if (texture == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ g_clear_pointer (&stex->saved_base_surface, cairo_surface_destroy);
|
||||
+ g_clear_pointer (&stex->saved_mask_surface, cairo_surface_destroy);
|
||||
+ g_clear_pointer (&stex->backing_store, meta_texture_backing_store_free);
|
||||
+
|
||||
+ if (should_get_via_offscreen (stex))
|
||||
+ {
|
||||
+ CoglTexture *backing_texture;
|
||||
+
|
||||
+ meta_shaped_texture_reset_pipelines (stex);
|
||||
+
|
||||
+ surface = get_image_via_offscreen (stex, NULL, &backing_texture);
|
||||
+
|
||||
+ enable_backing_store (stex, backing_texture);
|
||||
+ cogl_object_unref (backing_texture);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
+ cogl_texture_get_width (texture),
|
||||
+ cogl_texture_get_height (texture));
|
||||
+
|
||||
+ cogl_texture_get_data (texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ cairo_image_surface_get_stride (surface),
|
||||
+ cairo_image_surface_get_data (surface));
|
||||
+ }
|
||||
+
|
||||
+ stex->saved_base_surface = surface;
|
||||
+
|
||||
+ mask_texture = stex->mask_texture;
|
||||
+ if (mask_texture != NULL)
|
||||
+ {
|
||||
+ cairo_surface_t *mask_surface;
|
||||
+
|
||||
+ mask_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
+ cogl_texture_get_width (mask_texture),
|
||||
+ cogl_texture_get_height (mask_texture));
|
||||
+
|
||||
+ cogl_texture_get_data (mask_texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ cairo_image_surface_get_stride (mask_surface),
|
||||
+ cairo_image_surface_get_data (mask_surface));
|
||||
+
|
||||
+ cairo_surface_mark_dirty (mask_surface);
|
||||
+
|
||||
+ stex->saved_mask_surface = mask_surface;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+meta_shaped_texture_restore (MetaShapedTexture *stex)
|
||||
+{
|
||||
+ CoglTexture *texture;
|
||||
+ CoglError *error = NULL;
|
||||
+
|
||||
+ texture = meta_shaped_texture_get_texture (stex);
|
||||
+
|
||||
+ if (texture == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ if (stex->mask_texture)
|
||||
+ {
|
||||
+ if (!cogl_texture_set_data (stex->mask_texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ cairo_image_surface_get_stride (stex->saved_mask_surface),
|
||||
+ cairo_image_surface_get_data (stex->saved_mask_surface), 0,
|
||||
+ &error))
|
||||
+ {
|
||||
+ g_warning ("Failed to restore mask texture");
|
||||
+ g_clear_pointer (&error, cogl_error_free);
|
||||
+ }
|
||||
+ g_clear_pointer (&stex->saved_mask_surface, cairo_surface_destroy);
|
||||
+ }
|
||||
+
|
||||
+ /* if the main texture doesn't support direct writes, then
|
||||
+ * write to the local backing texture instead, and blend old
|
||||
+ * versus new at paint time.
|
||||
+ */
|
||||
+ if (stex->backing_store)
|
||||
+ {
|
||||
+ meta_texture_backing_store_redraw_mask (stex->backing_store);
|
||||
+ texture = stex->backing_store->texture;
|
||||
+ }
|
||||
+
|
||||
+ if (!cogl_texture_set_data (texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ cairo_image_surface_get_stride (stex->saved_base_surface),
|
||||
+ cairo_image_surface_get_data (stex->saved_base_surface), 0,
|
||||
+ &error))
|
||||
+ {
|
||||
+ g_warning ("Failed to restore texture");
|
||||
+ g_clear_pointer (&error, cogl_error_free);
|
||||
+ }
|
||||
+ g_clear_pointer (&stex->saved_base_surface, cairo_surface_destroy);
|
||||
+
|
||||
+ clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||
+}
|
||||
+
|
||||
void
|
||||
meta_shaped_texture_set_fallback_size (MetaShapedTexture *stex,
|
||||
int fallback_width,
|
||||
diff --git a/src/meta/meta-shaped-texture.h b/src/meta/meta-shaped-texture.h
|
||||
index c36b8547f..22b4fbd53 100644
|
||||
--- a/src/meta/meta-shaped-texture.h
|
||||
+++ b/src/meta/meta-shaped-texture.h
|
||||
@@ -66,6 +66,8 @@ META_EXPORT
|
||||
cairo_surface_t * meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
cairo_rectangle_int_t *clip);
|
||||
|
||||
+void meta_shaped_texture_save (MetaShapedTexture *self);
|
||||
+void meta_shaped_texture_restore (MetaShapedTexture *self);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __META_SHAPED_TEXTURE_H__ */
|
||||
--
|
||||
2.21.0
|
||||
|
614
SOURCES/handle-hotplug-better.patch
Normal file
614
SOURCES/handle-hotplug-better.patch
Normal file
@ -0,0 +1,614 @@
|
||||
From d442ef48412e3dc1b24a9f97b02ee3383404d501 Mon Sep 17 00:00:00 2001
|
||||
From: Emil Velikov <emil.velikov@collabora.com>
|
||||
Date: Wed, 12 Jun 2019 16:58:54 +0000
|
||||
Subject: [PATCH 1/8] renderer/native: add missing eglTerminate in EGLDevice
|
||||
error path
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Currently the EGLDevice code gets the display and calls eglInitialize.
|
||||
As a follow-up it checks the required EGL extensions - technically it
|
||||
could check the EGL device extensions earlier.
|
||||
|
||||
In either case, eglTerminate is missing. Thus the connection to the
|
||||
display was still bound.
|
||||
|
||||
This was highlighted with Mesa commit d6edccee8da ("egl: add
|
||||
EGL_platform_device support") + amdgpu.
|
||||
|
||||
In that case, since the eglTerminate is missing, we end up reusing the
|
||||
underlying amdgpu_device due to some caching in libdrm_amdgpu. The
|
||||
latter in itself being a good solution since it allows buffer sharing
|
||||
across primary and render node of the same device.
|
||||
|
||||
Note: we should really get this in branches all the way back to 3.30.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/619
|
||||
|
||||
Fixes: 934184e23 ("MetaRendererNative: Add EGLDevice based rendering support")
|
||||
Cc: Jonas Ådahl <jadahl@gmail.com>
|
||||
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
|
||||
(cherry picked from commit 9213574870faee7fe40609791fc48f4b44f861c0)
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index dbfc97aae..207b654fa 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -4038,6 +4038,7 @@ create_renderer_gpu_data_egl_device (MetaRendererNative *renderer_native,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Missing EGL extensions required for EGLDevice renderer: %s",
|
||||
missing_extensions_str);
|
||||
+ meta_egl_terminate (egl, egl_display, NULL);
|
||||
g_free (missing_extensions_str);
|
||||
g_free (missing_extensions);
|
||||
return NULL;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From e18dfc888343585d21b3f64568571009c4967a95 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 17 Jun 2019 18:18:12 +0200
|
||||
Subject: [PATCH 2/8] renderer/native: Use g_set_error() instead of
|
||||
_cogl_set_error()
|
||||
|
||||
It's even a GError, so lets use the proper API.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
|
||||
(cherry picked from commit 1efb32d3000ca06ee3cfcc146dc812866d243619)
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index 207b654fa..e7aa6f389 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -1277,7 +1277,7 @@ meta_renderer_native_egl_context_created (CoglDisplay *cogl_display,
|
||||
cogl_display_egl->dummy_surface,
|
||||
cogl_display_egl->egl_context))
|
||||
{
|
||||
- _cogl_set_error (error, COGL_WINSYS_ERROR,
|
||||
+ g_set_error (error, COGL_WINSYS_ERROR,
|
||||
COGL_WINSYS_ERROR_CREATE_CONTEXT,
|
||||
"Failed to make context current");
|
||||
return FALSE;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 1947a81db93624d57471ce1edf5548c7774c3569 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 17 Jun 2019 18:18:42 +0200
|
||||
Subject: [PATCH 3/8] renderer/native: Make sure we're not destroying an active
|
||||
EGLSurface
|
||||
|
||||
When making a new surface/context pair current, mesa may want to flush
|
||||
the old context. Make sure we don't try to flush any freed memory by
|
||||
unmaking a surface/context pair current before freeing it.
|
||||
|
||||
Not doing this results in the following valgrind warnings:
|
||||
|
||||
==15986== Invalid read of size 8
|
||||
==15986== at 0x69A6D80: dri_flush_front_buffer (gbm_dri.c:92)
|
||||
==15986== by 0x1750D458: intel_flush_front (brw_context.c:251)
|
||||
==15986== by 0x1750D4BB: intel_glFlush (brw_context.c:296)
|
||||
==15986== by 0x1739D8DD: dri2_make_current (egl_dri2.c:1461)
|
||||
==15986== by 0x17393A3A: eglMakeCurrent (eglapi.c:869)
|
||||
==15986== by 0x54381FB: InternalMakeCurrentVendor (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
|
||||
==15986== by 0x5438515: eglMakeCurrent (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
|
||||
==15986== by 0x522A782: _cogl_winsys_egl_make_current (cogl-winsys-egl.c:303)
|
||||
==15986== by 0x49B64C8: meta_renderer_native_create_view (meta-renderer-native.c:3076)
|
||||
==15986== by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78)
|
||||
==15986== by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111)
|
||||
==15986== by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142)
|
||||
==15986== Address 0x1b076600 is 0 bytes inside a block of size 48 free'd
|
||||
==15986== at 0x4839A0C: free (vg_replace_malloc.c:540)
|
||||
==15986== by 0x49B59F3: meta_renderer_native_release_onscreen (meta-renderer-native.c:2651)
|
||||
==15986== by 0x5211441: _cogl_onscreen_free (cogl-onscreen.c:167)
|
||||
==15986== by 0x5210D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
|
||||
==15986== by 0x51D0066: _cogl_object_default_unref (cogl-object.c:103)
|
||||
==15986== by 0x520F989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
|
||||
==15986== by 0x51D00B1: cogl_object_unref (cogl-object.c:115)
|
||||
==15986== by 0x536F3C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
|
||||
==15986== by 0x4B7DAF2: g_object_unref (gobject.c:3309)
|
||||
==15986== by 0x4A9596C: g_list_foreach (glist.c:1013)
|
||||
==15986== by 0x4A9599A: g_list_free_full (glist.c:223)
|
||||
==15986== by 0x48D2737: meta_renderer_rebuild_views (meta-renderer.c:100)
|
||||
==15986== Block was alloc'd at
|
||||
==15986== at 0x483AB1A: calloc (vg_replace_malloc.c:762)
|
||||
==15986== by 0x69A76B2: gbm_dri_surface_create (gbm_dri.c:1252)
|
||||
==15986== by 0x69A6BFE: gbm_surface_create (gbm.c:600)
|
||||
==15986== by 0x49B4E29: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2221)
|
||||
==15986== by 0x49B57DB: meta_onscreen_native_allocate (meta-renderer-native.c:2569)
|
||||
==15986== by 0x49B6423: meta_renderer_native_create_view (meta-renderer-native.c:3062)
|
||||
==15986== by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78)
|
||||
==15986== by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111)
|
||||
==15986== by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142)
|
||||
==15986== by 0x49A75B5: meta_backend_native_update_screen_size (meta-backend-native.c:520)
|
||||
==15986== by 0x48B01BB: meta_backend_sync_screen_size (meta-backend.c:224)
|
||||
==15986== by 0x48B09B7: meta_backend_real_post_init (meta-backend.c:501)
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
|
||||
(cherry picked from commit 56ddaaa3809240a357b5e19b5789d1aa49aaecc3)
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index e7aa6f389..b7bc3121a 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -3040,6 +3040,8 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
{
|
||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
CoglContext *cogl_context = framebuffer->context;
|
||||
+ CoglDisplay *cogl_display = cogl_context_get_display (cogl_context);
|
||||
+ CoglDisplayEGL *cogl_display_egl = cogl_display->winsys;
|
||||
CoglRenderer *cogl_renderer = cogl_context->display->renderer;
|
||||
CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
|
||||
CoglOnscreenEGL *onscreen_egl = onscreen->winsys;
|
||||
@@ -3052,6 +3054,17 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
|
||||
onscreen_native = onscreen_egl->platform;
|
||||
|
||||
+ if (onscreen_egl->egl_surface != EGL_NO_SURFACE &&
|
||||
+ (cogl_display_egl->current_draw_surface == onscreen_egl->egl_surface ||
|
||||
+ cogl_display_egl->current_read_surface == onscreen_egl->egl_surface))
|
||||
+ {
|
||||
+ if (!_cogl_winsys_egl_make_current (cogl_display,
|
||||
+ cogl_display_egl->dummy_surface,
|
||||
+ cogl_display_egl->dummy_surface,
|
||||
+ cogl_display_egl->egl_context))
|
||||
+ g_warning ("Failed to clear current context");
|
||||
+ }
|
||||
+
|
||||
g_list_free_full (onscreen_native->pending_page_flip_retries,
|
||||
(GDestroyNotify) retry_page_flip_data_free);
|
||||
if (onscreen_native->retry_page_flips_source)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 60551e5e6f984a7ed3ba3339f027ed7b37f802c4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Mon, 17 Jun 2019 19:16:12 +0200
|
||||
Subject: [PATCH 4/8] renderer/native: Fix EGLSurface destruction order
|
||||
|
||||
Make sure to destroy the EGL surface after releasing held buffers,
|
||||
otherwise we'll get the following valgrind warnings:
|
||||
|
||||
==24016== Invalid read of size 8
|
||||
==24016== at 0x1739943F: release_buffer (platform_drm.c:73)
|
||||
==24016== by 0x49AC355: meta_drm_buffer_gbm_finalize (meta-drm-buffer-gbm.c:213)
|
||||
==24016== by 0x4B75B61: g_object_unref (gobject.c:3346)
|
||||
==24016== by 0x49B4B41: free_current_bo (meta-renderer-native.c:991)
|
||||
==24016== by 0x49B816F: meta_renderer_native_release_onscreen (meta-renderer-native.c:2971)
|
||||
==24016== by 0x5209441: _cogl_onscreen_free (cogl-onscreen.c:167)
|
||||
==24016== by 0x5208D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
|
||||
==24016== by 0x51C8066: _cogl_object_default_unref (cogl-object.c:103)
|
||||
==24016== by 0x5207989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
|
||||
==24016== by 0x51C80B1: cogl_object_unref (cogl-object.c:115)
|
||||
==24016== by 0x53673C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
|
||||
==24016== by 0x4B75AF2: g_object_unref (gobject.c:3309)
|
||||
==24016== Address 0x18e742a8 is 536 bytes inside a block of size 784 free'd
|
||||
==24016== at 0x4839A0C: free (vg_replace_malloc.c:540)
|
||||
==24016== by 0x17399764: dri2_drm_destroy_surface (platform_drm.c:231)
|
||||
==24016== by 0x1738550A: eglDestroySurface (eglapi.c:1145)
|
||||
==24016== by 0x5440286: eglDestroySurface (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
|
||||
==24016== by 0x49613A5: meta_egl_destroy_surface (meta-egl.c:432)
|
||||
==24016== by 0x49B80F9: meta_renderer_native_release_onscreen (meta-renderer-native.c:2954)
|
||||
==24016== by 0x5209441: _cogl_onscreen_free (cogl-onscreen.c:167)
|
||||
==24016== by 0x5208D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
|
||||
==24016== by 0x51C8066: _cogl_object_default_unref (cogl-object.c:103)
|
||||
==24016== by 0x5207989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
|
||||
==24016== by 0x51C80B1: cogl_object_unref (cogl-object.c:115)
|
||||
==24016== by 0x53673C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
|
||||
==24016== Block was alloc'd at
|
||||
==24016== at 0x483AB1A: calloc (vg_replace_malloc.c:762)
|
||||
==24016== by 0x173997AE: dri2_drm_create_window_surface (platform_drm.c:145)
|
||||
==24016== by 0x17388906: _eglCreateWindowSurfaceCommon (eglapi.c:929)
|
||||
==24016== by 0x5440197: eglCreateWindowSurface (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
|
||||
==24016== by 0x49612FF: meta_egl_create_window_surface (meta-egl.c:396)
|
||||
==24016== by 0x49B752E: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2538)
|
||||
==24016== by 0x49B7E6C: meta_onscreen_native_allocate (meta-renderer-native.c:2870)
|
||||
==24016== by 0x49B8BCF: meta_renderer_native_create_view (meta-renderer-native.c:3387)
|
||||
==24016== by 0x48D274B: meta_renderer_create_view (meta-renderer.c:78)
|
||||
==24016== by 0x48D27DE: meta_renderer_rebuild_views (meta-renderer.c:111)
|
||||
==24016== by 0x49BB4FB: meta_stage_native_rebuild_views (meta-stage-native.c:142)
|
||||
==24016== by 0x49A733C: meta_backend_native_update_screen_size (meta-backend-native.c:517)
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
|
||||
(cherry picked from commit d9fb11b04319c00fd89715dd9207fe54e1d18c2d)
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 38 +++++++++++++++-------
|
||||
1 file changed, 27 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index b7bc3121a..62c27c191 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -3035,6 +3035,28 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static void
|
||||
+destroy_egl_surface (CoglOnscreen *onscreen)
|
||||
+{
|
||||
+ CoglOnscreenEGL *onscreen_egl = onscreen->winsys;
|
||||
+
|
||||
+ if (onscreen_egl->egl_surface != EGL_NO_SURFACE)
|
||||
+ {
|
||||
+ MetaOnscreenNative *onscreen_native = onscreen_egl->platform;
|
||||
+ MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
|
||||
+ CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
+ CoglContext *cogl_context = framebuffer->context;
|
||||
+ CoglRenderer *cogl_renderer = cogl_context->display->renderer;
|
||||
+ CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
|
||||
+
|
||||
+ meta_egl_destroy_surface (egl,
|
||||
+ cogl_renderer_egl->edpy,
|
||||
+ onscreen_egl->egl_surface,
|
||||
+ NULL);
|
||||
+ onscreen_egl->egl_surface = EGL_NO_SURFACE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
{
|
||||
@@ -3077,17 +3099,6 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
g_source_destroy);
|
||||
}
|
||||
|
||||
- if (onscreen_egl->egl_surface != EGL_NO_SURFACE)
|
||||
- {
|
||||
- MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
|
||||
-
|
||||
- meta_egl_destroy_surface (egl,
|
||||
- cogl_renderer_egl->edpy,
|
||||
- onscreen_egl->egl_surface,
|
||||
- NULL);
|
||||
- onscreen_egl->egl_surface = EGL_NO_SURFACE;
|
||||
- }
|
||||
-
|
||||
renderer_gpu_data =
|
||||
meta_renderer_native_get_gpu_data (onscreen_native->renderer_native,
|
||||
onscreen_native->render_gpu);
|
||||
@@ -3100,6 +3111,8 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
|
||||
free_current_bo (onscreen);
|
||||
|
||||
+ destroy_egl_surface (onscreen);
|
||||
+
|
||||
if (onscreen_native->gbm.surface)
|
||||
{
|
||||
gbm_surface_destroy (onscreen_native->gbm.surface);
|
||||
@@ -3110,6 +3123,9 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
|
||||
release_dumb_fb (&onscreen_native->egl.dumb_fb,
|
||||
onscreen_native->render_gpu);
|
||||
+
|
||||
+ destroy_egl_surface (onscreen);
|
||||
+
|
||||
if (onscreen_native->egl.stream != EGL_NO_STREAM_KHR)
|
||||
{
|
||||
MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From c447010a23edc03c7a1103b477972ad666c2600f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 19 Jun 2019 20:55:48 +0200
|
||||
Subject: [PATCH 5/8] renderer/native: Remove left-over function declarations
|
||||
|
||||
There are no callers and no definitions of these.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/655
|
||||
---
|
||||
src/backends/native/meta-renderer-native.h | 12 ------------
|
||||
1 file changed, 12 deletions(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.h b/src/backends/native/meta-renderer-native.h
|
||||
index a006dcbe7..8468208e1 100644
|
||||
--- a/src/backends/native/meta-renderer-native.h
|
||||
+++ b/src/backends/native/meta-renderer-native.h
|
||||
@@ -55,18 +55,6 @@ gboolean meta_renderer_native_supports_mirroring (MetaRendererNative *renderer_n
|
||||
|
||||
void meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native);
|
||||
|
||||
-gboolean meta_renderer_native_set_legacy_view_size (MetaRendererNative *renderer_native,
|
||||
- MetaRendererView *view,
|
||||
- int width,
|
||||
- int height,
|
||||
- GError **error);
|
||||
-
|
||||
-void meta_renderer_native_set_ignore_crtc (MetaRendererNative *renderer_native,
|
||||
- uint32_t id,
|
||||
- gboolean ignore);
|
||||
-
|
||||
-MetaRendererView * meta_renderer_native_create_legacy_view (MetaRendererNative *renderer_native);
|
||||
-
|
||||
void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
|
||||
|
||||
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 7f97403d12df19cf936a341cc218743ec339aa0a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 19 Jun 2019 20:57:14 +0200
|
||||
Subject: [PATCH 6/8] renderer/native: Queue mode reset from new rebuild_views
|
||||
vfunc
|
||||
|
||||
Simplify the call site a bit and make the native renderer know it should
|
||||
queue mode reset itself when views have been rebuilt. This is done
|
||||
partly due to more things needing to be dealt with after views have been
|
||||
rebuilt.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/655
|
||||
---
|
||||
src/backends/meta-renderer.c | 8 ++++++++
|
||||
src/backends/meta-renderer.h | 1 +
|
||||
src/backends/native/meta-renderer-native.c | 17 ++++++++++++++++-
|
||||
src/backends/native/meta-renderer-native.h | 2 --
|
||||
src/backends/native/meta-stage-native.c | 1 -
|
||||
5 files changed, 25 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/backends/meta-renderer.c b/src/backends/meta-renderer.c
|
||||
index 28637437b..87ba9f9f0 100644
|
||||
--- a/src/backends/meta-renderer.c
|
||||
+++ b/src/backends/meta-renderer.c
|
||||
@@ -90,6 +90,12 @@ meta_renderer_create_view (MetaRenderer *renderer,
|
||||
*/
|
||||
void
|
||||
meta_renderer_rebuild_views (MetaRenderer *renderer)
|
||||
+{
|
||||
+ return META_RENDERER_GET_CLASS (renderer)->rebuild_views (renderer);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+meta_renderer_real_rebuild_views (MetaRenderer *renderer)
|
||||
{
|
||||
MetaRendererPrivate *priv = meta_renderer_get_instance_private (renderer);
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
@@ -181,4 +187,6 @@ meta_renderer_class_init (MetaRendererClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = meta_renderer_finalize;
|
||||
+
|
||||
+ klass->rebuild_views = meta_renderer_real_rebuild_views;
|
||||
}
|
||||
diff --git a/src/backends/meta-renderer.h b/src/backends/meta-renderer.h
|
||||
index dae52cb9a..478baee91 100644
|
||||
--- a/src/backends/meta-renderer.h
|
||||
+++ b/src/backends/meta-renderer.h
|
||||
@@ -43,6 +43,7 @@ struct _MetaRendererClass
|
||||
CoglRenderer * (* create_cogl_renderer) (MetaRenderer *renderer);
|
||||
MetaRendererView * (* create_view) (MetaRenderer *renderer,
|
||||
MetaLogicalMonitor *logical_monitor);
|
||||
+ void (* rebuild_views) (MetaRenderer *renderer);
|
||||
};
|
||||
|
||||
CoglRenderer * meta_renderer_create_cogl_renderer (MetaRenderer *renderer);
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index 62c27c191..70e1c4f9d 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -258,6 +258,9 @@ cogl_pixel_format_from_drm_format (uint32_t drm_format,
|
||||
CoglPixelFormat *out_format,
|
||||
CoglTextureComponents *out_components);
|
||||
|
||||
+static void
|
||||
+meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native);
|
||||
+
|
||||
static MetaBackend *
|
||||
backend_from_renderer_native (MetaRendererNative *renderer_native)
|
||||
{
|
||||
@@ -3186,7 +3189,7 @@ meta_renderer_native_supports_mirroring (MetaRendererNative *renderer_native)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
|
||||
{
|
||||
MetaRenderer *renderer = META_RENDERER (renderer_native);
|
||||
@@ -3552,6 +3555,17 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
return view;
|
||||
}
|
||||
|
||||
+static void
|
||||
+meta_renderer_native_rebuild_views (MetaRenderer *renderer)
|
||||
+{
|
||||
+ MetaRendererClass *parent_renderer_class =
|
||||
+ META_RENDERER_CLASS (meta_renderer_native_parent_class);
|
||||
+
|
||||
+ parent_renderer_class->rebuild_views (renderer);
|
||||
+
|
||||
+ meta_renderer_native_queue_modes_reset (META_RENDERER_NATIVE (renderer));
|
||||
+}
|
||||
+
|
||||
void
|
||||
meta_renderer_native_finish_frame (MetaRendererNative *renderer_native)
|
||||
{
|
||||
@@ -4350,6 +4364,7 @@ meta_renderer_native_class_init (MetaRendererNativeClass *klass)
|
||||
|
||||
renderer_class->create_cogl_renderer = meta_renderer_native_create_cogl_renderer;
|
||||
renderer_class->create_view = meta_renderer_native_create_view;
|
||||
+ renderer_class->rebuild_views = meta_renderer_native_rebuild_views;
|
||||
|
||||
obj_props[PROP_MONITOR_MANAGER] =
|
||||
g_param_spec_object ("monitor-manager",
|
||||
diff --git a/src/backends/native/meta-renderer-native.h b/src/backends/native/meta-renderer-native.h
|
||||
index 8468208e1..9eecdead1 100644
|
||||
--- a/src/backends/native/meta-renderer-native.h
|
||||
+++ b/src/backends/native/meta-renderer-native.h
|
||||
@@ -53,8 +53,6 @@ struct gbm_device * meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms);
|
||||
|
||||
gboolean meta_renderer_native_supports_mirroring (MetaRendererNative *renderer_native);
|
||||
|
||||
-void meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native);
|
||||
-
|
||||
void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
|
||||
|
||||
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
|
||||
diff --git a/src/backends/native/meta-stage-native.c b/src/backends/native/meta-stage-native.c
|
||||
index add3e81fd..9b9c45ef3 100644
|
||||
--- a/src/backends/native/meta-stage-native.c
|
||||
+++ b/src/backends/native/meta-stage-native.c
|
||||
@@ -140,7 +140,6 @@ meta_stage_native_rebuild_views (MetaStageNative *stage_native)
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
|
||||
meta_renderer_rebuild_views (renderer);
|
||||
- meta_renderer_native_queue_modes_reset (META_RENDERER_NATIVE (renderer));
|
||||
clutter_stage_update_resource_scales (CLUTTER_STAGE (stage));
|
||||
ensure_frame_callbacks (stage_native);
|
||||
}
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 025054c93e43e8359c9ecafb6edea1eb4b7ad681 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 19 Jun 2019 21:14:05 +0200
|
||||
Subject: [PATCH 7/8] renderer/native: Discard page flip retries when
|
||||
rebuilding views
|
||||
|
||||
Rebuilding views means we don't care to retry page flip attempts for
|
||||
previous views, especially since connectors may have been disconnected,
|
||||
making a page flip retry hit an assert a flipped CRTC has connectors
|
||||
associated with it.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/655
|
||||
---
|
||||
src/backends/native/meta-renderer-native.c | 50 +++++++++++++++++-----
|
||||
1 file changed, 39 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
||||
index 70e1c4f9d..3cd01bcb7 100644
|
||||
--- a/src/backends/native/meta-renderer-native.c
|
||||
+++ b/src/backends/native/meta-renderer-native.c
|
||||
@@ -3060,6 +3060,24 @@ destroy_egl_surface (CoglOnscreen *onscreen)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+discard_onscreen_page_flip_retries (MetaOnscreenNative *onscreen_native)
|
||||
+{
|
||||
+ g_list_free_full (onscreen_native->pending_page_flip_retries,
|
||||
+ (GDestroyNotify) retry_page_flip_data_free);
|
||||
+ onscreen_native->pending_page_flip_retries = NULL;
|
||||
+
|
||||
+ if (onscreen_native->retry_page_flips_source)
|
||||
+ {
|
||||
+ MetaBackend *backend =
|
||||
+ backend_from_renderer_native (onscreen_native->renderer_native);
|
||||
+
|
||||
+ meta_backend_thaw_updates (backend);
|
||||
+ g_clear_pointer (&onscreen_native->retry_page_flips_source,
|
||||
+ g_source_destroy);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
{
|
||||
@@ -3090,17 +3108,7 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
|
||||
g_warning ("Failed to clear current context");
|
||||
}
|
||||
|
||||
- g_list_free_full (onscreen_native->pending_page_flip_retries,
|
||||
- (GDestroyNotify) retry_page_flip_data_free);
|
||||
- if (onscreen_native->retry_page_flips_source)
|
||||
- {
|
||||
- MetaBackend *backend =
|
||||
- backend_from_renderer_native (onscreen_native->renderer_native);
|
||||
-
|
||||
- meta_backend_thaw_updates (backend);
|
||||
- g_clear_pointer (&onscreen_native->retry_page_flips_source,
|
||||
- g_source_destroy);
|
||||
- }
|
||||
+ discard_onscreen_page_flip_retries (onscreen_native);
|
||||
|
||||
renderer_gpu_data =
|
||||
meta_renderer_native_get_gpu_data (onscreen_native->renderer_native,
|
||||
@@ -3555,12 +3563,32 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
return view;
|
||||
}
|
||||
|
||||
+static void
|
||||
+discard_page_flip_retries (MetaRenderer *renderer)
|
||||
+{
|
||||
+ GList *l;
|
||||
+
|
||||
+ for (l = meta_renderer_get_views (renderer); l; l = l->next)
|
||||
+ {
|
||||
+ ClutterStageView *stage_view = l->data;
|
||||
+ CoglFramebuffer *framebuffer =
|
||||
+ clutter_stage_view_get_onscreen (stage_view);
|
||||
+ CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
|
||||
+ CoglOnscreenEGL *onscreen_egl = onscreen->winsys;
|
||||
+ MetaOnscreenNative *onscreen_native = onscreen_egl->platform;
|
||||
+
|
||||
+ discard_onscreen_page_flip_retries (onscreen_native);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void
|
||||
meta_renderer_native_rebuild_views (MetaRenderer *renderer)
|
||||
{
|
||||
MetaRendererClass *parent_renderer_class =
|
||||
META_RENDERER_CLASS (meta_renderer_native_parent_class);
|
||||
|
||||
+ discard_page_flip_retries (renderer);
|
||||
+
|
||||
parent_renderer_class->rebuild_views (renderer);
|
||||
|
||||
meta_renderer_native_queue_modes_reset (META_RENDERER_NATIVE (renderer));
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From f4fdec6003e2cf9fa4b1882e92faf1da64e6052e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
||||
Date: Wed, 27 Nov 2019 17:34:35 +0100
|
||||
Subject: [PATCH 8/8] =?UTF-8?q?crtc-kms:=20Ignore=2090=C2=B0=20rotations?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
They tend to require special modifiers or won't work at all; ignore
|
||||
them.
|
||||
---
|
||||
src/backends/native/meta-crtc-kms.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-crtc-kms.c b/src/backends/native/meta-crtc-kms.c
|
||||
index 8c2fbfe3c..8374376d5 100644
|
||||
--- a/src/backends/native/meta-crtc-kms.c
|
||||
+++ b/src/backends/native/meta-crtc-kms.c
|
||||
@@ -368,12 +368,8 @@ parse_transforms (MetaCrtc *crtc,
|
||||
|
||||
if (strcmp (prop->enums[i].name, "rotate-0") == 0)
|
||||
transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||
- else if (strcmp (prop->enums[i].name, "rotate-90") == 0)
|
||||
- transform = META_MONITOR_TRANSFORM_90;
|
||||
else if (strcmp (prop->enums[i].name, "rotate-180") == 0)
|
||||
transform = META_MONITOR_TRANSFORM_180;
|
||||
- else if (strcmp (prop->enums[i].name, "rotate-270") == 0)
|
||||
- transform = META_MONITOR_TRANSFORM_270;
|
||||
|
||||
if (transform != -1)
|
||||
{
|
||||
--
|
||||
2.24.1
|
||||
|
5977
SOURCES/screen-cast-remote-desktop-improvements.patch
Normal file
5977
SOURCES/screen-cast-remote-desktop-improvements.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,12 +3,12 @@
|
||||
%global gsettings_desktop_schemas_version 3.21.4
|
||||
%global json_glib_version 0.12.0
|
||||
%global libinput_version 1.4
|
||||
%global pipewire_version 0.2.2
|
||||
%global pipewire_version 0.3.0
|
||||
%global mutter_api_version 4
|
||||
|
||||
Name: mutter
|
||||
Version: 3.32.2
|
||||
Release: 26%{?dist}
|
||||
Release: 44%{?dist}
|
||||
Summary: Window and compositing manager based on Clutter
|
||||
|
||||
License: GPLv2+
|
||||
@ -28,17 +28,6 @@ Patch3: covscan-fixes.patch
|
||||
Patch4: 0001-enum-types-Use-basename-in-header-comment.patch
|
||||
Patch5: 0001-workspace-manager-Expose-layout-properties.patch
|
||||
|
||||
# Fix corruption on suspend and resume with nvidia (rhbz#1663440)
|
||||
Patch10001: 0001-cogl-add-new-UNSTABLE_TEXTURES-feature.patch
|
||||
Patch10002: 0002-backend-switch-to-using-generated-logind-proxy.patch
|
||||
Patch10003: 0003-backend-add-signals-for-reporting-suspend-and-resume.patch
|
||||
Patch10004: 0004-wayland-force-X-clients-to-redraw-on-resume.patch
|
||||
Patch10005: 0005-backends-native-emit-gl-video-memory-purged-when-bec.patch
|
||||
Patch10006: 0006-backends-native-update-glyph-cache-on-resume.patch
|
||||
Patch10007: 0007-backends-native-update-cursor-on-resume.patch
|
||||
Patch10008: 0008-background-purge-all-background-textures-on-suspend.patch
|
||||
Patch10009: 0009-MetaShapedTexture-save-and-restore-textures-on-suspe.patch
|
||||
|
||||
# RHEL 7 downstream patches
|
||||
Patch100: deal-more-gracefully-with-oversized-windows.patch
|
||||
# Work-around for Xvnc resizing (rhbz#1265511)
|
||||
@ -110,6 +99,57 @@ Patch264: 0001-backends-Always-enable-tap-to-click-drag-on-opaque-W.patch
|
||||
Patch265: 0001-backends-x11-Observe-multiple-pad-mode-switch-button.patch
|
||||
Patch266: 0001-backends-Check-both-input-settings-and-mapper-for-ta.patch
|
||||
Patch267: 0001-core-Let-pad-mode-switch-events-always-go-through-Me.patch
|
||||
Patch268: 0001-Create-explicit-WacomDevices-for-tablet-touchpad-dev.patch
|
||||
Patch269: 0001-Skip-wacom-touchpads-when-updating-setting.patch
|
||||
|
||||
# Revert stored-config behavior for VMs (#1365717)
|
||||
Patch280: 0001-Revert-MetaMonitorManager-ignore-hotplug_mode_update.patch
|
||||
|
||||
# Respect xrandr --panning (#1690170)
|
||||
Patch281: 0001-crtc-xrandr-Respect-configured-RANDR-panning.patch
|
||||
|
||||
# gnome-shell core dump after connection to docking station (#1809079)
|
||||
Patch282: handle-hotplug-better.patch
|
||||
|
||||
# Improve performance under load (#1820760)
|
||||
Patch290: 0001-clutter-avoid-redundant-_clutter_paint_node_init_typ.patch
|
||||
Patch291: 0002-clutter-avoid-g_signal_emit_by_name-from-ClutterActo.patch
|
||||
Patch292: 0003-clutter-fix-hole-in-ClutterPaintNode.patch
|
||||
|
||||
# Fix corrupted background after suspend (#1828162)
|
||||
Patch300: 0001-background-Reload-when-GPU-memory-is-invalidated.patch
|
||||
|
||||
# Backport screen cast and remote desktop improvements (#1837381)
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/623
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/752
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/976
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1022
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1062
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/687
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1086
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1115
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1106
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1129
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1251
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1174
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1258
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1212
|
||||
Patch400: screen-cast-remote-desktop-improvements.patch
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1283
|
||||
Patch401: 0001-screen-cast-src-Destroy-hash-dmabuf-table-after-stre.patch
|
||||
Patch402: 0002-renderer-native-Don-t-leak-DMA-buffer-CoglFramebuffe.patch
|
||||
Patch403: 0001-renderer-Add-API-to-check-whether-renderer-is-hardwa.patch
|
||||
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1318 (#1847062)
|
||||
Patch404: 0001-backend-Add-getter-for-MetaScreenCast.patch
|
||||
Patch405: 0002-renderer-native-Add-API-to-get-primary-GPU.patch
|
||||
Patch406: 0003-screen-cast-Move-DMA-buffer-allocation-to-MetaScreen.patch
|
||||
Patch407: 0004-screen-cast-Disable-DMA-buffer-based-screen-casting-.patch
|
||||
|
||||
# Only treat WM_PROTOCOLS messages as WM_PROTOCOL messages (#1847203)
|
||||
Patch500: 0001-stage-x11-Check-that-message-is-WM_PROTOCOLS-before-.patch
|
||||
|
||||
# Don't show widow actor until explictly shown (#1719937)
|
||||
Patch501: 0001-window-actor-Don-t-show-actor-until-meta_window_acto.patch
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: pango-devel
|
||||
@ -252,6 +292,78 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/mutter-%{mutter_api_version}/tests
|
||||
|
||||
%changelog
|
||||
* Thu Jun 25 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-44
|
||||
- Don't show widow actor until explictly shown
|
||||
Resolves: #1719937
|
||||
|
||||
* Thu Jun 25 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-43
|
||||
- Only treat WM_PROTOCOLS messages as WM_PROTOCOL messages
|
||||
Resolves: #1847203
|
||||
|
||||
* Tue Jun 16 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-42
|
||||
- Don't pass DMA buffers if they can't be mmap():ed
|
||||
Related: #1847062
|
||||
|
||||
* Wed Jun 10 2020 Florian Müllner <fmuellner@redhat.com> - 3.32.2-41
|
||||
- Backport is_rendering_hardware_acclerated() API
|
||||
Related: #1837381
|
||||
|
||||
* Wed Jun 03 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-40
|
||||
- Fix DMA buffer memory leak
|
||||
Related: #1837381
|
||||
|
||||
* Mon May 25 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-39
|
||||
- Fix incorrect pipewire dependency version
|
||||
Related: #1837381
|
||||
|
||||
* Mon May 25 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-38
|
||||
- Backport screen cast and remote desktop improvements
|
||||
Resolves: #1837381
|
||||
|
||||
* Tue May 19 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-37
|
||||
- Fix corrupted background after suspend
|
||||
Resolves: #1828162
|
||||
|
||||
* Wed Apr 08 2020 Florian Müllner <fmuellner@redhat.com> - 3.32.2-36
|
||||
- Improve performance under IO load
|
||||
Resolves: #1820760
|
||||
|
||||
* Mon Mar 23 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-35
|
||||
- Drop EGLStream robustness patches
|
||||
Resolves: #1815430
|
||||
|
||||
* Thu Mar 05 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-34
|
||||
- gnome-shell core dump after connection to docking station
|
||||
Resolves: #1809079
|
||||
|
||||
* Mon Feb 24 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-33
|
||||
- Respect xrandr --panning
|
||||
Resolves: #1690170
|
||||
|
||||
* Mon Feb 24 2020 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-32
|
||||
- Revert stored-config behavior for VMs
|
||||
Resolves: #1365717
|
||||
|
||||
* Mon Feb 24 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.32.2-31
|
||||
- Fixup detection of multiple mode switch buttons
|
||||
Resolves: #1687979
|
||||
|
||||
* Fri Feb 21 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.32.2-30
|
||||
- Avoid toggling wacom touchpads on tap-to-click/drag setting updates
|
||||
Resolves: #1716754
|
||||
|
||||
* Thu Feb 13 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.32.2-29
|
||||
- Fixup Wacom pad OSD so it appears on the right monitor
|
||||
Resolves: #1777556
|
||||
|
||||
* Thu Feb 13 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.32.2-28
|
||||
- Fixup automatic enabling of wacom touchpad tapping
|
||||
Resolves: #1716754
|
||||
|
||||
* Thu Feb 13 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.32.2-27
|
||||
- Fixup handling of multiple mode switch buttons in pads
|
||||
Resolves: #1687979
|
||||
|
||||
* Mon Dec 16 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.32.2-26
|
||||
- Let pad OSD update on mode switching
|
||||
Resolves: #1716774
|
||||
@ -276,7 +388,7 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||
- Fix mode switch pad buttons without LEDs
|
||||
Resolves: #1666070
|
||||
|
||||
* Mon Dec 01 2019 Tomas Pelka <tpelka@redhat.com> - 3.32.2-20
|
||||
* Mon Dec 02 2019 Tomas Pelka <tpelka@redhat.com> - 3.32.2-20
|
||||
- Need rebuild in correct build target
|
||||
Resolves: #1730891
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user