summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorJohannes Zellner <johannes.zellner@nokia.com>2012-06-13 18:21:35 -0700
committerQt by Nokia <qt-info@nokia.com>2012-06-14 16:12:31 +0200
commit11aa64b1a1450e5189a8a99d58ecceb4322f7d7c (patch)
tree17298532616841e62be12850341a372d7a638d3d /src/plugins/platforms
parentf2d04d9b8cb323826c5af180dd2c22fe584a5e26 (diff)
eglfs: Pass QSurfaceFormat to createNativeWindow() hook
Change-Id: Ib352d8591360a224359ef218b95cd27cdfaf81aa Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks.h2
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_stub.cpp3
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_x11.cpp6
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp2
4 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks.h b/src/plugins/platforms/eglfs/qeglfshooks.h
index 3e40d16f38..72cf496703 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks.h
+++ b/src/plugins/platforms/eglfs/qeglfshooks.h
@@ -62,7 +62,7 @@ public:
virtual int screenDepth() const;
virtual QImage::Format screenFormat() const;
virtual QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const;
- virtual EGLNativeWindowType createNativeWindow(const QSize &size);
+ virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
virtual void destroyNativeWindow(EGLNativeWindowType window);
virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
virtual QEglFSCursor *createCursor(QEglFSScreen *screen) const;
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
index fe622e1c1b..487e483b62 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
@@ -77,9 +77,10 @@ QSurfaceFormat QEglFSHooks::surfaceFormatFor(const QSurfaceFormat &inputFormat)
return inputFormat;
}
-EGLNativeWindowType QEglFSHooks::createNativeWindow(const QSize &size)
+EGLNativeWindowType QEglFSHooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
{
Q_UNUSED(size);
+ Q_UNUSED(format);
return 0;
}
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
index af750a73f1..cb91858b57 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp
@@ -52,7 +52,7 @@ public:
virtual void platformDestroy();
virtual EGLNativeDisplayType platformDisplay() const;
virtual QSize screenSize() const;
- virtual EGLNativeWindowType createNativeWindow(const QSize &size);
+ virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
virtual void destroyNativeWindow(EGLNativeWindowType window);
virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
};
@@ -84,8 +84,10 @@ QSize QEglFSX11Hooks::screenSize() const
return QSize(env.at(0).toInt(), env.at(1).toInt());
}
-EGLNativeWindowType QEglFSX11Hooks::createNativeWindow(const QSize &size)
+EGLNativeWindowType QEglFSX11Hooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
{
+ Q_UNUSED(format);
+
Window root = DefaultRootWindow(display);
XSetWindowAttributes swa;
memset(&swa, 0, sizeof(swa));
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index 6cb9fc6edf..36089b5ce0 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -78,7 +78,7 @@ void QEglFSWindow::create()
QSurfaceFormat platformFormat = hooks->surfaceFormatFor(window()->requestedFormat());
EGLConfig config = q_configFromGLFormat(display, platformFormat);
m_format = q_glFormatFromConfig(display, config);
- m_window = hooks->createNativeWindow(hooks->screenSize());
+ m_window = hooks->createNativeWindow(hooks->screenSize(), m_format);
m_surface = eglCreateWindowSurface(display, config, m_window, NULL);
if (m_surface == EGL_NO_SURFACE) {
eglTerminate(display);