diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-01-21 15:21:00 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-02-03 22:05:44 +0100 |
commit | a13e8d6660913bec172d1374f78083498c539df0 (patch) | |
tree | b1a2572fb71a9a896825e2cbbf9653abd9797d0d /src/plugins/platforms/ios/qiosintegration.mm | |
parent | c6e1b54f94e84950ee12c3bb2be0641f5742056b (diff) |
Move backing store OpenGL support to the platformcompositor module
QPlatformBackingStore had a dependency on the QOpenGLTextureBlitter, which is a
problem because we want to get rid of all the public QOpenGL* classes in the
gui module.
This splits the heavily QOpenGL dependent parts of the backing store
implementation into a separate class and moves it to the platformcompositor
module.
qplatformbackingstore.cpp is now mostly free from OpenGL implementation
details.
Platform integrations now have to explicitly request backing store OpenGL
support. This has been done for:
- xcb
- windows
- cocoa
- winrt
- android
- wasm
- ios
QPlatformGraphicsBufferHelper::lockAndBindToTexture is now exported so it can
be used from other modules.
Task-number: QTBUG-74409
Change-Id: I42ad9250e5a424939cf751a8ad880c7381ede2ae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platforms/ios/qiosintegration.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.mm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index 9eca0eaad3..d724e65717 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -65,6 +65,10 @@ #import <AudioToolbox/AudioServices.h> +#if QT_CONFIG(opengl) +#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h> +#endif + #include <QtDebug> QT_BEGIN_NAMESPACE @@ -186,7 +190,11 @@ 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 { - return new QIOSBackingStore(window); + auto *backingStore = new QIOSBackingStore(window); +#if QT_CONFIG(opengl) + backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore)); +#endif + return backingStore; } // Used when the QWindow's surface type is set by the client to QSurface::OpenGLSurface |