[metacity] compositor-xrender: remove unused window_region



commit 440d35085f26ae1e795d6aa41410472a9302089a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Oct 18 15:56:43 2019 +0300

    compositor-xrender: remove unused window_region

 src/compositor/meta-compositor-xrender.c | 44 +++-----------------------------
 1 file changed, 3 insertions(+), 41 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 5f367f11..74be61b7 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -97,7 +97,6 @@ typedef struct _MetaCompWindow
   gboolean needs_shadow;
   MetaShadowType shadow_type;
 
-  XserverRegion window_region;
   XserverRegion visible_region;
 
   XserverRegion extents;
@@ -1081,17 +1080,9 @@ get_visible_region (MetaDisplay    *display,
 
   xdisplay = meta_display_get_xdisplay (display);
 
-  if (cw->window_region != None)
-    {
-      region = XFixesCreateRegion (xdisplay, NULL, 0);
-      XFixesCopyRegion (xdisplay, region, cw->window_region);
-    }
-  else
-    {
-      region = get_window_region (display, cw);
-      if (region == None)
-        return None;
-    }
+  region = get_window_region (display, cw);
+  if (region == None)
+    return None;
 
   visible = meta_window_get_frame_bounds (cw->window);
   tmp = cairo_region_to_xserver_region (xdisplay, visible);
@@ -1204,9 +1195,6 @@ paint_windows (MetaCompositorXRender *xrender,
       if (!meta_surface_is_visible (META_SURFACE (surface)))
         continue;
 
-      if (cw->window_region == None)
-        cw->window_region = get_window_region (display, cw);
-
       if (cw->visible_region == None)
         cw->visible_region = get_visible_region (display, cw);
 
@@ -1365,12 +1353,6 @@ free_win (MetaCompWindow *cw,
       cw->shadow = None;
     }
 
-  if (cw->window_region)
-    {
-      XFixesDestroyRegion (xdisplay, cw->window_region);
-      cw->window_region = None;
-    }
-
   if (cw->visible_region)
     {
       XFixesDestroyRegion (xdisplay, cw->visible_region);
@@ -1486,12 +1468,6 @@ notify_decorated_cb (MetaWindow            *window,
 
   meta_error_trap_push (window->display);
 
-  if (cw->window_region != None)
-    {
-      XFixesDestroyRegion (xrender->xdisplay, cw->window_region);
-      cw->window_region = None;
-    }
-
   if (cw->visible_region != None)
     {
       XFixesDestroyRegion (xrender->xdisplay, cw->visible_region);
@@ -1861,7 +1837,6 @@ meta_compositor_xrender_add_window (MetaCompositor *compositor,
 
   cw->damaged = FALSE;
 
-  cw->window_region = None;
   cw->visible_region = None;
 
   cw->extents = None;
@@ -1998,13 +1973,6 @@ meta_compositor_xrender_window_shape_region_changed (MetaCompositor *compositor,
 
   cw = g_object_get_data (G_OBJECT (surface), "cw");
 
-  if (cw->window_region)
-    {
-      meta_compositor_add_damage (compositor, "shape_changed", cw->window_region);
-      XFixesDestroyRegion (xrender->xdisplay, cw->window_region);
-      cw->window_region = None;
-    }
-
   if (cw->visible_region)
     {
       XFixesDestroyRegion (xrender->xdisplay, cw->visible_region);
@@ -2176,12 +2144,6 @@ meta_compositor_xrender_sync_window_geometry (MetaCompositor *compositor,
   meta_compositor_add_damage (compositor, "sync_window_geometry", damage);
   XFixesDestroyRegion (xrender->xdisplay, damage);
 
-  if (cw->window_region)
-    {
-      XFixesDestroyRegion (xrender->xdisplay, cw->window_region);
-      cw->window_region = None;
-    }
-
   if (cw->visible_region)
     {
       XFixesDestroyRegion (xrender->xdisplay, cw->visible_region);


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