winsys/xlib: move xlib_create_sw_winsys within the winsys
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 13 Feb 2014 15:24:16 +0000 (15:24 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 22 Feb 2014 03:26:28 +0000 (03:26 +0000)
v2: Rebase on top of vl_winsys_xsp.c removal
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
src/gallium/include/state_tracker/xlib_sw_winsys.h [deleted file]
src/gallium/include/state_tracker/xlibsw_api.h [new file with mode: 0644]
src/gallium/state_trackers/egl/Makefile.am
src/gallium/state_trackers/egl/SConscript
src/gallium/state_trackers/egl/x11/native_ximage.c
src/gallium/state_trackers/glx/xlib/xm_api.h
src/gallium/targets/graw-xlib/SConscript
src/gallium/targets/graw-xlib/graw_xlib.c
src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
src/gallium/winsys/sw/xlib/xlib_sw_winsys.h [new file with mode: 0644]

index 7f3f93befffd9427227aac8fcf3a083f93652f9e..90d2975fd436bc5103db546c539075c3ee8b4144 100644 (file)
@@ -30,8 +30,8 @@
 #include "util/u_memory.h"
 #include "util/u_dl.h"
 #include "sw/null/null_sw_winsys.h"
+#include "sw/xlib/xlib_sw_winsys.h"
 #include "target-helpers/inline_sw_helper.h"
-#include "state_tracker/xlib_sw_winsys.h"
 
 struct pipe_loader_sw_device {
    struct pipe_loader_device base;
diff --git a/src/gallium/include/state_tracker/xlib_sw_winsys.h b/src/gallium/include/state_tracker/xlib_sw_winsys.h
deleted file mode 100644 (file)
index 4e7ccc1..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef XLIB_SW_WINSYS_H
-#define XLIB_SW_WINSYS_H
-
-#include "state_tracker/sw_winsys.h"
-#include <X11/Xlib.h>
-
-
-struct pipe_screen;
-struct pipe_resource;
-
-/* This is what the xlib software winsys expects to find in the
- * "private" field of flush_frontbuffers().
- *
- * Xlib-based state trackers somehow need to know this.
- */
-struct xlib_drawable {
-   Visual *visual;
-   int depth;
-   Drawable drawable;
-};
-
-
-/* This is the public interface to the ws/xlib module.  Why isn't it
- * being defined in that directory?
- */
-struct sw_winsys *xlib_create_sw_winsys( Display *display );
-
-
-#endif
diff --git a/src/gallium/include/state_tracker/xlibsw_api.h b/src/gallium/include/state_tracker/xlibsw_api.h
new file mode 100644 (file)
index 0000000..9301279
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef XLIB_SW_WINSYS_H
+#define XLIB_SW_WINSYS_H
+
+#include "state_tracker/sw_winsys.h"
+#include <X11/Xlib.h>
+
+
+/* This is what the xlib software winsys expects to find in the
+ * "private" field of flush_frontbuffers().
+ *
+ * Xlib-based state trackers somehow need to know this.
+ */
+struct xlib_drawable {
+   Visual *visual;
+   int depth;
+   Drawable drawable;
+};
+
+#endif
index 9c00f06a1c460cede5279e8ff64cbcc24481a436..26266ed2b6daf0cb308d52c7667a6a5ec2a40441 100644 (file)
@@ -42,6 +42,7 @@ AM_CFLAGS += \
        $(LIBDRM_CFLAGS) \
        $(DRI2PROTO_CFLAGS)
 AM_CPPFLAGS += \
+       -I$(top_srcdir)/src/gallium/winsys \
        -I$(top_srcdir)/src/gallium/drivers \
        -I$(top_srcdir)/src/glx \
        -I$(top_srcdir)/src/mapi \
index 066a7fd9a92cb9e2cc1f8961c23be21e8604f38b..3ddf0bca48996c87a061acfd317c8b486c1a6a18 100644 (file)
@@ -7,6 +7,7 @@ env = env.Clone()
 
 env.Append(CPPPATH = [
     '#/src/egl/main',
+    '#/src/gallium/winsys',
     '#/src/gallium/winsys/sw',
     '.',
 ])
index 019e53551287926e42eb60eebd76b461d86008f0..d3d19245aa369fc73b4dc4815ae176b6472d3272 100644 (file)
@@ -29,7 +29,8 @@
 #include "util/u_format.h"
 #include "pipe/p_compiler.h"
 #include "util/u_inlines.h"
-#include "state_tracker/xlib_sw_winsys.h"
+#include "state_tracker/xlibsw_api.h"
+#include "sw/xlib/xlib_sw_winsys.h"
 #include "util/u_debug.h"
 #include "egllog.h"
 
index fa97ea4de01757793c4ddbac60727cf774a29bf6..6d0bc3f4d818fa6abb18c710c6776e2de7368ffa 100644 (file)
@@ -61,7 +61,7 @@ and create a window, you must do the following to use the X/Mesa interface:
 #include "state_tracker/st_api.h"
 #include "os/os_thread.h"
 
-#include "state_tracker/xlib_sw_winsys.h"
+#include "state_tracker/xlibsw_api.h"
 
 # include <X11/Xlib.h>
 # include <X11/Xlibint.h>
index 9cbe7bb3c0529f13a0e9ff4cb460e6db477a5e00..76e4d4fd64ee409f62720f28d890d562b4bc814a 100644 (file)
@@ -16,6 +16,7 @@ env.Append(LIBPATH = env['X11_LIBPATH'])
 env.Append(CPPPATH = [
     '#src/gallium/drivers',
     '#src/gallium/include/state_tracker',
+    '#src/gallium/winsys',
 ])
 
 env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE', 'GALLIUM_GALAHAD'])
index 148837c5e7ac2b808e2e8e2bd3f3fa9834444432..db2637bd3c923883068733c75aa244d321e8ff82 100644 (file)
@@ -5,8 +5,9 @@
 #include "util/u_memory.h"
 #include "target-helpers/inline_sw_helper.h"
 #include "target-helpers/inline_debug_helper.h"
-#include "state_tracker/xlib_sw_winsys.h"
+#include "state_tracker/xlibsw_api.h"
 #include "state_tracker/graw.h"
+#include "sw/xlib/xlib_sw_winsys.h"
 
 #include <X11/Xlib.h>
 #include <X11/Xlibint.h>
index bf246bc5d1d11bbdfb40d0bbb4ff6843a41b7891..883107180495e3163cc999797546e63065f8c747 100644 (file)
@@ -39,7 +39,8 @@
 #include "util/u_math.h"
 #include "util/u_memory.h"
 
-#include "state_tracker/xlib_sw_winsys.h"
+#include "state_tracker/xlibsw_api.h"
+#include "xlib_sw_winsys.h"
 
 #include <X11/Xlib.h>
 #include <X11/Xlibint.h>
diff --git a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.h b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.h
new file mode 100644 (file)
index 0000000..0a1dad1
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef XLIB_SW_WINSYS
+#define XLIB_SW_WINSYS
+
+#include <X11/Xlib.h>
+
+struct sw_winsys;
+
+struct sw_winsys *xlib_create_sw_winsys(Display *display);
+
+#endif