eglfs: Avoid double surfaceFormatFor() calls

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 <jorgen.lind@digia.com>
bb10
Laszlo Agocs 2014-03-24 18:42:19 +01:00 committed by The Qt Project
parent 895fa0de79
commit dd1220651c
1 changed files with 2 additions and 2 deletions

View File

@ -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))
{
}