diff options
author | Rui Matos <tiagomatos@gmail.com> | 2016-05-20 19:22:23 +0200 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2016-06-27 20:23:50 +0200 |
commit | 7f6bcea3313b00580704258fb453b203a6b6b1a9 (patch) | |
tree | c4ca66e3b3e0ed59acce8977ab72da78298f6648 /src/core | |
parent | 7ed14e0ee867be5d8c21425097bac3d11720ab28 (diff) | |
download | mutter-7f6bcea3313b00580704258fb453b203a6b6b1a9.tar.gz |
compositor: Handle GL video memory purged errors
Emit a signal so that interested parties can recreate their FBOs and
queue a full scene graph redraw to ensure we don't end up showing
graphical artifacts.
This relies on the GL driver supporting the
NV_robustness_video_memory_purge extension and cogl creating a
suitable GL context. For now we only make use of it with the X backend
since the only driver with which this is useful is NVIDIA.
https://bugzilla.gnome.org/show_bug.cgi?id=739178
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/display.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/display.c b/src/core/display.c index 4c7a00eaf..a0a4b362f 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -125,6 +125,7 @@ enum SHOW_RESTART_MESSAGE, RESTART, SHOW_RESIZE_POPUP, + GL_VIDEO_MEMORY_PURGED, LAST_SIGNAL }; @@ -342,6 +343,14 @@ meta_display_class_init (MetaDisplayClass *klass) G_TYPE_BOOLEAN, 4, G_TYPE_BOOLEAN, META_TYPE_RECTANGLE, G_TYPE_INT, G_TYPE_INT); + display_signals[GL_VIDEO_MEMORY_PURGED] = + g_signal_new ("gl-video-memory-purged", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, NULL, + G_TYPE_NONE, 0); + g_object_class_install_property (object_class, PROP_FOCUS_WINDOW, g_param_spec_object ("focus-window", |