mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 11:00:54 -05:00
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).
This commit is contained in:
parent
45c5f557bd
commit
f9907d1978
@ -645,9 +645,16 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
|||||||
meta_backend_get_monitor_manager (backend);
|
meta_backend_get_monitor_manager (backend);
|
||||||
MetaMonitorManagerKms *monitor_manager_kms =
|
MetaMonitorManagerKms *monitor_manager_kms =
|
||||||
META_MONITOR_MANAGER_KMS (monitor_manager);
|
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;
|
ClutterActor *stage;
|
||||||
MetaIdleMonitor *idle_monitor;
|
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);
|
meta_monitor_manager_kms_resume (monitor_manager_kms);
|
||||||
|
|
||||||
clutter_evdev_reclaim_devices ();
|
clutter_evdev_reclaim_devices ();
|
||||||
|
Loading…
Reference in New Issue
Block a user