summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2025-08-27 10:41:51 +0200
committerTor Arne Vestbø <[email protected]>2025-09-03 16:43:57 +0200
commit8391c01f38c9101ab8e275354e82b489457a6bc6 (patch)
treeb0ff889a7ca45c9b480602e9bc40e9872df0f082 /src/gui/kernel
parente97cb95572fabdb5c34282da6370b4e92906cc99 (diff)
Deprecate and remove traces of RasterGLSurface
We no longer use this hybrid surface type approach for Qt Widget's composition mode. Nowadays we use RHI to compose the widget texture and the native textures, and the window surface type depends on the RHI API in use, e.g. QSurface::MetalSurface, or QSurface::OpenGLSurface. Change-Id: I85001100f681a1cf524b8b7dc50f680a9579b447 Reviewed-by: Laszlo Agocs <[email protected]>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformintegration.h4
-rw-r--r--src/gui/kernel/qplatformsurface.cpp11
-rw-r--r--src/gui/kernel/qplatformsurface.h2
-rw-r--r--src/gui/kernel/qsurface.cpp12
-rw-r--r--src/gui/kernel/qsurface.h4
5 files changed, 9 insertions, 24 deletions
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index a18ae821c7b..04b79651aed 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -90,7 +90,9 @@ public:
WindowManagement,
WindowActivation, // whether requestActivate is supported
SyncState,
- RasterGLSurface,
+#if QT_REMOVAL_QT7_DEPRECATED_SINCE(6, 11)
+ RasterGLSurface Q_DECL_ENUMERATOR_DEPRECATED_X("This capability is no longer used"),
+#endif
AllGLFunctionsQueryable,
ApplicationIcon,
SwitchableWidgetComposition,
diff --git a/src/gui/kernel/qplatformsurface.cpp b/src/gui/kernel/qplatformsurface.cpp
index 39a1869de62..b7c5e36dfa6 100644
--- a/src/gui/kernel/qplatformsurface.cpp
+++ b/src/gui/kernel/qplatformsurface.cpp
@@ -32,17 +32,6 @@ QPlatformSurface::QPlatformSurface(QSurface *surface) : m_surface(surface)
{
}
-bool QPlatformSurface::isRasterSurface(QSurface *surface)
-{
- switch (surface->surfaceType()) {
- case QSurface::RasterSurface:
- case QSurface::RasterGLSurface:
- return true;
- default:
- return false;
- };
-}
-
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QPlatformSurface *surface)
{
diff --git a/src/gui/kernel/qplatformsurface.h b/src/gui/kernel/qplatformsurface.h
index f867d3df1b4..3e1c2a3a875 100644
--- a/src/gui/kernel/qplatformsurface.h
+++ b/src/gui/kernel/qplatformsurface.h
@@ -37,8 +37,6 @@ public:
QSurface *surface() const;
virtual QPlatformScreen *screen() const = 0;
- static bool isRasterSurface(QSurface *surface);
-
private:
explicit QPlatformSurface(QSurface *surface);
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index c00cf55a091..e2bafa73988 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -39,9 +39,6 @@ QT_IMPL_METATYPE_EXTERN_TAGGED(QSurface*, QSurface_ptr)
a software rasterizer like Qt's raster paint engine.
\value OpenGLSurface The surface is an OpenGL compatible surface and can be used
in conjunction with QOpenGLContext.
- \value RasterGLSurface The surface can be rendered to using a software rasterizer,
- and also supports OpenGL. This surface type is intended for internal Qt use, and
- requires the use of private API.
\value OpenVGSurface The surface is an OpenVG compatible surface and can be used
in conjunction with OpenVG contexts.
\value VulkanSurface The surface is a Vulkan compatible surface and can be used
@@ -52,6 +49,8 @@ QT_IMPL_METATYPE_EXTERN_TAGGED(QSurface*, QSurface_ptr)
\value Direct3DSurface The surface is a Direct 3D 11 and 12 compatible
surface and can be used in conjunction with the DXGI and Direct3D APIs. This
surface type is only supported on Windows.
+
+ \omitvalue RasterGLSurface
*/
/*!
@@ -69,12 +68,7 @@ QT_IMPL_METATYPE_EXTERN_TAGGED(QSurface*, QSurface_ptr)
bool QSurface::supportsOpenGL() const
{
- SurfaceType type = surfaceType();
- if (type == RasterSurface) {
- QPlatformIntegration *integ = QGuiApplicationPrivate::instance()->platformIntegration();
- return integ->hasCapability(QPlatformIntegration::OpenGLOnRasterSurface);
- }
- return type == OpenGLSurface || type == RasterGLSurface;
+ return surfaceType() == OpenGLSurface;
}
/*!
diff --git a/src/gui/kernel/qsurface.h b/src/gui/kernel/qsurface.h
index ef70beab21d..c6f496406c0 100644
--- a/src/gui/kernel/qsurface.h
+++ b/src/gui/kernel/qsurface.h
@@ -30,7 +30,9 @@ public:
enum SurfaceType {
RasterSurface,
OpenGLSurface,
- RasterGLSurface,
+#if QT_REMOVAL_QT7_DEPRECATED_SINCE(6, 11)
+ RasterGLSurface Q_DECL_ENUMERATOR_DEPRECATED_X("Use RasterSurface instead"),
+#endif
OpenVGSurface,
VulkanSurface,
MetalSurface,