clutter/stage-cogl: Avoid copying fb_clip_region

Because it gets destroyed (unreferenced) immediately after that.
This avoids a deep copy of potentially kilobytes of data.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1572>
This commit is contained in:
Daniel van Vugt 2020-11-18 19:08:38 +08:00
parent 09b1bbb1cf
commit 32b68478ed

View File

@ -613,7 +613,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
* artefacts.
*/
if (use_clipped_redraw)
swap_region = cairo_region_copy (fb_clip_region);
swap_region = cairo_region_reference (fb_clip_region);
else
swap_region = cairo_region_create ();