summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandintegration.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-03-23 06:01:56 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-03-23 16:00:21 (GMT)
commit9ca3f9c6b6ae50c6b8a19d5e4b26bff15d5421e6 (patch)
treed9c717421fdca413472f94634a3972321bc91f05 /src/plugins/platforms/wayland/qwaylandintegration.cpp
parent2905f11e8e8fe7e05d61cec9fcc1d78ff91f0f31 (diff)
downloadQt-9ca3f9c6b6ae50c6b8a19d5e4b26bff15d5421e6.zip
Qt-9ca3f9c6b6ae50c6b8a19d5e4b26bff15d5421e6.tar.gz
Qt-9ca3f9c6b6ae50c6b8a19d5e4b26bff15d5421e6.tar.bz2
Lighthouse: Wayland, implement gl_integration
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandintegration.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp
index 267a037..be78b82 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp
@@ -43,9 +43,7 @@
#include "qwaylanddisplay.h"
#include "qwaylandshmsurface.h"
-#include "qwaylanddrmsurface.h"
#include "qwaylandshmwindow.h"
-#include "qwaylandeglwindow.h"
#include "qgenericunixfontdatabase.h"
@@ -55,6 +53,8 @@
#include <QtGui/private/qpixmap_raster_p.h>
#ifdef QT_WAYLAND_GL_SUPPORT
+#include "gl_integration/qwaylandglintegration.h"
+#include "gl_integration/qwaylandglwindowsurface.h"
#include <QtOpenGL/private/qpixmapdata_gl_p.h>
#endif
@@ -91,10 +91,11 @@ QPixmapData *QWaylandIntegration::createPixmapData(QPixmapData::PixelType type)
QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWidget *widget, WId winId) const
{
Q_UNUSED(winId);
+#ifdef QT_WAYLAND_GL_SUPPORT
bool useOpenGL = mUseOpenGL || (widget->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenGL);
if (useOpenGL)
- return new QWaylandEglWindow(widget);
-
+ return mDisplay->eglIntegration()->createEglWindow(widget);
+#endif
return new QWaylandShmWindow(widget);
}
@@ -102,10 +103,11 @@ QWindowSurface *QWaylandIntegration::createWindowSurface(QWidget *widget, WId wi
{
Q_UNUSED(winId);
Q_UNUSED(winId);
+#ifdef QT_WAYLAND_GL_SUPPORT
bool useOpenGL = mUseOpenGL || (widget->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenGL);
if (useOpenGL)
- return new QWaylandDrmWindowSurface(widget);
-
+ return new QWaylandGLWindowSurface(widget);
+#endif
return new QWaylandShmWindowSurface(widget);
}