[mutter/gnome-3-38] clutter/stage-cogl: Avoid copying fb_clip_region



commit bd42c9c23b6f33bc3827b0ddb149ce2dcfb914ef
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Wed Nov 18 19:08:38 2020 +0800

    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>
    
    (cherry picked from commit 32b68478ede34caee447c9803addedc12a4df6c7)

 clutter/clutter/cogl/clutter-stage-cogl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index b682662003..535651730c 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -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 ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]