[mutter] clutter/stage-cogl: Avoid copying fb_clip_region
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [mutter] clutter/stage-cogl: Avoid copying fb_clip_region
- Date: Wed, 18 Nov 2020 19:02:10 +0000 (UTC)
commit 32b68478ede34caee447c9803addedc12a4df6c7
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>
 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 794960e82a..b7873896f4 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]