summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_qws.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-02-24 16:26:11 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-02 08:24:25 (GMT)
commita2eddea1432d6e558dcd620cd5100ce4531975e8 (patch)
tree32c429c466e08b248ba182935be0b88d9a461ad0 /src/opengl/qgl_qws.cpp
parentebdfa7270f67e4ce3b5034aa5144fdabeaecbbcd (diff)
downloadQt-a2eddea1432d6e558dcd620cd5100ce4531975e8.zip
Qt-a2eddea1432d6e558dcd620cd5100ce4531975e8.tar.gz
Qt-a2eddea1432d6e558dcd620cd5100ce4531975e8.tar.bz2
Replace qt_egl_add_platform_config with existing QEglProperties API
QEglProperties::setPaintDeviceFormat() seems to be a copy & paste of qt_egl_add_platform_config for every platform anyway. Reviewed-By: TrustMe
Diffstat (limited to 'src/opengl/qgl_qws.cpp')
-rw-r--r--src/opengl/qgl_qws.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index fd17a27..c221134 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -119,21 +119,6 @@ bool QGLFormat::hasOpenGLOverlays()
return false;
}
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
-{
- // Find the QGLScreen for this paint device.
- QGLScreen *glScreen = glScreenForDevice(device);
- if (!glScreen) {
- qWarning("QGLContext::chooseContext(): The screen is not a QGLScreen");
- return;
- }
- int devType = device->devType();
- if (devType == QInternal::Image)
- props.setPixelFormat(static_cast<QImage *>(device)->format());
- else
- props.setPixelFormat(glScreen->pixelFormat());
-}
-
static EGLSurface qt_egl_create_surface
(QEglContext *context, QPaintDevice *device,
const QEglProperties *properties = 0)
@@ -201,8 +186,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
// Construct the configuration we need for this surface.
QEglProperties configProps;
- qt_egl_add_platform_config(configProps, device());
qt_egl_set_format(configProps, devType, d->glFormat);
+ configProps.setPaintDeviceFormat(device());
configProps.setRenderableType(QEgl::OpenGL);
// Search for a matching configuration, reducing the complexity