mirror of
https://github.com/brl/mutter.git
synced 2025-08-13 03:44:46 +00:00
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
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user