diff options
Diffstat (limited to 'src/gui/kernel')
| -rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 4 | ||||
| -rw-r--r-- | src/gui/kernel/qsurface.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index cb4702b5f7e..633ae7895ba 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -228,8 +228,8 @@ public: // to use single-point precision. friend constexpr bool operator==(const QLastCursorPosition &p1, const QPointF &p2) noexcept { - return qFuzzyCompare(float(p1.x()), float(p2.x())) - && qFuzzyCompare(float(p1.y()), float(p2.y())); + return QtPrivate::fuzzyCompare(float(p1.x()), float(p2.x())) + && QtPrivate::fuzzyCompare(float(p1.y()), float(p2.y())); } friend constexpr bool operator!=(const QLastCursorPosition &p1, const QPointF &p2) noexcept { 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); } /*! |
