clutter-stage: Add gl-video-memory-purged
signal
For when you want parts of Clutter to connect to the signal, without referencing Meta classes. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1374
This commit is contained in:
parent
7564c2f2e4
commit
305fcd0713
@ -172,6 +172,7 @@ enum
|
||||
AFTER_UPDATE,
|
||||
PAINT_VIEW,
|
||||
PRESENTED,
|
||||
GL_VIDEO_MEMORY_PURGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@ -2011,6 +2012,22 @@ clutter_stage_class_init (ClutterStageClass *klass)
|
||||
CLUTTER_TYPE_STAGE_VIEW,
|
||||
G_TYPE_POINTER);
|
||||
|
||||
/**
|
||||
* ClutterStage::gl-video-memory-purged: (skip)
|
||||
* @stage: the stage that received the event
|
||||
*
|
||||
* Signals that the underlying GL driver has had its texture memory purged
|
||||
* so anything presently held in texture memory is now invalidated, and
|
||||
* likely corrupt. It needs redrawing.
|
||||
*/
|
||||
stage_signals[GL_VIDEO_MEMORY_PURGED] =
|
||||
g_signal_new (I_("gl-video-memory-purged"),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
klass->activate = clutter_stage_real_activate;
|
||||
klass->deactivate = clutter_stage_real_deactivate;
|
||||
klass->delete_event = clutter_stage_real_delete_event;
|
||||
|
@ -1113,6 +1113,7 @@ meta_compositor_real_after_paint (MetaCompositor *compositor,
|
||||
{
|
||||
MetaCompositorPrivate *priv =
|
||||
meta_compositor_get_instance_private (compositor);
|
||||
ClutterActor *stage_actor = meta_backend_get_stage (priv->backend);
|
||||
CoglGraphicsResetStatus status;
|
||||
GList *l;
|
||||
|
||||
@ -1124,7 +1125,8 @@ meta_compositor_real_after_paint (MetaCompositor *compositor,
|
||||
|
||||
case COGL_GRAPHICS_RESET_STATUS_PURGED_CONTEXT_RESET:
|
||||
g_signal_emit_by_name (priv->display, "gl-video-memory-purged");
|
||||
clutter_actor_queue_redraw (meta_backend_get_stage (priv->backend));
|
||||
g_signal_emit_by_name (stage_actor, "gl-video-memory-purged");
|
||||
clutter_actor_queue_redraw (stage_actor);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user