summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-06-06 13:57:09 -0700
committerQt by Nokia <qt-info@nokia.com>2012-06-12 04:29:49 +0200
commite9df01d3db83ec4ba64c99c92495e6dd0e201420 (patch)
tree11ed60d01ae457b676d9be854762c58b9b178da3 /src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
parent040f30decd24c32f71f14eeaed5fdcd58b2dce3d (diff)
eglfs refactor: move window creation into qeglfswindow
This potentially allows the creation of multiple QWindows. The platform context is now in a seperate file and the integration provides a new instance of the context allowing creation of multiple contexts. Change-Id: If2b6fa29b573d87c0a4cd0a8eff1f044bd1ff9b8 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsbackingstore.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
index d39a08c895..edcf116b04 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
@@ -41,6 +41,7 @@
#include "qeglfsbackingstore.h"
#include "qeglfscursor.h"
+#include "qeglfswindow.h"
#include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLPaintDevice>
@@ -56,7 +57,7 @@ QEglFSBackingStore::QEglFSBackingStore(QWindow *window)
, m_texture(0)
, m_program(0)
{
- m_context->setFormat(window->requestedFormat());
+ m_context->setFormat(window->format());
m_context->setScreen(window->screen());
m_context->create();
}
@@ -193,7 +194,7 @@ void QEglFSBackingStore::makeCurrent()
{
// needed to prevent QOpenGLContext::makeCurrent() from failing
window()->setSurfaceType(QSurface::OpenGLSurface);
-
+ (static_cast<QEglFSWindow *>(window()->handle()))->create();
m_context->makeCurrent(window());
}