[mutter] clutter/cogl/stage: Don't leak FB damage region on redraw
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/cogl/stage: Don't leak FB damage region on redraw
- Date: Wed, 26 Feb 2020 07:39:09 +0000 (UTC)
commit c4b28b0939d9591e51a6c909ac3462b6a85745ee
Author: Sebastian Keller <skeller gnome org>
Date: Tue Feb 25 23:28:00 2020 +0100
clutter/cogl/stage: Don't leak FB damage region on redraw
offset_scale_and_clamp_region() creates a new region resulting in
view_damage which at this point is the only thing left pointing to what
originally was fb_damage getting overwritten and being leaked.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1089
clutter/clutter/cogl/clutter-stage-cogl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 36d1531cc..ede58e6eb 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -743,8 +743,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
/* Update the fb clip region with the extra damage. */
cairo_region_union (fb_clip_region, fb_damage);
- view_damage = g_steal_pointer (&fb_damage);
- view_damage = offset_scale_and_clamp_region (view_damage,
+ view_damage = offset_scale_and_clamp_region (fb_damage,
0, 0,
1.0f / fb_scale);
cairo_region_translate (view_damage, view_rect.x, view_rect.y);
@@ -755,6 +754,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cairo_region_union (redraw_clip, view_damage);
cairo_region_destroy (view_damage);
+ cairo_region_destroy (fb_damage);
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: num rects: %d\n",
age,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]