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

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