egl/x11: Split declaration of dri2_format_for_depth into header platform_x11.h
authorYonggang Luo <luoyonggang@gmail.com>
Thu, 4 Aug 2022 16:00:08 +0000 (00:00 +0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 9 Aug 2022 21:02:50 +0000 (21:02 +0000)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>

src/egl/drivers/dri2/platform_x11.c
src/egl/drivers/dri2/platform_x11.h [new file with mode: 0644]
src/egl/drivers/dri2/platform_x11_dri3.h

index 7165b74..4ef9a2e 100644 (file)
@@ -44,7 +44,7 @@
 #include "util/macros.h"
 #include "util/bitscan.h"
 
-#include "egl_dri2.h"
+#include "platform_x11.h"
 #include "loader.h"
 #include "kopper_interface.h"
 
@@ -55,9 +55,6 @@
 static EGLBoolean
 dri2_x11_swap_interval(_EGLDisplay *disp, _EGLSurface *surf, EGLint interval);
 
-uint32_t
-dri2_format_for_depth(struct dri2_egl_display *dri2_dpy, uint32_t depth);
-
 static void
 swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
                      struct dri2_egl_surface * dri2_surf)
diff --git a/src/egl/drivers/dri2/platform_x11.h b/src/egl/drivers/dri2/platform_x11.h
new file mode 100644 (file)
index 0000000..b54781d
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2022 Yonggang Luo
+ * SPDX-License-Identifier: MIT
+ *
+ */
+
+#ifndef EGL_X11_INCLUDED
+#define EGL_X11_INCLUDED
+
+#include "egl_dri2.h"
+
+uint32_t
+dri2_format_for_depth(struct dri2_egl_display *dri2_dpy, uint32_t depth);
+
+#endif
index f60d1df..a804733 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef EGL_X11_DRI3_INCLUDED
 #define EGL_X11_DRI3_INCLUDED
 
-#include "egl_dri2.h"
+#include "platform_x11.h"
 
 _EGL_DRIVER_TYPECAST(dri3_egl_surface, _EGLSurface, obj)
 
@@ -38,7 +38,4 @@ extern struct dri2_egl_display_vtbl dri3_x11_display_vtbl;
 EGLBoolean
 dri3_x11_connect(struct dri2_egl_display *dri2_dpy);
 
-uint32_t
-dri2_format_for_depth(struct dri2_egl_display *dri2_dpy, uint32_t depth);
-
 #endif