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

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