[metacity] compositor-xrender: remove damaged from MetaCompWindow
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] compositor-xrender: remove damaged from MetaCompWindow
- Date: Fri, 18 Oct 2019 23:45:47 +0000 (UTC)
commit c7743b958a6c0728cb52c26fe00ebb3157dee9fe
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Oct 18 23:29:40 2019 +0300
compositor-xrender: remove damaged from MetaCompWindow
src/compositor/meta-compositor-xrender.c | 55 --------------------------------
1 file changed, 55 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 88a1f98d..12f54749 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -92,8 +92,6 @@ typedef struct _MetaCompWindow
int mode;
- gboolean damaged;
-
gboolean needs_shadow;
MetaShadowType shadow_type;
@@ -1077,12 +1075,6 @@ paint_windows (MetaCompositorXRender *xrender,
surface = META_SURFACE_XRENDER (index->data);
cw = g_object_get_data (G_OBJECT (surface), "cw");
- if (!cw->damaged)
- {
- /* Not damaged */
- continue;
- }
-
if (!meta_surface_is_visible (META_SURFACE (surface)))
continue;
@@ -1195,25 +1187,6 @@ add_repair (MetaCompositorXRender *xrender)
meta_compositor_queue_redraw (META_COMPOSITOR (xrender));
}
-static void
-repair_win (MetaCompositorXRender *xrender,
- MetaCompWindow *cw)
-{
- MetaCompositor *compositor = META_COMPOSITOR (xrender);
- MetaDisplay *display = meta_compositor_get_display (compositor);
- Display *xdisplay = meta_display_get_xdisplay (display);
- XserverRegion parts;
-
- if (!cw->damaged)
- {
- parts = win_extents (xrender, cw);
- meta_compositor_add_damage (compositor, "repair_win", parts);
- XFixesDestroyRegion (xdisplay, parts);
- }
-
- cw->damaged = TRUE;
-}
-
static void
free_win (MetaCompWindow *cw,
gboolean destroy)
@@ -1342,8 +1315,6 @@ notify_decorated_cb (MetaWindow *window,
meta_error_trap_pop (window->display);
- cw->damaged = TRUE;
-
add_repair (xrender);
}
@@ -1425,21 +1396,6 @@ process_expose (MetaCompositorXRender *xrender,
expose_area (xrender, rect, 1);
}
-static void
-process_damage (MetaCompositorXRender *xrender,
- XDamageNotifyEvent *event)
-{
- MetaCompWindow *cw = find_comp_window_by_xwindow (xrender, event->drawable);
-
- if (cw == NULL)
- return;
-
- repair_win (xrender, cw);
-
- if (event->more == FALSE)
- add_repair (xrender);
-}
-
static int
timeout_debug (MetaCompositorXRender *compositor)
{
@@ -1661,8 +1617,6 @@ meta_compositor_xrender_add_window (MetaCompositor *compositor,
G_CALLBACK (notify_decorated_cb),
xrender, 0);
- cw->damaged = FALSE;
-
cw->extents = None;
cw->shadow = None;
cw->shadow_dx = 0;
@@ -1716,11 +1670,6 @@ meta_compositor_xrender_show_window (MetaCompositor *compositor,
MetaSurface *surface,
MetaEffectType effect)
{
- MetaCompWindow *cw;
-
- cw = g_object_get_data (G_OBJECT (surface), "cw");
-
- cw->damaged = TRUE;
}
static void
@@ -1735,8 +1684,6 @@ meta_compositor_xrender_hide_window (MetaCompositor *compositor,
cw = g_object_get_data (G_OBJECT (surface), "cw");
- cw->damaged = FALSE;
-
if (cw->extents != None)
{
meta_compositor_add_damage (compositor, "hide_window", cw->extents);
@@ -1814,8 +1761,6 @@ meta_compositor_xrender_process_event (MetaCompositor *compositor,
break;
default:
- if (event->type == meta_display_get_damage_event_base (display) + XDamageNotify)
- process_damage (xrender, (XDamageNotifyEvent *) event);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]