mutter/SOURCES/0006-backends-native-update-glyph-cache-on-resume.patch
2021-10-08 13:54:48 +00:00

36 lines
1.3 KiB
Diff

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