Module: Mesa
Branch: main
Commit: 94cfa50dc67e264e621d3003030c0ed40c8a2802
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=94cfa50dc67e264e621d3003030c0ed40c8a2802

Author: Yonggang Luo <[email protected]>
Date:   Fri Aug  5 00:00:08 2022 +0800

egl/x11: Split declaration of dri2_format_for_depth into header platform_x11.h

Signed-off-by: Yonggang Luo <[email protected]>
Acked-by: Eric Engestrom <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>

---

 src/egl/drivers/dri2/platform_x11.c      |  5 +----
 src/egl/drivers/dri2/platform_x11.h      | 15 +++++++++++++++
 src/egl/drivers/dri2/platform_x11_dri3.h |  5 +----
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index 7165b740710..4ef9a2e19bf 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -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
index 00000000000..b54781daa38
--- /dev/null
+++ b/src/egl/drivers/dri2/platform_x11.h
@@ -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
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.h 
b/src/egl/drivers/dri2/platform_x11_dri3.h
index f60d1df641a..a8047330aa9 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.h
+++ b/src/egl/drivers/dri2/platform_x11_dri3.h
@@ -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

Reply via email to