[mutter/wip/rstrode/rhel-8.0.0: 7/30] backends/native: emit gl-video-memory-purged when becoming active
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/rstrode/rhel-8.0.0: 7/30] backends/native: emit gl-video-memory-purged when becoming active
- Date: Mon, 28 Jan 2019 15:50:12 +0000 (UTC)
commit a8371999f7ae8ec70ba4df58e4ccbd9efbc7bb9b
Author: Ray Strode <rstrode redhat com>
Date: Tue Jan 15 10:29:55 2019 -0500
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 042d96ec6..f87c5a066 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -645,9 +645,16 @@ 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);
ClutterActor *stage;
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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]