[mutter] cogl/onscreen: Remove show()/hide()



commit e43b95cd110b36f8d01699d1c1524bfbc566b7be
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon Oct 19 22:34:45 2020 +0200

    cogl/onscreen: Remove show()/hide()
    
    Not used, and not relevant.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1514>

 cogl/cogl/cogl-onscreen.c              | 31 -------------------------------
 cogl/cogl/winsys/cogl-onscreen-glx.c   | 16 ----------------
 cogl/cogl/winsys/cogl-onscreen-glx.h   |  4 ----
 cogl/cogl/winsys/cogl-onscreen-xlib.c  | 17 -----------------
 cogl/cogl/winsys/cogl-onscreen-xlib.h  |  4 ----
 cogl/cogl/winsys/cogl-winsys-egl-x11.c |  2 --
 cogl/cogl/winsys/cogl-winsys-glx.c     |  1 -
 cogl/cogl/winsys/cogl-winsys-private.h |  4 ----
 8 files changed, 79 deletions(-)
---
diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c
index 232b575648..0cd61b206d 100644
--- a/cogl/cogl/cogl-onscreen.c
+++ b/cogl/cogl/cogl-onscreen.c
@@ -544,37 +544,6 @@ cogl_onscreen_remove_frame_callback (CoglOnscreen *onscreen,
   _cogl_closure_disconnect (closure);
 }
 
-void
-cogl_onscreen_show (CoglOnscreen *onscreen)
-{
-  CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
-  const CoglWinsysVtable *winsys;
-
-  if (!cogl_framebuffer_is_allocated (framebuffer))
-    {
-      if (!cogl_framebuffer_allocate (framebuffer, NULL))
-        return;
-    }
-
-  winsys = _cogl_framebuffer_get_winsys (framebuffer);
-  if (winsys->onscreen_set_visibility)
-    winsys->onscreen_set_visibility (onscreen, TRUE);
-}
-
-void
-cogl_onscreen_hide (CoglOnscreen *onscreen)
-{
-  CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
-
-  if (cogl_framebuffer_is_allocated (framebuffer))
-    {
-      const CoglWinsysVtable *winsys =
-        _cogl_framebuffer_get_winsys (framebuffer);
-      if (winsys->onscreen_set_visibility)
-        winsys->onscreen_set_visibility (onscreen, FALSE);
-    }
-}
-
 void
 _cogl_onscreen_notify_frame_sync (CoglOnscreen *onscreen, CoglFrameInfo *info)
 {
diff --git a/cogl/cogl/winsys/cogl-onscreen-glx.c b/cogl/cogl/winsys/cogl-onscreen-glx.c
index 1367336e28..873ff755cd 100644
--- a/cogl/cogl/winsys/cogl-onscreen-glx.c
+++ b/cogl/cogl/winsys/cogl-onscreen-glx.c
@@ -958,22 +958,6 @@ _cogl_winsys_onscreen_glx_get_window_xid (CoglOnscreen *onscreen)
   return onscreen_glx->xwin;
 }
 
-void
-_cogl_winsys_onscreen_glx_set_visibility (CoglOnscreen *onscreen,
-                                          gboolean      visibility)
-{
-  CoglOnscreenGlx *onscreen_glx = COGL_ONSCREEN_GLX (onscreen);
-  CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
-  CoglContext *context = cogl_framebuffer_get_context (framebuffer);
-  CoglXlibRenderer *xlib_renderer =
-    _cogl_xlib_renderer_get_data (context->display->renderer);
-
-  if (visibility)
-    XMapWindow (xlib_renderer->xdpy, onscreen_glx->xwin);
-  else
-    XUnmapWindow (xlib_renderer->xdpy, onscreen_glx->xwin);
-}
-
 void
 _cogl_winsys_onscreen_glx_set_resizable (CoglOnscreen *onscreen,
                                          gboolean      resizable)
diff --git a/cogl/cogl/winsys/cogl-onscreen-glx.h b/cogl/cogl/winsys/cogl-onscreen-glx.h
index 946db8e4f0..53c6ecd022 100644
--- a/cogl/cogl/winsys/cogl-onscreen-glx.h
+++ b/cogl/cogl/winsys/cogl-onscreen-glx.h
@@ -47,10 +47,6 @@ _cogl_winsys_onscreen_glx_get_buffer_age (CoglOnscreen *onscreen);
 uint32_t
 _cogl_winsys_onscreen_glx_get_window_xid (CoglOnscreen *onscreen);
 
-void
-_cogl_winsys_onscreen_glx_set_visibility (CoglOnscreen *onscreen,
-                                          gboolean      visibility);
-
 void
 _cogl_winsys_onscreen_glx_set_resizable (CoglOnscreen *onscreen,
                                          gboolean      resizable);
diff --git a/cogl/cogl/winsys/cogl-onscreen-xlib.c b/cogl/cogl/winsys/cogl-onscreen-xlib.c
index 8eaf1976dd..b3a1664f8b 100644
--- a/cogl/cogl/winsys/cogl-onscreen-xlib.c
+++ b/cogl/cogl/winsys/cogl-onscreen-xlib.c
@@ -196,23 +196,6 @@ cogl_onscreen_xlib_dispose (GObject *object)
     }
 }
 
-void
-_cogl_winsys_onscreen_xlib_set_visibility (CoglOnscreen *onscreen,
-                                           gboolean      visibility)
-{
-  CoglOnscreenXlib *onscreen_xlib = COGL_ONSCREEN_XLIB (onscreen);
-  CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
-  CoglContext *context = cogl_framebuffer_get_context (framebuffer);
-  CoglRenderer *renderer = context->display->renderer;
-  CoglXlibRenderer *xlib_renderer =
-    _cogl_xlib_renderer_get_data (renderer);
-
-  if (visibility)
-    XMapWindow (xlib_renderer->xdpy, onscreen_xlib->xwin);
-  else
-    XUnmapWindow (xlib_renderer->xdpy, onscreen_xlib->xwin);
-}
-
 void
 _cogl_winsys_onscreen_xlib_set_resizable (CoglOnscreen *onscreen,
                                           gboolean      resizable)
diff --git a/cogl/cogl/winsys/cogl-onscreen-xlib.h b/cogl/cogl/winsys/cogl-onscreen-xlib.h
index a04ade6696..9177d25971 100644
--- a/cogl/cogl/winsys/cogl-onscreen-xlib.h
+++ b/cogl/cogl/winsys/cogl-onscreen-xlib.h
@@ -49,10 +49,6 @@ cogl_onscreen_xlib_new (CoglContext *context,
 void
 _cogl_winsys_egl_onscreen_xlib_deinit (CoglOnscreen *onscreen);
 
-void
-_cogl_winsys_onscreen_xlib_set_visibility (CoglOnscreen *onscreen,
-                                           gboolean      visibility);
-
 void
 _cogl_winsys_onscreen_xlib_set_resizable (CoglOnscreen *onscreen,
                                           gboolean      resizable);
diff --git a/cogl/cogl/winsys/cogl-winsys-egl-x11.c b/cogl/cogl/winsys/cogl-winsys-egl-x11.c
index 1113fb1999..3d85c88d56 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl-x11.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl-x11.c
@@ -590,8 +590,6 @@ _cogl_winsys_egl_xlib_get_vtable (void)
       vtable.renderer_connect = _cogl_winsys_renderer_connect;
       vtable.renderer_disconnect = _cogl_winsys_renderer_disconnect;
 
-      vtable.onscreen_set_visibility =
-        _cogl_winsys_onscreen_xlib_set_visibility;
       vtable.onscreen_set_resizable =
         _cogl_winsys_onscreen_xlib_set_resizable;
 
diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c
index ad3eeea2fd..70da14a781 100644
--- a/cogl/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/cogl/winsys/cogl-winsys-glx.c
@@ -1472,7 +1472,6 @@ static CoglWinsysVtable _cogl_winsys_vtable =
     .onscreen_get_buffer_age = _cogl_winsys_onscreen_glx_get_buffer_age,
     .onscreen_x11_get_window_xid =
       _cogl_winsys_onscreen_glx_get_window_xid,
-    .onscreen_set_visibility = _cogl_winsys_onscreen_glx_set_visibility,
     .onscreen_set_resizable =
       _cogl_winsys_onscreen_glx_set_resizable,
 
diff --git a/cogl/cogl/winsys/cogl-winsys-private.h b/cogl/cogl/winsys/cogl-winsys-private.h
index 536ae7471e..14b21a0e04 100644
--- a/cogl/cogl/winsys/cogl-winsys-private.h
+++ b/cogl/cogl/winsys/cogl-winsys-private.h
@@ -104,10 +104,6 @@ typedef struct _CoglWinsysVtable
   void
   (*context_deinit) (CoglContext *context);
 
-  void
-  (*onscreen_set_visibility) (CoglOnscreen *onscreen,
-                              gboolean visibility);
-
   /* Optional functions */
 
   int64_t


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