summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-20 15:50:55 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-21 09:16:26 +0000
commit7edd488a5f1d5ac2e21ce08177a0d733185e38df (patch)
treea99b09bbb6436b3eb67e2fd3f902afe8b4c40716 /src/platformsupport
parent205987750d51a446118f50b9ed583d40a565f445 (diff)
eglfs: Detect llvmpipe and show a warning
Do ourselves and our users a favor by pointing out why Qt (Quick) apps perform horribly on commonly used distros on the RPi. Using a software rasterizer on such boards is not going to cut it. Task-number: QTBUG-50533 Change-Id: I087f502ddb9c6bdde84343e6abd85c87cdc474f0 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp7
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index acd6197ed5..f5ba587293 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -275,6 +275,12 @@ void QEGLPlatformContext::destroyTemporaryOffscreenSurface(EGLSurface surface)
eglDestroySurface(m_eglDisplay, surface);
}
+void QEGLPlatformContext::runGLChecks()
+{
+ // Nothing to do here, subclasses may override in order to perform OpenGL
+ // queries needing a context.
+}
+
void QEGLPlatformContext::updateFormatFromGL()
{
#ifndef QT_NO_OPENGL
@@ -346,6 +352,7 @@ void QEGLPlatformContext::updateFormatFromGL()
}
}
}
+ runGLChecks();
eglMakeCurrent(prevDisplay, prevSurfaceDraw, prevSurfaceRead, prevContext);
} else {
qWarning("QEGLPlatformContext: Failed to make temporary surface current, format not updated (%x)", eglGetError());
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index 2fa465556b..41601272a3 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -84,6 +84,7 @@ protected:
virtual EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) = 0;
virtual EGLSurface createTemporaryOffscreenSurface();
virtual void destroyTemporaryOffscreenSurface(EGLSurface surface);
+ virtual void runGLChecks();
private:
void init(const QSurfaceFormat &format, QPlatformOpenGLContext *share);