[gtk/wip/otte/gleanup] wayland: Don't pass GL config to get_egl_surface()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gleanup] wayland: Don't pass GL config to get_egl_surface()
- Date: Mon, 5 Jul 2021 00:06:46 +0000 (UTC)
commit 3bd3797214ea843d0a8ac8bd3efe2ffae9ec25d2
Author: Benjamin Otte <otte redhat com>
Date: Sun Jul 4 20:55:53 2021 +0200
wayland: Don't pass GL config to get_egl_surface()
There's only one GL config.
gdk/wayland/gdkglcontext-wayland.c | 11 +++++------
gdk/wayland/gdkprivate-wayland.h | 2 --
gdk/wayland/gdksurface-wayland.c | 5 ++---
gdk/wayland/gdksurface-wayland.h | 5 +++++
4 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index db3bab8ddc..e96da8f1cd 100644
--- a/gdk/wayland/gdkglcontext-wayland.c
+++ b/gdk/wayland/gdkglcontext-wayland.c
@@ -22,7 +22,9 @@
#include "config.h"
#include "gdkglcontext-wayland.h"
+
#include "gdkdisplay-wayland.h"
+#include "gdksurface-wayland.h"
#include "gdkwaylanddisplay.h"
#include "gdkwaylandglcontext.h"
@@ -219,8 +221,7 @@ gdk_wayland_gl_context_get_damage (GdkGLContext *context)
if (shared == NULL)
shared = context;
- egl_surface = gdk_wayland_surface_get_egl_surface (surface,
- display_wayland->egl_config);
+ egl_surface = gdk_wayland_surface_get_egl_surface (surface);
gdk_gl_context_make_current (shared);
eglQuerySurface (display_wayland->egl_display, egl_surface,
EGL_BUFFER_AGE_EXT, &buffer_age);
@@ -270,9 +271,7 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
gdk_gl_context_make_current (context);
- egl_surface = gdk_wayland_surface_get_egl_surface (surface,
- display_wayland->egl_config);
-
+ egl_surface = gdk_wayland_surface_get_egl_surface (surface);
gdk_wayland_surface_sync (surface);
gdk_wayland_surface_request_frame (surface);
@@ -581,7 +580,7 @@ gdk_wayland_display_make_gl_context_current (GdkDisplay *display,
surface = gdk_gl_context_get_surface (context);
if (context_wayland->is_attached || gdk_draw_context_is_in_frame (GDK_DRAW_CONTEXT (context)))
- egl_surface = gdk_wayland_surface_get_egl_surface (surface, display_wayland->egl_config);
+ egl_surface = gdk_wayland_surface_get_egl_surface (surface);
else
{
if (display_wayland->have_egl_surfaceless_context)
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index 908288e877..2177cef90d 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -182,8 +182,6 @@ cairo_surface_t * _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *di
struct wl_buffer *_gdk_wayland_shm_surface_get_wl_buffer (cairo_surface_t *surface);
gboolean _gdk_wayland_is_shm_surface (cairo_surface_t *surface);
-EGLSurface gdk_wayland_surface_get_egl_surface (GdkSurface *surface,
- EGLConfig config);
EGLSurface gdk_wayland_surface_get_dummy_egl_surface (GdkSurface *surface,
EGLConfig config);
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 124bcdd1b7..124b810394 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -4304,8 +4304,7 @@ gdk_wayland_surface_get_wl_egl_window (GdkSurface *surface)
}
EGLSurface
-gdk_wayland_surface_get_egl_surface (GdkSurface *surface,
- EGLConfig config)
+gdk_wayland_surface_get_egl_surface (GdkSurface *surface)
{
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
GdkWaylandSurface *impl;
@@ -4320,7 +4319,7 @@ gdk_wayland_surface_get_egl_surface (GdkSurface *surface,
egl_window = gdk_wayland_surface_get_wl_egl_window (surface);
impl->egl_surface =
- eglCreateWindowSurface (display->egl_display, config, egl_window, NULL);
+ eglCreateWindowSurface (display->egl_display, display->egl_config, egl_window, NULL);
}
return impl->egl_surface;
diff --git a/gdk/wayland/gdksurface-wayland.h b/gdk/wayland/gdksurface-wayland.h
index 8efa4be04d..cd2b1f3e9a 100644
--- a/gdk/wayland/gdksurface-wayland.h
+++ b/gdk/wayland/gdksurface-wayland.h
@@ -22,6 +22,9 @@
#include "gdkwaylandsurface.h"
+#include <wayland-egl.h>
+#include <epoxy/egl.h>
+
G_BEGIN_DECLS
void gdk_wayland_toplevel_set_dbus_properties (GdkToplevel *toplevel,
@@ -38,4 +41,6 @@ void gdk_wayland_toplevel_announce_ssd (GdkTopl
gboolean gdk_wayland_toplevel_inhibit_idle (GdkToplevel *toplevel);
void gdk_wayland_toplevel_uninhibit_idle (GdkToplevel *toplevel);
+EGLSurface gdk_wayland_surface_get_egl_surface (GdkSurface *surface);
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]