qpa: Remove Window::eglSurface()

Surfaceless contexts are required now, so hardcode the egl surface in
the relevant place to tidy the api of the Window.
This commit is contained in:
Vlad Zahorodnii 2023-08-05 15:02:46 +03:00
parent 1687183d4d
commit 7c24242300
3 changed files with 1 additions and 9 deletions

View file

@ -61,7 +61,7 @@ EGLPlatformContext::~EGLPlatformContext()
static EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface)
{
if (surface->surface()->surfaceClass() == QSurface::Window) {
return static_cast<Window *>(surface)->eglSurface();
return EGL_NO_SURFACE; // EGL_KHR_surfaceless_context is required
} else {
return static_cast<OffscreenSurface *>(surface)->eglSurface();
}

View file

@ -137,10 +137,5 @@ void Window::unmap()
invalidateSurface();
}
EGLSurface Window::eglSurface() const
{
return EGL_NO_SURFACE; // EGL_KHR_surfaceless_context is required.
}
}
}

View file

@ -9,8 +9,6 @@
*/
#pragma once
#include <epoxy/egl.h>
#include <QPointer>
#include <qpa/qplatformwindow.h>
@ -39,7 +37,6 @@ public:
void requestActivateWindow() override;
InternalWindow *internalWindow() const;
EGLSurface eglSurface() const;
Swapchain *swapchain();
private: