kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0006-backends-native-update-glyph-cache-on-resume.patch

88c283
From 762ffddfa6157fe50bfa394ecbe4ba707d15f368 Mon Sep 17 00:00:00 2001
776610
From: Ray Strode <rstrode@redhat.com>
776610
Date: Tue, 15 Jan 2019 10:29:55 -0500
776610
Subject: [PATCH 6/9] backends/native: update glyph cache on resume
776610
776610
As mentioned in a previous commit, the proprietary NVIDIA
776610
driver garbles memory on suspend. That behavior, means that
776610
clutter's glyph cache (which is stored in GPU memory) gets
776610
corrupted on suspend.
776610
776610
This commit ensures the glyph cache is blown away when
776610
the logind session becomes active (on VT switch and resume).
776610
---
776610
 src/backends/native/meta-backend-native.c | 5 ++++-
776610
 1 file changed, 4 insertions(+), 1 deletion(-)
776610
776610
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
88c283
index f593197e7..db9b63ac4 100644
776610
--- a/src/backends/native/meta-backend-native.c
776610
+++ b/src/backends/native/meta-backend-native.c
88c283
@@ -660,7 +660,10 @@ void meta_backend_native_resume (MetaBackendNative *native)
776610
   MetaIdleMonitor *idle_monitor;
776610
 
776610
   if (cogl_has_feature (cogl_context, COGL_FEATURE_ID_UNSTABLE_TEXTURES))
776610
-    g_signal_emit_by_name (display, "gl-video-memory-purged");
776610
+    {
776610
+      clutter_clear_glyph_cache ();
776610
+      g_signal_emit_by_name (display, "gl-video-memory-purged");
776610
+    }
776610
 
776610
   meta_monitor_manager_kms_resume (monitor_manager_kms);
776610
 
776610
-- 
88c283
2.21.0
776610