diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-04-01 18:49:59 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-05-29 19:01:57 +0200 |
commit | b39f33e311b603c6835b919778100e60759fa870 (patch) | |
tree | 4e84e3623060a7213be82696cf6c6d4fea11423c /src/plugins/platforms | |
parent | c4e09cf26790d6d293efd0e389517dcaf7f34d85 (diff) |
Move QPlatformBackingStoreOpenGLSupport handling out of platform plugins
Allows them to not depend on QtOpenGL just to provide the default
backing store OpenGL support backend.
Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms')
8 files changed, 4 insertions, 33 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index aa57cb18f9..50ab772d5a 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -289,11 +289,7 @@ QPlatformBackingStore *QAndroidPlatformIntegration::createPlatformBackingStore(Q if (!QtAndroid::activity()) return nullptr; - auto *backingStore = new QAndroidPlatformBackingStore(window); -#if QT_CONFIG(opengl) - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); -#endif // QT_CONFIG(opengl) - return backingStore; + return new QAndroidPlatformBackingStore(window); } QPlatformOpenGLContext *QAndroidPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index eed276aed3..087835bd81 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -98,8 +98,6 @@ QT += \ core-private gui-private \ theme_support-private -qtConfig(opengl): QT += opengl-private - CONFIG += no_app_extension_api_only qtHaveModule(widgets) { diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 1fbe09fa9c..6b97eb710b 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -68,10 +68,6 @@ #include <QtGui/private/qfontengine_coretext_p.h> -#if QT_CONFIG(opengl) -#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h> -#endif - #ifdef QT_WIDGETS_LIB #include <QtWidgets/qtwidgetsglobal.h> #if QT_CONFIG(filedialog) @@ -333,9 +329,6 @@ QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *wi else backingStore = new QNSWindowBackingStore(window); -#if QT_CONFIG(opengl) - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); -#endif return backingStore; } diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index 8b68c83eef..7352e68562 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -191,11 +191,7 @@ QPlatformWindow *QIOSIntegration::createPlatformWindow(QWindow *window) const // Used when the QWindow's surface type is set by the client to QSurface::RasterSurface QPlatformBackingStore *QIOSIntegration::createPlatformBackingStore(QWindow *window) const { - auto *backingStore = new QIOSBackingStore(window); -#if QT_CONFIG(opengl) - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); -#endif - return backingStore; + return new QIOSBackingStore(window); } // Used when the QWindow's surface type is set by the client to QSurface::OpenGLSurface diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index fd76f64dc9..24741f11ae 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -181,7 +181,6 @@ QPlatformBackingStore *QWasmIntegration::createPlatformBackingStore(QWindow *win #ifndef QT_NO_OPENGL QWasmCompositor *compositor = QWasmScreen::get(window->screen())->compositor(); QWasmBackingStore *backingStore = new QWasmBackingStore(compositor, window); - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); m_backingStores.insert(window, backingStore); return backingStore; #else diff --git a/src/plugins/platforms/windows/qwindowsgdiintegration.cpp b/src/plugins/platforms/windows/qwindowsgdiintegration.cpp index 3b25840e16..bb24060dbe 100644 --- a/src/plugins/platforms/windows/qwindowsgdiintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsgdiintegration.cpp @@ -77,11 +77,7 @@ QPlatformPixmap *QWindowsGdiIntegration::createPlatformPixmap(QPlatformPixmap::P QPlatformBackingStore *QWindowsGdiIntegration::createPlatformBackingStore(QWindow *window) const { - auto *backingStore = new QWindowsBackingStore(window); -#ifndef QT_NO_OPENGL - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); -#endif - return backingStore; + return new QWindowsBackingStore(window); } QT_END_NAMESPACE diff --git a/src/plugins/platforms/winrt/qwinrtintegration.cpp b/src/plugins/platforms/winrt/qwinrtintegration.cpp index 0f76d7d65b..0d87832176 100644 --- a/src/plugins/platforms/winrt/qwinrtintegration.cpp +++ b/src/plugins/platforms/winrt/qwinrtintegration.cpp @@ -208,11 +208,7 @@ QPlatformWindow *QWinRTIntegration::createPlatformWindow(QWindow *window) const QPlatformBackingStore *QWinRTIntegration::createPlatformBackingStore(QWindow *window) const { - auto *backingStore = new QWinRTBackingStore(window); -#if QT_CONFIG(opengl) - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); -#endif - return backingStore; + return new QWinRTBackingStore(window); } QPlatformOpenGLContext *QWinRTIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 986ba862e5..c2109f8993 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -304,9 +304,6 @@ QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *wind backingStore = new QXcbBackingStore(window); } Q_ASSERT(backingStore); -#ifndef QT_NO_OPENGL - backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); -#endif return backingStore; } |