From a94b4f1b1483b8cace0e34dd979c868e50770dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 29 Jun 2020 19:53:36 +0200 Subject: [PATCH] Remove explicit tracking of QOpenGLContext in QWindowsGLContext QPlatformOpenGLContext takes care of that via QPlatformOpenGLContextPrivate, which is set up in QOpenGLContext::create(). Change-Id: I1088c2e18efe6023c8e76f126d967a607746e980 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 1 - src/plugins/platforms/windows/qwindowsglcontext.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index b2ac2e3476..4b866f16c5 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -1052,7 +1052,6 @@ QOpenGLStaticContext *QOpenGLStaticContext::create(bool softwareRendering) QWindowsGLContext::QWindowsGLContext(QOpenGLStaticContext *staticContext, QOpenGLContext *context) : m_staticContext(staticContext), - m_context(context), m_renderingContext(nullptr), m_pixelFormat(0), m_extensionsUsed(false), diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h index 8794368fe4..d0b87cac7d 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.h +++ b/src/plugins/platforms/windows/qwindowsglcontext.h @@ -204,7 +204,7 @@ class QWindowsGLContext : public QWindowsOpenGLContext public: explicit QWindowsGLContext(QOpenGLStaticContext *staticContext, QOpenGLContext *context); ~QWindowsGLContext() override; - bool isSharing() const override { return m_context->shareHandle(); } + bool isSharing() const override { return context()->shareHandle(); } bool isValid() const override { return m_renderingContext && !m_lost; } QSurfaceFormat format() const override { return m_obtainedFormat; } @@ -228,7 +228,6 @@ private: bool updateObtainedParams(HDC hdc, int *obtainedSwapInterval = nullptr); QOpenGLStaticContext *m_staticContext; - QOpenGLContext *m_context; QSurfaceFormat m_obtainedFormat; HGLRC m_renderingContext; std::vector m_windowContexts;