mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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
This commit is contained in:
parent
38954de11c
commit
c4b28b0939
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user