summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-10-15 06:56:02 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-15 06:56:02 (GMT)
commitcb2488f51dc6d33be571d9bde7059c053620f63e (patch)
tree72505b60c4a996466514ba394e0fc4c669e9350f
parent144294922df5a6782d96cd134a5e690c5262c408 (diff)
parent1f73b205ec57be6327f62ef39099358425a7f0a8 (diff)
downloadQt-cb2488f51dc6d33be571d9bde7059c053620f63e.zip
Qt-cb2488f51dc6d33be571d9bde7059c053620f63e.tar.gz
Qt-cb2488f51dc6d33be571d9bde7059c053620f63e.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
-rw-r--r--src/opengl/qgl.cpp22
-rw-r--r--src/opengl/qgl_p.h4
-rw-r--r--src/opengl/qglpaintdevice_qws.cpp4
-rw-r--r--src/opengl/qwindowsurface_gl.cpp12
4 files changed, 10 insertions, 32 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 8aef8b4..5e00b11 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4735,16 +4735,19 @@ Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_2_engine)
Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_engine)
#endif
-#ifdef Q_WS_QWS
Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine()
{
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
return qt_gl_engine();
+#elif defined(QT_OPENGL_ES_2)
+ return qt_gl_2_engine();
#else
- return 0; // XXX
+ if (qt_gl_preferGL2Engine())
+ return qt_gl_2_engine();
+ else
+ return qt_gl_engine();
#endif
}
-#endif
/*!
\internal
@@ -4754,16 +4757,7 @@ Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine()
*/
QPaintEngine *QGLWidget::paintEngine() const
{
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
- return qt_gl_engine();
-#elif defined(QT_OPENGL_ES_2)
- return qt_gl_2_engine();
-#else
- if (qt_gl_preferGL2Engine())
- return qt_gl_2_engine();
- else
- return qt_gl_engine();
-#endif
+ return qt_qgl_paint_engine();
}
#ifdef QT3_SUPPORT
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 8d4f673..129e7f7 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -505,9 +505,7 @@ private:
};
-#ifdef Q_WS_QWS
-extern QPaintEngine* qt_qgl_paint_engine();
-#endif
+extern Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine();
bool qt_gl_preferGL2Engine();
diff --git a/src/opengl/qglpaintdevice_qws.cpp b/src/opengl/qglpaintdevice_qws.cpp
index 600efa6..8c2f27d 100644
--- a/src/opengl/qglpaintdevice_qws.cpp
+++ b/src/opengl/qglpaintdevice_qws.cpp
@@ -72,11 +72,7 @@ QWSGLPaintDevice::~QWSGLPaintDevice()
QPaintEngine* QWSGLPaintDevice::paintEngine() const
{
-#if !defined(QT_OPENGL_ES_2)
return qt_qgl_paint_engine();
-#else
- return 0; // XXX
-#endif
}
int QWSGLPaintDevice::metric(PaintDeviceMetric m) const
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 7f8577a..b341243 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -283,19 +283,9 @@ int QGLWindowSurfaceGLPaintDevice::metric(PaintDeviceMetric m) const
return d->q_ptr->window()->metric(m);
}
-Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_window_surface_2_engine)
-
-#if !defined (QT_OPENGL_ES_2)
-Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_window_surface_engine)
-#endif
-
QPaintEngine *QGLWindowSurfaceGLPaintDevice::paintEngine() const
{
-#if !defined(QT_OPENGL_ES_2)
- if (!qt_gl_preferGL2Engine())
- return qt_gl_window_surface_engine();
-#endif
- return qt_gl_window_surface_2_engine();
+ return qt_qgl_paint_engine();
}
QGLWindowSurface::QGLWindowSurface(QWidget *window)