summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qsurface.cpp')
-rw-r--r--src/gui/kernel/qsurface.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index e2bafa73988..f361ec86c2d 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -68,7 +68,10 @@ QT_IMPL_METATYPE_EXTERN_TAGGED(QSurface*, QSurface_ptr)
bool QSurface::supportsOpenGL() const
{
- return surfaceType() == OpenGLSurface;
+ static bool openGLOnRasterSurfaceSupported =
+ QGuiApplicationPrivate::instance()->platformIntegration()->hasCapability(QPlatformIntegration::OpenGLOnRasterSurface);
+ return surfaceType() == OpenGLSurface
+ || (surfaceType() == RasterSurface && openGLOnRasterSurfaceSupported);
}
/*!