Move QtPlatformCompositorSupport into QtOpenGL

Task-number: QTBUG-83255
Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-03-31 15:27:11 +02:00
parent d80a98d525
commit 7172b5112e
39 changed files with 61 additions and 99 deletions

View File

@ -31,6 +31,8 @@ qt_add_module(OpenGL
qopenglvertexarrayobject.cpp qopenglvertexarrayobject.h
qopenglwindow.cpp qopenglwindow.h
qtopenglglobal.h
qplatformbackingstoreopenglsupport.cpp qplatformbackingstoreopenglsupport.h
DEFINES
QT_NO_FOREACH
QT_NO_USING_NAMESPACE
@ -92,6 +94,12 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_vulkan
Vulkan::Vulkan_nolink
)
qt_extend_target(OpenGL CONDITION QT_FEATURE_egl
SOURCES
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
qopenglcompositor.cpp qopenglcompositor_p.h
)
qt_add_docs(OpenGL
doc/qtopengl.qdocconf
)

View File

@ -37,7 +37,8 @@ HEADERS += \
qopenglversionprofile.h \
qopenglvertexarrayobject.h \
qopenglwindow.h \
qtopenglglobal.h
qtopenglglobal.h \
qplatformbackingstoreopenglsupport.h
SOURCES += \
qopengl2pexvertexarray.cpp \
@ -61,7 +62,8 @@ SOURCES += \
qopenglversionprofile.cpp \
qopenglvertexarrayobject.cpp \
qopenglwindow.cpp \
qopengldebug.cpp
qopengldebug.cpp \
qplatformbackingstoreopenglsupport.cpp
!qtConfig(opengles2) {
HEADERS += \
@ -139,4 +141,14 @@ qtConfig(vulkan) {
QMAKE_USE += vulkan/nolink
}
qtConfig(egl) {
SOURCES += \
qopenglcompositorbackingstore.cpp \
qopenglcompositor.cpp
HEADERS += \
qopenglcompositorbackingstore_p.h \
qopenglcompositor_p.h
}
load(qt_module)

View File

@ -51,6 +51,8 @@
// We mean it.
//
#include <QtOpenGL/qtopenglglobal.h>
#include <QtCore/QTimer>
#include <QtOpenGL/QOpenGLTextureBlitter>
#include <QtGui/QMatrix4x4>
@ -72,7 +74,7 @@ public:
virtual void endCompositing() { }
};
class QOpenGLCompositor : public QObject
class Q_OPENGL_EXPORT QOpenGLCompositor : public QObject
{
Q_OBJECT

View File

@ -51,6 +51,8 @@
// We mean it.
//
#include <QtOpenGL/qtopenglglobal.h>
#include <qpa/qplatformbackingstore.h>
#include <QImage>
#include <QRegion>
@ -60,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLContext;
class QPlatformTextureList;
class QOpenGLCompositorBackingStore : public QPlatformBackingStore
class Q_OPENGL_EXPORT QOpenGLCompositorBackingStore : public QPlatformBackingStore
{
public:
QOpenGLCompositorBackingStore(QWindow *window);

View File

@ -51,7 +51,7 @@
#ifndef QT_NO_OPENGL
#include <QtGui/qtguiglobal.h>
#include <QtOpenGL/qtopenglglobal.h>
#include <qpa/qplatformbackingstore.h>
#include <QtGui/QOpenGLContext>
@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLTextureBlitter;
class QOpenGLBackingStore;
class QPlatformBackingStoreOpenGLSupport : public QPlatformBackingStoreOpenGLSupportBase
class Q_OPENGL_EXPORT QPlatformBackingStoreOpenGLSupport : public QPlatformBackingStoreOpenGLSupportBase
{
public:
explicit QPlatformBackingStoreOpenGLSupport(QPlatformBackingStore *backingStore) : backingStore(backingStore) {}

View File

@ -19,9 +19,6 @@ endif()
if(QT_FEATURE_xcb OR (UNIX AND NOT UIKIT))
add_subdirectory(services)
endif()
if(QT_FEATURE_opengl)
add_subdirectory(platformcompositor)
endif()
if(QT_FEATURE_egl)
add_subdirectory(eglconvenience)
endif()

View File

@ -1,23 +0,0 @@
# Generated from platformcompositor.pro.
#####################################################################
## PlatformCompositorSupport Module:
#####################################################################
qt_add_module(PlatformCompositorSupport
STATIC
INTERNAL_MODULE
SOURCES
qopenglcompositor.cpp qopenglcompositor_p.h
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
qplatformbackingstoreopenglsupport.cpp qplatformbackingstoreopenglsupport.h
DEFINES
QT_NO_CAST_FROM_ASCII
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::OpenGL
)
#### Keys ignored in scope 1:.:.:platformcompositor.pro:<TRUE>:
# MODULE = "platformcompositor_support"

View File

@ -1,19 +0,0 @@
TARGET = QtPlatformCompositorSupport
MODULE = platformcompositor_support
QT = core-private gui-private opengl
CONFIG += static internal_module
DEFINES += QT_NO_CAST_FROM_ASCII
SOURCES += \
qplatformbackingstoreopenglsupport.cpp \
qopenglcompositor.cpp \
qopenglcompositorbackingstore.cpp
HEADERS += \
qplatformbackingstoreopenglsupport.h \
qopenglcompositor_p.h \
qopenglcompositorbackingstore_p.h
load(qt_module)

View File

@ -19,8 +19,6 @@ qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid)|qtConf
if(unix:!uikit)|qtConfig(xcb): \
SUBDIRS += services
qtConfig(opengl): \
SUBDIRS += platformcompositor
qtConfig(egl): \
SUBDIRS += eglconvenience
qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \

View File

@ -76,9 +76,9 @@ qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_vulkan
qandroidplatformvulkanwindow.cpp qandroidplatformvulkanwindow.h
)
qt_extend_target(QAndroidIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
Qt::OpenGLPrivate
)
qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_android_style_assets

View File

@ -7,7 +7,7 @@ QT += \
eventdispatcher_support-private accessibility_support-private \
fontdatabase_support-private egl_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
OTHER_FILES += $$PWD/android.json

View File

@ -44,7 +44,7 @@
#include <QGuiApplication>
#include <QOpenGLContext>
#if QT_CONFIG(opengl)
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#include <QOffscreenSurface>
#include <QThread>

View File

@ -111,9 +111,9 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
qcocoasessionmanager.cpp qcocoasessionmanager.h
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
Qt::OpenGLPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets

View File

@ -98,7 +98,7 @@ QT += \
core-private gui-private \
theme_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
CONFIG += no_app_extension_api_only

View File

@ -69,7 +69,7 @@
#include <QtGui/private/qfontengine_coretext_p.h>
#if QT_CONFIG(opengl)
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#ifdef QT_WIDGETS_LIB

View File

@ -44,9 +44,9 @@ qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::InputSupportPrivate
Qt::InputSupportPrivate
)
qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::PlatformCompositorSupportPrivate
qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
Qt::OpenGLPrivate
)
qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan

View File

@ -73,7 +73,7 @@
#include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtFbSupport/private/qfbvthandler_p.h>
#ifndef QT_NO_OPENGL
# include <QtPlatformCompositorSupport/private/qopenglcompositorbackingstore_p.h>
# include <QtOpenGL/private/qopenglcompositorbackingstore_p.h>
#endif
#include <QtPlatformHeaders/QEGLNativeContext>

View File

@ -43,7 +43,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformcursor.h>
#ifndef QT_NO_OPENGL
# include <QtPlatformCompositorSupport/private/qopenglcompositor_p.h>
# include <QtOpenGL/private/qopenglcompositor_p.h>
#endif
#include "qeglfsscreen_p.h"

View File

@ -45,7 +45,7 @@
#ifndef QT_NO_OPENGL
# include <QtGui/private/qopenglcontext_p.h>
# include <QtGui/QOpenGLContext>
# include <QtPlatformCompositorSupport/private/qopenglcompositorbackingstore_p.h>
# include <QtOpenGL/private/qopenglcompositorbackingstore_p.h>
#endif
#include <QtEglSupport/private/qeglconvenience_p.h>

View File

@ -57,7 +57,7 @@
#include <qpa/qplatformwindow.h>
#ifndef QT_NO_OPENGL
# include <QtPlatformCompositorSupport/private/qopenglcompositor_p.h>
# include <QtOpenGL/private/qopenglcompositor_p.h>
#endif
QT_BEGIN_NAMESPACE

View File

@ -17,8 +17,7 @@ QT += \
qtHaveModule(input_support-private): \
QT += input_support-private
qtHaveModule(platformcompositor_support-private): \
QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11

View File

@ -47,9 +47,9 @@ qt_disable_apple_app_extension_api_only(QIOSIntegrationPlugin)
## Scopes:
#####################################################################
extend_target(QIOSIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
extend_target(QIOSIntegrationPlugin CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
Qt::OpenGLPrivate
)
extend_target(QIOSIntegrationPlugin CONDITION NOT TVOS

View File

@ -8,7 +8,7 @@ qtConfig(shared): CONFIG += static
QT += \
core-private gui-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
LIBS += -framework Foundation -framework UIKit -framework QuartzCore -framework AudioToolbox

View File

@ -67,7 +67,7 @@
#import <AudioToolbox/AudioServices.h>
#if QT_CONFIG(opengl)
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#include <QtDebug>

View File

@ -41,7 +41,7 @@
#include "qwasmwindow.h"
#ifndef QT_NO_OPENGL
# include "qwasmbackingstore.h"
# include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
# include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#include "qwasmfontdatabase.h"
#if defined(Q_OS_UNIX)

View File

@ -4,7 +4,7 @@ QT += \
core-private gui-private \
eventdispatcher_support-private fontdatabase_support-private egl_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11

View File

@ -86,9 +86,9 @@ qt_add_resource(QWindowsIntegrationPlugin "openglblacklists"
## Scopes:
#####################################################################
qt_extend_target(QWindowsIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
Qt::OpenGLPrivate
)
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility

View File

@ -46,7 +46,7 @@
#include <QtGui/private/qpixmap_raster_p.h>
#if QT_CONFIG(opengl)
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
QT_BEGIN_NAMESPACE

View File

@ -5,7 +5,7 @@ QT += \
eventdispatcher_support-private \
fontdatabase_support-private theme_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
qtConfig(accessibility): QT += accessibility_support-private

View File

@ -54,7 +54,7 @@
# include "uiautomation/qwinrtuiaaccessibility.h"
#endif
#if QT_CONFIG(opengl)
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#include <QtGui/QOffscreenSurface>

View File

@ -6,7 +6,7 @@ QT += \
core-private gui-private \
fontdatabase_support-private egl_support-private
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
DEFINES *= QT_NO_CAST_FROM_ASCII __WRL_NO_DEFAULT_LIB__

View File

@ -71,9 +71,9 @@ qt_disable_apple_app_extension_api_only(XcbQpa)
## Scopes:
#####################################################################
qt_extend_target(XcbQpa CONDITION TARGET Qt::PlatformCompositorSupportPrivate
qt_extend_target(XcbQpa CONDITION QT_FEATURE_opengl
PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
Qt::OpenGLPrivate
)
qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate

View File

@ -62,7 +62,7 @@
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#include <QtServiceSupport/private/qgenericunixservices_p.h>
#if QT_CONFIG(opengl)
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
#include <QtOpenGL/qpa/qplatformbackingstoreopenglsupport.h>
#endif
#include <stdio.h>

View File

@ -9,8 +9,7 @@ QT += \
edid_support-private \
xkbcommon_support-private
qtHaveModule(platformcompositor_support-private): \
QT += platformcompositor_support-private
qtConfig(opengl): QT += opengl-private
qtHaveModule(linuxaccessibility_support-private): \
QT += linuxaccessibility_support-private

View File

@ -18,7 +18,6 @@
"QtFontDatabaseSupport" => "$basedir/src/platformsupport/fontdatabases",
"QtInputSupport" => "$basedir/src/platformsupport/input",
"QtXkbCommonSupport" => "$basedir/src/platformsupport/input/xkbcommon",
"QtPlatformCompositorSupport" => "$basedir/src/platformsupport/platformcompositor",
"QtServiceSupport" => "$basedir/src/platformsupport/services",
"QtThemeSupport" => "$basedir/src/platformsupport/themes",
"QtEglSupport" => "$basedir/src/platformsupport/eglconvenience",

View File

@ -239,18 +239,6 @@ _qt_library_map = [
LibraryMapping(
"particles", "Qt6", "Qt::QuickParticles", extra=["COMPONENTS", "QuickParticles"]
),
LibraryMapping(
"platformcompositor",
"Qt6",
"Qt::PlatformCompositorSupport",
extra=["COMPONENTS", "PlatformCompositorSupport"],
),
LibraryMapping(
"platformcompositor_support",
"Qt6",
"Qt::PlatformCompositorSupport",
extra=["COMPONENTS", "PlatformCompositorSupport"],
),
LibraryMapping(
"plugin-interfaces",
"Qt6",