From dd1220651c50b0bacceab618df8fdf3a7f26a0ab Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 24 Mar 2014 18:42:19 +0100 Subject: [PATCH] eglfs: Avoid double surfaceFormatFor() calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hooks' surfaceFormatFor() function is called twice on the format when creating platform contexts, once from the integration and once from the constructor. This is potentially dangerous. Do it only once. Change-Id: I58eadce01b8f2183abe116f88b1ee9f2b47c003d Reviewed-by: Jørgen Lind --- src/plugins/platforms/eglfs/qeglfscontext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/eglfs/qeglfscontext.cpp b/src/plugins/platforms/eglfs/qeglfscontext.cpp index 9083abc562..4d443b91e3 100644 --- a/src/plugins/platforms/eglfs/qeglfscontext.cpp +++ b/src/plugins/platforms/eglfs/qeglfscontext.cpp @@ -53,8 +53,8 @@ QT_BEGIN_NAMESPACE QEglFSContext::QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display) - : QEGLPlatformContext(QEglFSHooks::hooks()->surfaceFormatFor(format), share, display, - QEglFSIntegration::chooseConfig(display, QEglFSHooks::hooks()->surfaceFormatFor(format))) + : QEGLPlatformContext(format, share, display, + QEglFSIntegration::chooseConfig(display, format)) { }