From a13e8d6660913bec172d1374f78083498c539df0 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 21 Jan 2020 15:21:00 +0100 Subject: 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 Reviewed-by: Qt CI Bot --- src/plugins/platforms/wasm/qwasmintegration.cpp | 2 ++ src/plugins/platforms/wasm/wasm.pro | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/plugins/platforms/wasm') diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index fd53cd0bae..ce83ad4e2f 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -41,6 +41,7 @@ #include "qwasmwindow.h" #ifndef QT_NO_OPENGL # include "qwasmbackingstore.h" +# include #endif #include "qwasmfontdatabase.h" #if defined(Q_OS_UNIX) @@ -185,6 +186,7 @@ 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/wasm/wasm.pro b/src/plugins/platforms/wasm/wasm.pro index c8b28fb37d..1aee4a3e58 100644 --- a/src/plugins/platforms/wasm/wasm.pro +++ b/src/plugins/platforms/wasm/wasm.pro @@ -4,6 +4,8 @@ QT += \ core-private gui-private \ eventdispatcher_support-private fontdatabase_support-private egl_support-private +qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private + # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 -- cgit v1.2.3