Wayland: Rename XPixmap GL integrations to Readback
authorJørgen Lind <jorgen.lind@nokia.com>
Mon, 11 Apr 2011 07:00:14 +0000 (09:00 +0200)
committerJørgen Lind <jorgen.lind@nokia.com>
Mon, 11 Apr 2011 07:01:02 +0000 (09:01 +0200)
18 files changed:
src/plugins/platforms/wayland/gl_integration/gl_integration.pri
src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.cpp [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.cpp with 86% similarity]
src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.h [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.h with 79% similarity]
src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.cpp [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.cpp with 74% similarity]
src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.h [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.h with 87% similarity]
src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.cpp [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.cpp with 76% similarity]
src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.h [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.h with 79% similarity]
src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri [new file with mode: 0644]
src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.cpp [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.cpp with 89% similarity]
src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.h with 80% similarity]
src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.cpp [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.cpp with 72% similarity]
src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.h [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.h with 87% similarity]
src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.cpp with 77% similarity]
src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h [moved from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.h with 78% similarity]
src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri [new file with mode: 0644]
src/plugins/platforms/wayland/gl_integration/xpixmap_egl/xpixmap_egl.pri [deleted file]
src/plugins/platforms/wayland/gl_integration/xpixmap_glx/xpixmap_glx.pri [deleted file]
src/plugins/platforms/wayland/wayland.pro

index 73a0c25..835f880 100644 (file)
@@ -10,12 +10,12 @@ wayland_egl {
     include ($$PWD/wayland_egl/wayland_egl.pri)
 }
 
-xpixmap_egl {
-    include ($$PWD/xpixmap_egl/xpixmap_egl.pri)
+readback_egl {
+    include ($$PWD/readback_egl/readback_egl.pri)
 }
 
-xpixmap_glx {
-    include ($$PWD/xpixmap_glx/xpixmap_glx.pri)
+readback_glx {
+    include ($$PWD/readback_glx/readback_glx.pri)
 }
 
 xcomposite_glx {
@@ -39,7 +39,7 @@
 **
 ****************************************************************************/
 
-#include "qwaylandxpixmapeglcontext.h"
+#include "qwaylandreadbackeglcontext.h"
 
 #include "../../../eglconvenience/qeglconvenience.h"
 
@@ -72,7 +72,7 @@ static inline void qgl_byteSwapImage(QImage &img, GLenum pixel_type)
     }
 }
 
-QXPixmapReadbackGLContext::QXPixmapReadbackGLContext(QWaylandXPixmapEglIntegration *eglIntegration, QWaylandXPixmapWindow *window)
+QWaylandReadbackEglContext::QWaylandReadbackEglContext(QWaylandReadbackEglIntegration *eglIntegration, QWaylandReadbackEglWindow *window)
     : mEglIntegration(eglIntegration)
     , mWindow(window)
     , mBuffer(0)
@@ -90,29 +90,27 @@ QXPixmapReadbackGLContext::QXPixmapReadbackGLContext(QWaylandXPixmapEglIntegrati
     geometryChanged();
 }
 
-QXPixmapReadbackGLContext::~QXPixmapReadbackGLContext()
+QWaylandReadbackEglContext::~QWaylandReadbackEglContext()
 {
     eglDestroyContext(mEglIntegration->eglDisplay(),mContext);
 }
 
-void QXPixmapReadbackGLContext::makeCurrent()
+void QWaylandReadbackEglContext::makeCurrent()
 {
     QPlatformGLContext::makeCurrent();
 
-    while(mWindow->waitingForFrameSync()) {
-        mEglIntegration->waylandDisplay()->iterate();
-    }
+    mWindow->waitForFrameSync();
 
     eglMakeCurrent(mEglIntegration->eglDisplay(),mPixmapSurface,mPixmapSurface,mContext);
 }
 
-void QXPixmapReadbackGLContext::doneCurrent()
+void QWaylandReadbackEglContext::doneCurrent()
 {
     QPlatformGLContext::doneCurrent();
     eglMakeCurrent(mEglIntegration->eglDisplay(),EGL_NO_SURFACE,EGL_NO_SURFACE,EGL_NO_CONTEXT);
 }
 
-void QXPixmapReadbackGLContext::swapBuffers()
+void QWaylandReadbackEglContext::swapBuffers()
 {
     eglSwapBuffers(mEglIntegration->eglDisplay(),mPixmapSurface);
 
@@ -140,17 +138,17 @@ void QXPixmapReadbackGLContext::swapBuffers()
     mWindow->damage(QRegion(QRect(QPoint(0,0),size)));
 }
 
-void * QXPixmapReadbackGLContext::getProcAddress(const QString &procName)
+void * QWaylandReadbackEglContext::getProcAddress(const QString &procName)
 {
     return (void *) eglGetProcAddress(procName.toLatin1().data());
 }
 
-QPlatformWindowFormat QXPixmapReadbackGLContext::platformWindowFormat() const
+QPlatformWindowFormat QWaylandReadbackEglContext::platformWindowFormat() const
 {
     return qt_qPlatformWindowFormatFromConfig(mEglIntegration->eglDisplay(),mConfig);
 }
 
-void QXPixmapReadbackGLContext::geometryChanged()
+void QWaylandReadbackEglContext::geometryChanged()
 {
     QSize size(mWindow->geometry().size());
     if (size.isEmpty()) {
@@ -158,8 +156,7 @@ void QXPixmapReadbackGLContext::geometryChanged()
         size = QSize(1,1);
     }
 
-    while (mWindow->waitingForFrameSync())
-        mEglIntegration->waylandDisplay()->iterate();
+    mWindow->waitForFrameSync();
 
     delete mBuffer;
     if (mPixmap)
 **
 ****************************************************************************/
 
-#ifndef QXPIXMAPREADBACKGLCONTEXT_H
-#define QXPIXMAPREADBACKGLCONTEXT_H
+#ifndef QWAYLANDREADBACKEGLGLCONTEXT_H
+#define QWAYLANDREADBACKEGLGLCONTEXT_H
 
 #include <QPlatformGLContext>
 #include <QtGui/QWidget>
 
-#include "qwaylandxpixmapeglintegration.h"
-#include "qwaylandxpixmapwindow.h"
+#include "qwaylandreadbackeglintegration.h"
+#include "qwaylandreadbackeglwindow.h"
 
 class QWaylandShmBuffer;
 
-class QXPixmapReadbackGLContext : public QPlatformGLContext
+class QWaylandReadbackEglContext : public QPlatformGLContext
 {
 public:
-    QXPixmapReadbackGLContext(QWaylandXPixmapEglIntegration *eglIntegration, QWaylandXPixmapWindow *window);
-    ~QXPixmapReadbackGLContext();
+    QWaylandReadbackEglContext(QWaylandReadbackEglIntegration *eglIntegration, QWaylandReadbackEglWindow *window);
+    ~QWaylandReadbackEglContext();
 
     void makeCurrent();
     void doneCurrent();
@@ -66,8 +66,8 @@ public:
     void geometryChanged();
 
 private:
-    QWaylandXPixmapEglIntegration *mEglIntegration;
-    QWaylandXPixmapWindow *mWindow;
+    QWaylandReadbackEglIntegration *mEglIntegration;
+    QWaylandReadbackEglWindow *mWindow;
     QWaylandShmBuffer *mBuffer;
 
     Pixmap mPixmap;
@@ -77,4 +77,4 @@ private:
     EGLSurface mPixmapSurface;
 };
 
-#endif // QXPIXMAPREADBACKGLCONTEXT_H
+#endif // QWAYLANDREADBACKEGLGLCONTEXT_H
 **
 ****************************************************************************/
 
-#include "qwaylandxpixmapeglintegration.h"
+#include "qwaylandreadbackeglintegration.h"
 
 #include <QDebug>
 
-#include "qwaylandxpixmapwindow.h"
+#include "qwaylandreadbackeglwindow.h"
 
-QWaylandXPixmapEglIntegration::QWaylandXPixmapEglIntegration(QWaylandDisplay *display)
+QWaylandReadbackEglIntegration::QWaylandReadbackEglIntegration(QWaylandDisplay *display)
     : QWaylandGLIntegration()
     , mWaylandDisplay(display)
 {
-    qDebug() << "Using Wayland XPixmap-EGL";
+    qDebug() << "Using Wayland Readback-EGL";
     char *display_name = getenv("DISPLAY");
     mDisplay = XOpenDisplay(display_name);
     mScreen = XDefaultScreen(mDisplay);
@@ -57,7 +57,7 @@ QWaylandXPixmapEglIntegration::QWaylandXPixmapEglIntegration(QWaylandDisplay *di
     XSync(mDisplay, False);
 }
 
-QWaylandXPixmapEglIntegration::~QWaylandXPixmapEglIntegration()
+QWaylandReadbackEglIntegration::~QWaylandReadbackEglIntegration()
 {
     XCloseDisplay(mDisplay);
 }
@@ -65,10 +65,10 @@ QWaylandXPixmapEglIntegration::~QWaylandXPixmapEglIntegration()
 
 QWaylandGLIntegration *QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
 {
-    return new QWaylandXPixmapEglIntegration(waylandDisplay);
+    return new QWaylandReadbackEglIntegration(waylandDisplay);
 }
 
-void QWaylandXPixmapEglIntegration::initialize()
+void QWaylandReadbackEglIntegration::initialize()
 {
     eglBindAPI(EGL_OPENGL_ES_API);
     mEglDisplay = eglGetDisplay(mDisplay);
@@ -81,32 +81,32 @@ void QWaylandXPixmapEglIntegration::initialize()
     }
 }
 
-QWaylandWindow * QWaylandXPixmapEglIntegration::createEglWindow(QWidget *widget)
+QWaylandWindow * QWaylandReadbackEglIntegration::createEglWindow(QWidget *widget)
 {
-    return new QWaylandXPixmapWindow(widget,this);
+    return new QWaylandReadbackEglWindow(widget,this);
 }
 
-EGLDisplay QWaylandXPixmapEglIntegration::eglDisplay()
+EGLDisplay QWaylandReadbackEglIntegration::eglDisplay()
 {
     return mEglDisplay;
 }
 
-Window QWaylandXPixmapEglIntegration::rootWindow() const
+Window QWaylandReadbackEglIntegration::rootWindow() const
 {
     return mRootWindow;
 }
 
-int QWaylandXPixmapEglIntegration::depth() const
+int QWaylandReadbackEglIntegration::depth() const
 {
     return XDefaultDepth(mDisplay,mScreen);
 }
 
-Display * QWaylandXPixmapEglIntegration::xDisplay() const
+Display * QWaylandReadbackEglIntegration::xDisplay() const
 {
     return mDisplay;
 }
 
-QWaylandDisplay * QWaylandXPixmapEglIntegration::waylandDisplay() const
+QWaylandDisplay * QWaylandReadbackEglIntegration::waylandDisplay() const
 {
     return mWaylandDisplay;
 }
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#ifndef QWAYLANDXPIXMAPEGLINTEGRATION_H
-#define QWAYLANDXPIXMAPEGLINTEGRATION_H
+#ifndef QWAYLANDREADBACKEGLINTEGRATION_H
+#define QWAYLANDREADBACKEGLINTEGRATION_H
 
 #include "gl_integration/qwaylandglintegration.h"
 
 
 #include <EGL/egl.h>
 
-class QWaylandXPixmapEglIntegration : public QWaylandGLIntegration
+class QWaylandReadbackEglIntegration : public QWaylandGLIntegration
 {
 public:
-    QWaylandXPixmapEglIntegration(QWaylandDisplay *display);
-    ~QWaylandXPixmapEglIntegration();
+    QWaylandReadbackEglIntegration(QWaylandDisplay *display);
+    ~QWaylandReadbackEglIntegration();
 
     void initialize();
     QWaylandWindow *createEglWindow(QWidget *widget);
@@ -79,4 +79,4 @@ private:
 
 };
 
-#endif // QWAYLANDXPIXMAPEGLINTEGRATION_H
+#endif // QWAYLANDREADBACKEGLINTEGRATION_H
 **
 ****************************************************************************/
 
-#include "qwaylandxpixmapwindow.h"
+#include "qwaylandreadbackeglwindow.h"
 
-#include "qwaylandxpixmapeglcontext.h"
-QWaylandXPixmapWindow::QWaylandXPixmapWindow(QWidget *window, QWaylandXPixmapEglIntegration *eglIntegration)
+#include "qwaylandreadbackeglcontext.h"
+
+QWaylandReadbackEglWindow::QWaylandReadbackEglWindow(QWidget *window, QWaylandReadbackEglIntegration *eglIntegration)
     : QWaylandShmWindow(window)
     , mEglIntegration(eglIntegration)
     , mContext(0)
 {
 }
 
-QWaylandWindow::WindowType QWaylandXPixmapWindow::windowType() const
+QWaylandWindow::WindowType QWaylandReadbackEglWindow::windowType() const
 {
     //We'r lying, maybe we should add a type, but for now it will do
     //since this is primarly used by the windowsurface.
     return QWaylandWindow::Egl;
 }
 
-QPlatformGLContext *QWaylandXPixmapWindow::glContext() const
+QPlatformGLContext *QWaylandReadbackEglWindow::glContext() const
 {
     if (!mContext) {
-        QWaylandXPixmapWindow *that = const_cast<QWaylandXPixmapWindow *>(this);
-        that->mContext = new QXPixmapReadbackGLContext(mEglIntegration,that);
+        QWaylandReadbackEglWindow *that = const_cast<QWaylandReadbackEglWindow *>(this);
+        that->mContext = new QWaylandReadbackEglContext(mEglIntegration,that);
     }
     return mContext;
 }
 
-void QWaylandXPixmapWindow::setGeometry(const QRect &rect)
+void QWaylandReadbackEglWindow::setGeometry(const QRect &rect)
 {
     QPlatformWindow::setGeometry(rect);
 
 **
 ****************************************************************************/
 
-#ifndef QWAYLANDXPIXMAPWINDOW_H
-#define QWAYLANDXPIXMAPWINDOW_H
+#ifndef QWAYLANDREADBACKEGLWINDOW_H
+#define QWAYLANDREADBACKEGLWINDOW_H
 
 #include "qwaylandshmwindow.h"
-#include "qwaylandxpixmapeglintegration.h"
+#include "qwaylandreadbackeglintegration.h"
 
-class QXPixmapReadbackGLContext;
+class QWaylandReadbackEglContext;
 
-class QWaylandXPixmapWindow : public QWaylandShmWindow
+class QWaylandReadbackEglWindow : public QWaylandShmWindow
 {
 public:
-    QWaylandXPixmapWindow(QWidget *window, QWaylandXPixmapEglIntegration *eglIntegration);
+    QWaylandReadbackEglWindow(QWidget *window, QWaylandReadbackEglIntegration *eglIntegration);
 
     WindowType windowType() const;
 
@@ -59,8 +59,8 @@ public:
     void setGeometry(const QRect &rect);
 
 private:
-    QWaylandXPixmapEglIntegration *mEglIntegration;
-    QXPixmapReadbackGLContext *mContext;
+    QWaylandReadbackEglIntegration *mEglIntegration;
+    QWaylandReadbackEglContext *mContext;
 };
 
-#endif // QWAYLANDXPIXMAPWINDOW_H
+#endif // QWAYLANDREADBACKEGLWINDOW_H
diff --git a/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri b/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri
new file mode 100644 (file)
index 0000000..0d8e01b
--- /dev/null
@@ -0,0 +1,14 @@
+
+LIBS += -lX11 -lXext -lEGL
+
+HEADERS += \
+    $$PWD/qwaylandreadbackeglintegration.h \
+    $$PWD/qwaylandreadbackeglcontext.h \
+    $$PWD/qwaylandreadbackeglwindow.h \
+    $$PWD/../../../eglconvenience/qeglconvenience.h
+
+SOURCES += \
+    $$PWD/qwaylandreadbackeglintegration.cpp \
+    $$PWD/qwaylandreadbackeglwindow.cpp \
+    $$PWD/qwaylandreadbackeglcontext.cpp \
+    $$PWD/../../../eglconvenience/qeglconvenience.cpp
 **
 ****************************************************************************/
 
-#include "qwaylandxpixmapglxcontext.h"
+#include "qwaylandreadbackglxcontext.h"
 
 #include "qwaylandshmsurface.h"
-#include "qwaylandxpixmapglxwindow.h"
+#include "qwaylandreadbackglxwindow.h"
 
 #include <QtCore/QDebug>
 
@@ -68,7 +68,7 @@ static inline void qgl_byteSwapImage(QImage &img, GLenum pixel_type)
     }
 }
 
-QWaylandXPixmapGLXContext::QWaylandXPixmapGLXContext(QWaylandXPixmapGLXIntegration *glxIntegration, QWaylandXPixmapGLXWindow *window)
+QWaylandReadbackGlxContext::QWaylandReadbackGlxContext(QWaylandReadbackGlxIntegration *glxIntegration, QWaylandReadbackGlxWindow *window)
     : QPlatformGLContext()
     , mGlxIntegration(glxIntegration)
     , mWindow(window)
@@ -83,19 +83,19 @@ QWaylandXPixmapGLXContext::QWaylandXPixmapGLXContext(QWaylandXPixmapGLXIntegrati
     geometryChanged();
 }
 
-void QWaylandXPixmapGLXContext::makeCurrent()
+void QWaylandReadbackGlxContext::makeCurrent()
 {
     QPlatformGLContext::makeCurrent();
 
     glXMakeCurrent(mGlxIntegration->xDisplay(),mGlxPixmap,mContext);
 }
 
-void QWaylandXPixmapGLXContext::doneCurrent()
+void QWaylandReadbackGlxContext::doneCurrent()
 {
     QPlatformGLContext::doneCurrent();
 }
 
-void QWaylandXPixmapGLXContext::swapBuffers()
+void QWaylandReadbackGlxContext::swapBuffers()
 {
     if (QPlatformGLContext::currentContext() != this) {
         makeCurrent();
@@ -123,17 +123,17 @@ void QWaylandXPixmapGLXContext::swapBuffers()
 
 }
 
-void * QWaylandXPixmapGLXContext::getProcAddress(const QString &procName)
+void * QWaylandReadbackGlxContext::getProcAddress(const QString &procName)
 {
     return (void *) glXGetProcAddress(reinterpret_cast<GLubyte *>(procName.toLatin1().data()));
 }
 
-QPlatformWindowFormat QWaylandXPixmapGLXContext::platformWindowFormat() const
+QPlatformWindowFormat QWaylandReadbackGlxContext::platformWindowFormat() const
 {
     return qglx_platformWindowFromGLXFBConfig(mGlxIntegration->xDisplay(),mConfig,mContext);
 }
 
-void QWaylandXPixmapGLXContext::geometryChanged()
+void QWaylandReadbackGlxContext::geometryChanged()
 {
     QSize size(mWindow->geometry().size());
     if (size.isEmpty()) {
 **
 ****************************************************************************/
 
-#ifndef QWAYLANDXPIXMAPGLXCONTEXT_H
-#define QWAYLANDXPIXMAPGLXCONTEXT_H
+#ifndef QWAYLANDREADBACKGLXCONTEXT_H
+#define QWAYLANDREADBACKGLXCONTEXT_H
 
 #include <QPlatformGLContext>
 
-#include "qwaylandxpixmapglxintegration.h"
+#include "qwaylandreadbackglxintegration.h"
 
 #include "qglxconvenience.h"
 
-class QWaylandXPixmapGLXWindow;
+class QWaylandReadbackGlxWindow;
 class QWaylandShmBuffer;
 
-class QWaylandXPixmapGLXContext : public QPlatformGLContext
+class QWaylandReadbackGlxContext : public QPlatformGLContext
 {
 public:
-    QWaylandXPixmapGLXContext(QWaylandXPixmapGLXIntegration *glxIntegration, QWaylandXPixmapGLXWindow *window);
+    QWaylandReadbackGlxContext(QWaylandReadbackGlxIntegration *glxIntegration, QWaylandReadbackGlxWindow *window);
 
     void makeCurrent();
     void doneCurrent();
@@ -66,8 +66,8 @@ public:
     void geometryChanged();
 
 private:
-    QWaylandXPixmapGLXIntegration *mGlxIntegration;
-    QWaylandXPixmapGLXWindow *mWindow;
+    QWaylandReadbackGlxIntegration *mGlxIntegration;
+    QWaylandReadbackGlxWindow *mWindow;
     QWaylandShmBuffer *mBuffer;
 
     Pixmap mPixmap;
@@ -76,4 +76,4 @@ private:
     GLXPixmap mGlxPixmap;
 };
 
-#endif // QWAYLANDXPIXMAPGLXCONTEXT_H
+#endif // QWAYLANDREADBACKGLXCONTEXT_H
 **
 ****************************************************************************/
 
-#include "qwaylandxpixmapglxintegration.h"
+#include "qwaylandreadbackglxintegration.h"
 
-#include "qwaylandxpixmapglxwindow.h"
+#include "qwaylandreadbackglxwindow.h"
 
 #include <QtCore/QDebug>
 
-QWaylandXPixmapGLXIntegration::QWaylandXPixmapGLXIntegration(QWaylandDisplay * waylandDispaly)
+QWaylandReadbackGlxIntegration::QWaylandReadbackGlxIntegration(QWaylandDisplay * waylandDispaly)
     : QWaylandGLIntegration()
     , mWaylandDisplay(waylandDispaly)
 {
-    qDebug() << "Using Wayland XPixmap-GLX";
+    qDebug() << "Using Wayland Readback-GLX";
     char *display_name = getenv("DISPLAY");
     mDisplay = XOpenDisplay(display_name);
     mScreen = XDefaultScreen(mDisplay);
@@ -57,41 +57,41 @@ QWaylandXPixmapGLXIntegration::QWaylandXPixmapGLXIntegration(QWaylandDisplay * w
     XSync(mDisplay, False);
 }
 
-QWaylandXPixmapGLXIntegration::~QWaylandXPixmapGLXIntegration()
+QWaylandReadbackGlxIntegration::~QWaylandReadbackGlxIntegration()
 {
     XCloseDisplay(mDisplay);
 }
 
-void QWaylandXPixmapGLXIntegration::initialize()
+void QWaylandReadbackGlxIntegration::initialize()
 {
 }
 
-QWaylandWindow * QWaylandXPixmapGLXIntegration::createEglWindow(QWidget *widget)
+QWaylandWindow * QWaylandReadbackGlxIntegration::createEglWindow(QWidget *widget)
 {
-    return new QWaylandXPixmapGLXWindow(widget,this);
+    return new QWaylandReadbackGlxWindow(widget,this);
 }
 
 QWaylandGLIntegration * QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
 {
-    return new QWaylandXPixmapGLXIntegration(waylandDisplay);
+    return new QWaylandReadbackGlxIntegration(waylandDisplay);
 }
 
-Display * QWaylandXPixmapGLXIntegration::xDisplay() const
+Display * QWaylandReadbackGlxIntegration::xDisplay() const
 {
     return mDisplay;
 }
 
-int QWaylandXPixmapGLXIntegration::screen() const
+int QWaylandReadbackGlxIntegration::screen() const
 {
     return mScreen;
 }
 
-Window QWaylandXPixmapGLXIntegration::rootWindow() const
+Window QWaylandReadbackGlxIntegration::rootWindow() const
 {
     return mRootWindow;
 }
 
-QWaylandDisplay * QWaylandXPixmapGLXIntegration::waylandDisplay() const
+QWaylandDisplay * QWaylandReadbackGlxIntegration::waylandDisplay() const
 {
     return mWaylandDisplay;
 }
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#ifndef QWAYLANDXPIXMAPGLXINTEGRATION_H
-#define QWAYLANDXPIXMAPGLXINTEGRATION_H
+#ifndef QWAYLANDREADBACKGLXINTEGRATION_H
+#define QWAYLANDREADBACKGLXINTEGRATION_H
 
 #include "gl_integration/qwaylandglintegration.h"
 
 
 #include <X11/Xlib.h>
 
-class QWaylandXPixmapGLXIntegration : public QWaylandGLIntegration
+class QWaylandReadbackGlxIntegration : public QWaylandGLIntegration
 {
 public:
-    QWaylandXPixmapGLXIntegration(QWaylandDisplay * waylandDispaly);
-    ~QWaylandXPixmapGLXIntegration();
+    QWaylandReadbackGlxIntegration(QWaylandDisplay * waylandDispaly);
+    ~QWaylandReadbackGlxIntegration();
 
     void initialize();
 
@@ -77,4 +77,4 @@ private:
 
 };
 
-#endif // QWAYLANDXPIXMAPGLXINTEGRATION_H
+#endif // QWAYLANDREADBACKGLXINTEGRATION_H
 **
 ****************************************************************************/
 
-#include "qwaylandxpixmapglxwindow.h"
+#include "qwaylandreadbackglxwindow.h"
 
-QWaylandXPixmapGLXWindow::QWaylandXPixmapGLXWindow(QWidget *window, QWaylandXPixmapGLXIntegration *glxIntegration)
+QWaylandReadbackGlxWindow::QWaylandReadbackGlxWindow(QWidget *window, QWaylandReadbackGlxIntegration *glxIntegration)
     : QWaylandShmWindow(window)
     , mGlxIntegration(glxIntegration)
     , mContext(0)
 {
 }
 
-QWaylandWindow::WindowType QWaylandXPixmapGLXWindow::windowType() const
+QWaylandWindow::WindowType QWaylandReadbackGlxWindow::windowType() const
 {
     //yeah. this type needs a new name
     return QWaylandWindow::Egl;
 }
 
-QPlatformGLContext * QWaylandXPixmapGLXWindow::glContext() const
+QPlatformGLContext * QWaylandReadbackGlxWindow::glContext() const
 {
     if (!mContext) {
-        QWaylandXPixmapGLXWindow *that = const_cast<QWaylandXPixmapGLXWindow *>(this);
-        that->mContext = new QWaylandXPixmapGLXContext(mGlxIntegration,that);
+        QWaylandReadbackGlxWindow *that = const_cast<QWaylandReadbackGlxWindow *>(this);
+        that->mContext = new QWaylandReadbackGlxContext(mGlxIntegration,that);
     }
     return mContext;
 }
 
-void QWaylandXPixmapGLXWindow::setGeometry(const QRect &rect)
+void QWaylandReadbackGlxWindow::setGeometry(const QRect &rect)
 {
     QWaylandShmWindow::setGeometry(rect);
 
 **
 ****************************************************************************/
 
-#ifndef QWAYLANDXPIXMAPGLXWINDOW_H
-#define QWAYLANDXPIXMAPGLXWINDOW_H
+#ifndef QWAYLANDREADBACKGLXWINDOW_H
+#define QWAYLANDREADBACKGLXWINDOW_H
 
 #include "qwaylandshmwindow.h"
-#include "qwaylandxpixmapglxintegration.h"
-#include "qwaylandxpixmapglxcontext.h"
+#include "qwaylandreadbackglxintegration.h"
+#include "qwaylandreadbackglxcontext.h"
 
-class QWaylandXPixmapGLXWindow : public QWaylandShmWindow
+class QWaylandReadbackGlxWindow : public QWaylandShmWindow
 {
 public:
-    QWaylandXPixmapGLXWindow(QWidget *window, QWaylandXPixmapGLXIntegration *glxIntegration);
+    QWaylandReadbackGlxWindow(QWidget *window, QWaylandReadbackGlxIntegration *glxIntegration);
     WindowType windowType() const;
 
     QPlatformGLContext *glContext() const;
@@ -57,9 +57,9 @@ public:
     void setGeometry(const QRect &rect);
 
 private:
-    QWaylandXPixmapGLXIntegration *mGlxIntegration;
-    QWaylandXPixmapGLXContext *mContext;
+    QWaylandReadbackGlxIntegration *mGlxIntegration;
+    QWaylandReadbackGlxContext *mContext;
 
 };
 
-#endif // QWAYLANDXPIXMAPGLXWINDOW_H
+#endif // QWAYLANDREADBACKGLXWINDOW_H
diff --git a/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri b/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri
new file mode 100644 (file)
index 0000000..f8ea005
--- /dev/null
@@ -0,0 +1,12 @@
+include (../../../glxconvenience/glxconvenience.pri)
+HEADERS += \
+    $$PWD/qwaylandreadbackglxintegration.h \
+    $$PWD/qwaylandreadbackglxwindow.h \
+    $$PWD/qwaylandreadbackglxcontext.h
+
+SOURCES += \
+    $$PWD/qwaylandreadbackglxintegration.cpp \
+    $$PWD/qwaylandreadbackglxwindow.cpp \
+    $$PWD/qwaylandreadbackglxcontext.cpp
+
+LIBS += -lX11
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/xpixmap_egl.pri b/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/xpixmap_egl.pri
deleted file mode 100644 (file)
index 87e2d28..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-LIBS += -lX11 -lXext -lEGL
-
-HEADERS += \
-    gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.h \
-    gl_integration/xpixmap_egl/qwaylandxpixmapwindow.h \
-    gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.h \
-    $$PWD/../../../eglconvenience/qeglconvenience.h
-
-SOURCES += \
-    gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.cpp \
-    gl_integration/xpixmap_egl/qwaylandxpixmapwindow.cpp \
-    gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.cpp \
-    $$PWD/../../../eglconvenience/qeglconvenience.cpp
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/xpixmap_glx.pri b/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/xpixmap_glx.pri
deleted file mode 100644 (file)
index 2b6ae0d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-include (../../../glxconvenience/glxconvenience.pri)
-HEADERS += \
-    $$PWD/qwaylandxpixmapglxintegration.h \
-    gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.h \
-    gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.h
-
-SOURCES += \
-    $$PWD/qwaylandxpixmapglxintegration.cpp \
-    gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.cpp \
-    gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.cpp
-
-LIBS += -lX11
index bd017cc..ae17a14 100644 (file)
@@ -37,10 +37,10 @@ contains(QT_CONFIG, opengl) {
 
     contains(QT_CONFIG, opengles2) {
         CONFIG += wayland_egl
-        #CONFIG += xpixmap_egl
+        #CONFIG += readback_egl
         #CONFIG += xcomposite_egl
     } else {
-        CONFIG += xpixmap_glx
+        CONFIG += readback_glx
         #CONFIG += xcomposite_gl
 
     }