wayland: Don't pass GL config to get_egl_surface()

There's only one GL config.
This commit is contained in:
Benjamin Otte
2021-07-04 20:55:53 +02:00
parent 7cd4282bad
commit ba3e80cbfa
4 changed files with 12 additions and 11 deletions

View File

@@ -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);
@@ -583,7 +582,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)

View File

@@ -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);

View File

@@ -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;

View File

@@ -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