diff --git a/plugins/qpa/abstractplatformcontext.cpp b/plugins/qpa/abstractplatformcontext.cpp index 1acd8464cd..af4d539d27 100644 --- a/plugins/qpa/abstractplatformcontext.cpp +++ b/plugins/qpa/abstractplatformcontext.cpp @@ -96,9 +96,8 @@ static QSurfaceFormat formatFromConfig(EGLDisplay dpy, EGLConfig config) return format; } -AbstractPlatformContext::AbstractPlatformContext(QOpenGLContext *context, Integration *integration, EGLDisplay display, EGLConfig config) +AbstractPlatformContext::AbstractPlatformContext(QOpenGLContext *context, EGLDisplay display, EGLConfig config) : QPlatformOpenGLContext() - , m_integration(integration) , m_eglDisplay(display) , m_config(config ? config :configFromGLFormat(m_eglDisplay, context->format())) , m_format(formatFromConfig(m_eglDisplay, m_config)) diff --git a/plugins/qpa/abstractplatformcontext.h b/plugins/qpa/abstractplatformcontext.h index 5fe7872e90..5474fceece 100644 --- a/plugins/qpa/abstractplatformcontext.h +++ b/plugins/qpa/abstractplatformcontext.h @@ -33,7 +33,7 @@ class Integration; class AbstractPlatformContext : public QPlatformOpenGLContext { public: - explicit AbstractPlatformContext(QOpenGLContext *context, Integration *integration, EGLDisplay display, EGLConfig config = nullptr); + explicit AbstractPlatformContext(QOpenGLContext *context, EGLDisplay display, EGLConfig config = nullptr); virtual ~AbstractPlatformContext(); void doneCurrent() override; @@ -55,7 +55,6 @@ protected: void createContext(EGLContext shareContext = EGL_NO_CONTEXT); private: - Integration *m_integration; EGLDisplay m_eglDisplay; EGLConfig m_config; EGLContext m_context = EGL_NO_CONTEXT; diff --git a/plugins/qpa/integration.cpp b/plugins/qpa/integration.cpp index e0272f25a3..6f7d790060 100644 --- a/plugins/qpa/integration.cpp +++ b/plugins/qpa/integration.cpp @@ -185,13 +185,13 @@ QPlatformNativeInterface *Integration::nativeInterface() const QPlatformOpenGLContext *Integration::createPlatformOpenGLContext(QOpenGLContext *context) const { if (kwinApp()->platform()->supportsQpaContext()) { - return new SharingPlatformContext(context, const_cast(this)); + return new SharingPlatformContext(context); } if (kwinApp()->platform()->sceneEglDisplay() != EGL_NO_DISPLAY) { auto s = kwinApp()->platform()->sceneEglSurface(); if (s != EGL_NO_SURFACE) { // try a SharingPlatformContext with a created surface - return new SharingPlatformContext(context, const_cast(this), s, kwinApp()->platform()->sceneEglConfig()); + return new SharingPlatformContext(context, s, kwinApp()->platform()->sceneEglConfig()); } } if (m_eglDisplay == EGL_NO_DISPLAY) { diff --git a/plugins/qpa/sharingplatformcontext.cpp b/plugins/qpa/sharingplatformcontext.cpp index 681093daa4..895da23b47 100644 --- a/plugins/qpa/sharingplatformcontext.cpp +++ b/plugins/qpa/sharingplatformcontext.cpp @@ -33,13 +33,13 @@ namespace KWin namespace QPA { -SharingPlatformContext::SharingPlatformContext(QOpenGLContext *context, Integration *integration) - : SharingPlatformContext(context, integration, EGL_NO_SURFACE) +SharingPlatformContext::SharingPlatformContext(QOpenGLContext *context) + : SharingPlatformContext(context, EGL_NO_SURFACE) { } -SharingPlatformContext::SharingPlatformContext(QOpenGLContext *context, Integration *integration, const EGLSurface &surface, EGLConfig config) - : AbstractPlatformContext(context, integration, kwinApp()->platform()->sceneEglDisplay(), config) +SharingPlatformContext::SharingPlatformContext(QOpenGLContext *context, const EGLSurface &surface, EGLConfig config) + : AbstractPlatformContext(context, kwinApp()->platform()->sceneEglDisplay(), config) , m_surface(surface) { create(); diff --git a/plugins/qpa/sharingplatformcontext.h b/plugins/qpa/sharingplatformcontext.h index 9c40f9f37d..1a0f72cb77 100644 --- a/plugins/qpa/sharingplatformcontext.h +++ b/plugins/qpa/sharingplatformcontext.h @@ -31,8 +31,8 @@ class Integration; class SharingPlatformContext : public AbstractPlatformContext { public: - explicit SharingPlatformContext(QOpenGLContext *context, Integration *integration); - explicit SharingPlatformContext(QOpenGLContext *context, Integration *integration, const EGLSurface &surface, EGLConfig config = nullptr); + explicit SharingPlatformContext(QOpenGLContext *context); + explicit SharingPlatformContext(QOpenGLContext *context, const EGLSurface &surface, EGLConfig config = nullptr); void swapBuffers(QPlatformSurface *surface) override;