summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-04-11 07:00:14 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-04-11 07:01:02 (GMT)
commit59e20b0eedb7308d3428e7744e076a8b49b1cf25 (patch)
tree6d870dba9fee725927ee8f557dc43e50b16d5b47 /src/plugins
parentfb1de89d4debd6c26c774fed20e5ad7ee7185832 (diff)
downloadQt-59e20b0eedb7308d3428e7744e076a8b49b1cf25.zip
Qt-59e20b0eedb7308d3428e7744e076a8b49b1cf25.tar.gz
Qt-59e20b0eedb7308d3428e7744e076a8b49b1cf25.tar.bz2
Wayland: Rename XPixmap GL integrations to Readback
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/wayland/gl_integration/gl_integration.pri8
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.cpp (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.cpp)25
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.h (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.h)20
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.cpp (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.cpp)28
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.h (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.h)12
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.cpp (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.cpp)17
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.h (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.h)18
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri14
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.cpp (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.cpp)18
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.h)18
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.cpp (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.cpp)26
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.h (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.h)12
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.cpp)14
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h (renamed from src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.h)18
-rw-r--r--src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri12
-rw-r--r--src/plugins/platforms/wayland/gl_integration/xpixmap_egl/xpixmap_egl.pri14
-rw-r--r--src/plugins/platforms/wayland/gl_integration/xpixmap_glx/xpixmap_glx.pri12
-rw-r--r--src/plugins/platforms/wayland/wayland.pro4
18 files changed, 144 insertions, 146 deletions
diff --git a/src/plugins/platforms/wayland/gl_integration/gl_integration.pri b/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
index 73a0c25..835f880 100644
--- a/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
+++ b/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
@@ -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 {
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.cpp b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.cpp
index b8ff4c4..d63087d 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.cpp
@@ -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)
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.h b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.h
index 811d75d..ac68275 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglcontext.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglcontext.h
@@ -39,22 +39,22 @@
**
****************************************************************************/
-#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
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.cpp b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.cpp
index f6967e1..9347691 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.cpp
@@ -39,17 +39,17 @@
**
****************************************************************************/
-#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;
}
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.h b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.h
index 16c3632..84fa64f 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapeglintegration.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglintegration.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QWAYLANDXPIXMAPEGLINTEGRATION_H
-#define QWAYLANDXPIXMAPEGLINTEGRATION_H
+#ifndef QWAYLANDREADBACKEGLINTEGRATION_H
+#define QWAYLANDREADBACKEGLINTEGRATION_H
#include "gl_integration/qwaylandglintegration.h"
@@ -54,11 +54,11 @@
#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
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.cpp b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.cpp
index 43a80b5..2ae212b 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.cpp
@@ -39,33 +39,34 @@
**
****************************************************************************/
-#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);
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.h b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.h
index f6cae1d..453ad27 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/qwaylandxpixmapwindow.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/qwaylandreadbackeglwindow.h
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#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
index 0000000..0d8e01b
--- /dev/null
+++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri
@@ -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
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.cpp b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.cpp
index 8ccd7c9..08c5cf6c 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#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()) {
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.h b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h
index 3ea9dfe..5fafcf0 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxcontext.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxcontext.h
@@ -39,22 +39,22 @@
**
****************************************************************************/
-#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
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.cpp b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.cpp
index 33d6b06..7e2a74d 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.cpp
@@ -39,17 +39,17 @@
**
****************************************************************************/
-#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;
}
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.h b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.h
index c7a80de..9056393 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxintegration.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxintegration.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QWAYLANDXPIXMAPGLXINTEGRATION_H
-#define QWAYLANDXPIXMAPGLXINTEGRATION_H
+#ifndef QWAYLANDREADBACKGLXINTEGRATION_H
+#define QWAYLANDREADBACKGLXINTEGRATION_H
#include "gl_integration/qwaylandglintegration.h"
@@ -52,11 +52,11 @@
#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
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.cpp b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp
index 065a6fd..ca1603c 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp
@@ -39,31 +39,31 @@
**
****************************************************************************/
-#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);
diff --git a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.h b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h
index 5f4d24f..4d7bb3e 100644
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/qwaylandxpixmapglxwindow.h
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h
@@ -39,17 +39,17 @@
**
****************************************************************************/
-#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
index 0000000..f8ea005
--- /dev/null
+++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri
@@ -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
index 87e2d28..0000000
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_egl/xpixmap_egl.pri
+++ /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
index 2b6ae0d..0000000
--- a/src/plugins/platforms/wayland/gl_integration/xpixmap_glx/xpixmap_glx.pri
+++ /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
diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro
index bd017cc..ae17a14 100644
--- a/src/plugins/platforms/wayland/wayland.pro
+++ b/src/plugins/platforms/wayland/wayland.pro
@@ -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
}