summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qgl_egl_p.h1
-rw-r--r--src/opengl/qgl_qws.cpp17
-rw-r--r--src/opengl/qgl_wince.cpp12
-rw-r--r--src/opengl/qgl_x11egl.cpp8
4 files changed, 3 insertions, 35 deletions
diff --git a/src/opengl/qgl_egl_p.h b/src/opengl/qgl_egl_p.h
index 518b500..1d8cbf1 100644
--- a/src/opengl/qgl_egl_p.h
+++ b/src/opengl/qgl_egl_p.h
@@ -62,7 +62,6 @@ class QGLFormat;
void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f);
void qt_egl_update_format(const QEglContext& context, QGLFormat& format);
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device);
QT_END_NAMESPACE
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
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index 2b71201..ed8b4f7 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -122,16 +122,6 @@ QGLTemporaryContext::~QGLTemporaryContext()
QGLFormat Win32/WGL-specific code
*****************************************************************************/
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
-{
- int devType = device->devType();
- if (devType == QInternal::Image)
- props.setPixelFormat(static_cast<QImage *>(device)->format());
- else
- props.setPixelFormat(QImage::Format_RGB16);
-}
-
-
static bool opengl32dll = false;
bool QGLFormat::hasOpenGLOverlays()
@@ -159,8 +149,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
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index ff58fba..21ddfe3 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -154,12 +154,6 @@ bool QGLFormat::hasOpenGLOverlays()
return false;
}
-void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
-{
- if (device->devType() == QInternal::Image)
- props.setPixelFormat(static_cast<QImage *>(device)->format());
-}
-
// Chooses the EGL config and creates the EGL context
bool QGLContext::chooseContext(const QGLContext* shareContext)
{
@@ -178,7 +172,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
// Construct the configuration we need for this surface.
QEglProperties configProps;
qt_egl_set_format(configProps, devType, d->glFormat);
- qt_egl_add_platform_config(configProps, device());
+ configProps.setPaintDeviceFormat(device());
configProps.setRenderableType(QEgl::OpenGL);
#if We_have_an_EGL_library_which_bothers_to_check_EGL_BUFFER_SIZE