[mutter] cogl: Move _cogl_xlib_get_damage_base near its only consumer



commit b3980f7a9415881b3a79e1a7e2da447ebf021a8d
Author: Adam Jackson <ajax redhat com>
Date:   Thu Oct 24 15:41:49 2019 -0400

    cogl: Move _cogl_xlib_get_damage_base near its only consumer
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/885

 cogl/cogl/cogl-xlib-private.h              |  3 --
 cogl/cogl/cogl-xlib.c                      | 63 ------------------------------
 cogl/cogl/meson.build                      |  1 -
 cogl/cogl/winsys/cogl-texture-pixmap-x11.c | 13 ++++++
 4 files changed, 13 insertions(+), 67 deletions(-)
---
diff --git a/cogl/cogl/cogl-xlib-private.h b/cogl/cogl/cogl-xlib-private.h
index 8bf23a7e1..317163fb2 100644
--- a/cogl/cogl/cogl-xlib-private.h
+++ b/cogl/cogl/cogl-xlib-private.h
@@ -45,7 +45,4 @@ struct _CoglXlibTrapState
   CoglXlibTrapState *old_state;
 };
 
-int
-_cogl_xlib_get_damage_base (void);
-
 #endif /* __COGL_XLIB_PRIVATE_H */
diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build
index f6c61f8c8..e4445c815 100644
--- a/cogl/cogl/meson.build
+++ b/cogl/cogl/meson.build
@@ -386,7 +386,6 @@ if have_x11
     'cogl-xlib-private.h',
     'cogl-xlib-renderer-private.h',
     'cogl-xlib-renderer.c',
-    'cogl-xlib.c',
     'winsys/cogl-texture-pixmap-x11-private.h',
     'winsys/cogl-texture-pixmap-x11.c',
   ]
diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
index 7b802d54f..b7eafab64 100644
--- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -49,6 +49,8 @@
 #include "cogl-renderer-private.h"
 #include "cogl-object-private.h"
 #include "cogl-xlib.h"
+#include "cogl-xlib-renderer-private.h"
+#include "cogl-x11-renderer-private.h"
 #include "cogl-private.h"
 #include "cogl-gtype-private.h"
 #include "driver/gl/cogl-texture-gl-private.h"
@@ -230,6 +232,17 @@ process_damage_event (CoglTexturePixmapX11 *tex_pixmap,
     }
 }
 
+static int
+_cogl_xlib_get_damage_base (void)
+{
+  CoglX11Renderer *x11_renderer;
+  _COGL_GET_CONTEXT (ctxt, -1);
+
+  x11_renderer =
+    (CoglX11Renderer *) _cogl_xlib_renderer_get_data (ctxt->display->renderer);
+  return x11_renderer->damage_base;
+}
+
 static CoglFilterReturn
 _cogl_texture_pixmap_x11_filter (XEvent *event, void *data)
 {


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