summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/testlite
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-11-23 14:34:09 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-11-24 08:54:48 (GMT)
commit004cd14b84e3683cd92cf01061ee9688990f990c (patch)
tree8f879f07439b212de831c528e832d3c3ab4c6bb3 /src/plugins/platforms/testlite
parentf309a20b4177572282082b8c17ec9025b75a69b1 (diff)
downloadQt-004cd14b84e3683cd92cf01061ee9688990f990c.zip
Qt-004cd14b84e3683cd92cf01061ee9688990f990c.tar.gz
Qt-004cd14b84e3683cd92cf01061ee9688990f990c.tar.bz2
Lighthouse: Fix QGLContext::currentContext for systems with limited
resources. The example plugins EGLFS uses only 1 native context. Make sure that we only use this 1 context, and that we dont wrap it in many different QPlatformGLContexts or QGLContexts instanses. This change also removes the QPlatformWindow link which was made in the initial QPlatformGLContext change. Lighthouse has to support situations where a context isnt bound to a QPlatformWindow. Reviewed-by: gunnar
Diffstat (limited to 'src/plugins/platforms/testlite')
-rw-r--r--src/plugins/platforms/testlite/qglxintegration.cpp6
-rw-r--r--src/plugins/platforms/testlite/qglxintegration.h2
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindow.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/testlite/qglxintegration.cpp b/src/plugins/platforms/testlite/qglxintegration.cpp
index c35db9b..a4b7b69 100644
--- a/src/plugins/platforms/testlite/qglxintegration.cpp
+++ b/src/plugins/platforms/testlite/qglxintegration.cpp
@@ -235,8 +235,8 @@ QPlatformWindowFormat QGLXGLContext::reducePlatformWindowFormat(const QPlatformW
return retFormat;
}
-QGLXGLContext::QGLXGLContext(Window window, MyDisplay *xd, QPlatformWindow *platformWindow, const QPlatformWindowFormat &format)
- : QPlatformGLContext(platformWindow)
+QGLXGLContext::QGLXGLContext(Window window, MyDisplay *xd, const QPlatformWindowFormat &format)
+ : QPlatformGLContext()
, m_xd(xd)
, m_drawable((Drawable)window)
, m_context(0)
@@ -271,7 +271,7 @@ QGLXGLContext::QGLXGLContext(Window window, MyDisplay *xd, QPlatformWindow *plat
}
QGLXGLContext::QGLXGLContext(MyDisplay *display, Drawable drawable, GLXContext context)
- : QPlatformGLContext(0), m_xd(display), m_drawable(drawable), m_context(context)
+ : QPlatformGLContext(), m_xd(display), m_drawable(drawable), m_context(context)
{
}
diff --git a/src/plugins/platforms/testlite/qglxintegration.h b/src/plugins/platforms/testlite/qglxintegration.h
index 432dec5..e17790e 100644
--- a/src/plugins/platforms/testlite/qglxintegration.h
+++ b/src/plugins/platforms/testlite/qglxintegration.h
@@ -58,7 +58,7 @@ class MyDisplay;
class QGLXGLContext : public QPlatformGLContext
{
public:
- QGLXGLContext(Window window, MyDisplay *xd, QPlatformWindow *platformWindow, const QPlatformWindowFormat &format);
+ QGLXGLContext(Window window, MyDisplay *xd, const QPlatformWindowFormat &format);
~QGLXGLContext();
virtual void makeCurrent();
diff --git a/src/plugins/platforms/testlite/qtestlitewindow.cpp b/src/plugins/platforms/testlite/qtestlitewindow.cpp
index 0a6e1ff..b52aae9 100644
--- a/src/plugins/platforms/testlite/qtestlitewindow.cpp
+++ b/src/plugins/platforms/testlite/qtestlitewindow.cpp
@@ -1021,7 +1021,7 @@ QPlatformGLContext *QTestLiteWindow::glContext() const
if (!mGLContext) {
QTestLiteWindow *that = const_cast<QTestLiteWindow *>(this);
#ifndef QT_NO_OPENGL
- that->mGLContext = new QGLXGLContext(x_window, xd, that,widget()->platformWindowFormat());
+ that->mGLContext = new QGLXGLContext(x_window, xd,widget()->platformWindowFormat());
#endif
}
return mGLContext;