Blame SOURCES/0016-surface-actor-Destroy-the-pending-damage-region-on-d.patch

79df40
From e4221a10d0c7e84d141765948489f264a2ff3105 Mon Sep 17 00:00:00 2001
79df40
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
79df40
Date: Wed, 10 Jul 2019 16:06:57 +0200
79df40
Subject: [PATCH 16/28] surface-actor: Destroy the pending damage region on
79df40
 dispose
79df40
79df40
As the region isn't going to be used anymore, we can safely remove it on dispose
79df40
79df40
https://gitlab.gnome.org/GNOME/mutter/merge_requests/682
79df40
---
79df40
 src/compositor/meta-surface-actor.c | 1 +
79df40
 1 file changed, 1 insertion(+)
79df40
79df40
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
79df40
index bf8c76f39..6996658ed 100644
79df40
--- a/src/compositor/meta-surface-actor.c
79df40
+++ b/src/compositor/meta-surface-actor.c
79df40
@@ -80,60 +80,61 @@ meta_surface_actor_pick (ClutterActor       *actor,
79df40
 
79df40
           rectangles[pos + 0] = rect.x;
79df40
           rectangles[pos + 1] = rect.y;
79df40
           rectangles[pos + 2] = rect.x + rect.width;
79df40
           rectangles[pos + 3] = rect.y + rect.height;
79df40
         }
79df40
 
79df40
       ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
79df40
       fb = cogl_get_draw_framebuffer ();
79df40
 
79df40
       cogl_color_init_from_4ub (&cogl_color, color->red, color->green, color->blue, color->alpha);
79df40
 
79df40
       pipeline = cogl_pipeline_new (ctx);
79df40
       cogl_pipeline_set_color (pipeline, &cogl_color);
79df40
       cogl_framebuffer_draw_rectangles (fb, pipeline, rectangles, n_rects);
79df40
       cogl_object_unref (pipeline);
79df40
     }
79df40
 
79df40
   clutter_actor_iter_init (&iter, actor);
79df40
 
79df40
   while (clutter_actor_iter_next (&iter, &child))
79df40
     clutter_actor_paint (child);
79df40
 }
79df40
 
79df40
 static void
79df40
 meta_surface_actor_dispose (GObject *object)
79df40
 {
79df40
   MetaSurfaceActor *self = META_SURFACE_ACTOR (object);
79df40
   MetaSurfaceActorPrivate *priv = self->priv;
79df40
 
79df40
+  g_clear_pointer (&priv->pending_damage, cairo_region_destroy);
79df40
   g_clear_pointer (&priv->input_region, cairo_region_destroy);
79df40
 
79df40
   G_OBJECT_CLASS (meta_surface_actor_parent_class)->dispose (object);
79df40
 }
79df40
 
79df40
 static void
79df40
 meta_surface_actor_class_init (MetaSurfaceActorClass *klass)
79df40
 {
79df40
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
79df40
   ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
79df40
 
79df40
   object_class->dispose = meta_surface_actor_dispose;
79df40
   actor_class->pick = meta_surface_actor_pick;
79df40
 
79df40
   signals[REPAINT_SCHEDULED] = g_signal_new ("repaint-scheduled",
79df40
                                              G_TYPE_FROM_CLASS (object_class),
79df40
                                              G_SIGNAL_RUN_LAST,
79df40
                                              0,
79df40
                                              NULL, NULL, NULL,
79df40
                                              G_TYPE_NONE, 0);
79df40
 
79df40
   signals[SIZE_CHANGED] = g_signal_new ("size-changed",
79df40
                                         G_TYPE_FROM_CLASS (object_class),
79df40
                                         G_SIGNAL_RUN_LAST,
79df40
                                         0,
79df40
                                         NULL, NULL, NULL,
79df40
                                         G_TYPE_NONE, 0);
79df40
 
79df40
   g_type_class_add_private (klass, sizeof (MetaSurfaceActorPrivate));
79df40
 }
79df40
-- 
79df40
2.26.2
79df40