summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/.prev_CMakeLists.txt9
-rw-r--r--src/plugins/platforms/cocoa/CMakeLists.txt9
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm14
4 files changed, 28 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/.prev_CMakeLists.txt b/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
index 27cace4eb9..1491340b65 100644
--- a/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
@@ -107,6 +107,11 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
qcocoasessionmanager.cpp qcocoasessionmanager.h
)
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
SOURCES
qpaintengine_mac.mm qpaintengine_mac_p.h
@@ -114,7 +119,7 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
Qt::WidgetsPrivate
)
-#### Keys ignored in scope 7:.:.:cocoa.pro:TARGET Qt::Widgets:
+#### Keys ignored in scope 8:.:.:cocoa.pro:TARGET Qt::Widgets:
# QT_FOR_CONFIG = "widgets"
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PrintSupport AND TARGET Qt::Widgets
@@ -141,5 +146,5 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_fontdialog AND TAR
qcocoafontdialoghelper.h qcocoafontdialoghelper.mm
)
-#### Keys ignored in scope 12:.:.:cocoa.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+#### Keys ignored in scope 13:.:.:cocoa.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt
index 27b646d293..9e8b162aec 100644
--- a/src/plugins/platforms/cocoa/CMakeLists.txt
+++ b/src/plugins/platforms/cocoa/CMakeLists.txt
@@ -111,6 +111,11 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
qcocoasessionmanager.cpp qcocoasessionmanager.h
)
+qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PlatformCompositorSupportPrivate
+ PUBLIC_LIBRARIES
+ Qt::PlatformCompositorSupportPrivate
+)
+
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
SOURCES
qpaintengine_mac.mm qpaintengine_mac_p.h
@@ -118,7 +123,7 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
Qt::WidgetsPrivate
)
-#### Keys ignored in scope 7:.:.:cocoa.pro:TARGET Qt::Widgets:
+#### Keys ignored in scope 8:.:.:cocoa.pro:TARGET Qt::Widgets:
# QT_FOR_CONFIG = "widgets"
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PrintSupport AND TARGET Qt::Widgets
@@ -145,5 +150,5 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_fontdialog AND TAR
qcocoafontdialoghelper.h qcocoafontdialoghelper.mm
)
-#### Keys ignored in scope 12:.:.:cocoa.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+#### Keys ignored in scope 13:.:.:cocoa.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index a919963cf4..953346c56e 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -101,6 +101,8 @@ QT += \
qtConfig(vulkan): QT += vulkan_support-private
+qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-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 a77b97f538..b2698b05fe 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -68,6 +68,10 @@
#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
+#if QT_CONFIG(opengl)
+#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
+#endif
+
#ifdef QT_WIDGETS_LIB
#include <QtWidgets/qtwidgetsglobal.h>
#if QT_CONFIG(filedialog)
@@ -324,10 +328,16 @@ QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *wi
return nullptr;
}
+ QPlatformBackingStore *backingStore = nullptr;
if (platformWindow->view().layer)
- return new QCALayerBackingStore(window);
+ backingStore = new QCALayerBackingStore(window);
else
- return new QNSWindowBackingStore(window);
+ backingStore = new QNSWindowBackingStore(window);
+
+#if QT_CONFIG(opengl)
+ backingStore->setOpenGLSupport(new QPlatformBackingStoreOpenGLSupport(backingStore));
+#endif
+ return backingStore;
}
QAbstractEventDispatcher *QCocoaIntegration::createEventDispatcher() const