summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland')
-rw-r--r--src/plugins/platforms/wayland/qwaylandcursor.cpp2
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration.cpp7
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration.h2
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp (renamed from src/plugins/platforms/wayland/qwaylandshmsurface.cpp)17
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmbackingstore.h (renamed from src/plugins/platforms/wayland/qwaylandshmsurface.h)14
-rw-r--r--src/plugins/platforms/wayland/wayland.pro4
6 files changed, 22 insertions, 24 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp
index d69d618591..6612d67cb4 100644
--- a/src/plugins/platforms/wayland/qwaylandcursor.cpp
+++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp
@@ -43,8 +43,8 @@
#include "qwaylanddisplay.h"
#include "qwaylandinputdevice.h"
-#include "qwaylandshmsurface.h"
#include "qwaylandscreen.h"
+#include "qwaylandshmbackingstore.h"
#include <QtGui/QImageReader>
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp
index 090edfe324..9cd79e2978 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp
@@ -42,7 +42,7 @@
#include "qwaylandintegration.h"
#include "qwaylanddisplay.h"
-#include "qwaylandshmsurface.h"
+#include "qwaylandshmbackingstore.h"
#include "qwaylandshmwindow.h"
#include "qwaylandnativeinterface.h"
#include "qwaylandclipboard.h"
@@ -116,10 +116,9 @@ QPlatformGLContext *QWaylandIntegration::createPlatformGLContext(const QGuiGLFor
#endif
}
-QWindowSurface *QWaylandIntegration::createWindowSurface(QWindow *window, WId winId) const
+QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const
{
- Q_UNUSED(winId);
- return new QWaylandShmWindowSurface(window);
+ return new QWaylandShmBackingStore(window);
}
QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h
index e55dec3229..1e22191ff7 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration.h
+++ b/src/plugins/platforms/wayland/qwaylandintegration.h
@@ -58,7 +58,7 @@ public:
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QPlatformWindow *createPlatformWindow(QWindow *window) const;
QPlatformGLContext *createPlatformGLContext(const QGuiGLFormat &glFormat, QPlatformGLContext *share) const;
- QWindowSurface *createWindowSurface(QWindow *window, WId winId) const;
+ QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
QList<QPlatformScreen *> screens() const;
diff --git a/src/plugins/platforms/wayland/qwaylandshmsurface.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
index 520633811c..ccb50a73fb 100644
--- a/src/plugins/platforms/wayland/qwaylandshmsurface.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qwaylandshmsurface.h"
+#include "qwaylandshmbackingstore.h"
#include <QtCore/qdebug.h>
@@ -90,30 +90,30 @@ QWaylandShmBuffer::~QWaylandShmBuffer(void)
wl_buffer_destroy(mBuffer);
}
-QWaylandShmWindowSurface::QWaylandShmWindowSurface(QWindow *window)
- : QWindowSurface(window)
+QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window)
+ : QPlatformBackingStore(window)
, mBuffer(0)
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
{
}
-QWaylandShmWindowSurface::~QWaylandShmWindowSurface()
+QWaylandShmBackingStore::~QWaylandShmBackingStore()
{
}
-QPaintDevice *QWaylandShmWindowSurface::paintDevice()
+QPaintDevice *QWaylandShmBackingStore::paintDevice()
{
return mBuffer->image();
}
-void QWaylandShmWindowSurface::beginPaint(const QRegion &)
+void QWaylandShmBackingStore::beginPaint(const QRegion &)
{
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->handle());
Q_ASSERT(waylandWindow->windowType() == QWaylandWindow::Shm);
waylandWindow->waitForFrameSync();
}
-void QWaylandShmWindowSurface::flush(QWindow *window, const QRegion &region, const QPoint &offset)
+void QWaylandShmBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)
{
Q_UNUSED(window);
Q_UNUSED(offset);
@@ -122,12 +122,11 @@ void QWaylandShmWindowSurface::flush(QWindow *window, const QRegion &region, con
waylandWindow->damage(region);
}
-void QWaylandShmWindowSurface::resize(const QSize &size)
+void QWaylandShmBackingStore::resize(const QSize &size, const QRegion &)
{
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->handle());
Q_ASSERT(waylandWindow->windowType() == QWaylandWindow::Shm);
- QWindowSurface::resize(size);
QImage::Format format = QPlatformScreen::platformScreenForWindow(window())->format();
if (mBuffer != NULL && mBuffer->size() == size)
diff --git a/src/plugins/platforms/wayland/qwaylandshmsurface.h b/src/plugins/platforms/wayland/qwaylandshmbackingstore.h
index 1045709d7c..5e6959dc2f 100644
--- a/src/plugins/platforms/wayland/qwaylandshmsurface.h
+++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.h
@@ -39,11 +39,11 @@
**
****************************************************************************/
-#ifndef QWINDOWSURFACE_WAYLAND_H
-#define QWINDOWSURFACE_WAYLAND_H
+#ifndef QWAYLANDSHMBACKINGSTORE_H
+#define QWAYLANDSHMBACKINGSTORE_H
#include "qwaylandbuffer.h"
-#include <QtGui/private/qwindowsurface_p.h>
+#include <QtGui/QPlatformBackingStore>
#include <QtGui/QImage>
#include <QtGui/QPlatformWindow>
@@ -62,15 +62,15 @@ private:
QImage mImage;
};
-class QWaylandShmWindowSurface : public QWindowSurface
+class QWaylandShmBackingStore : public QPlatformBackingStore
{
public:
- QWaylandShmWindowSurface(QWindow *window);
- ~QWaylandShmWindowSurface();
+ QWaylandShmBackingStore(QWindow *window);
+ ~QWaylandShmBackingStore();
QPaintDevice *paintDevice();
void flush(QWindow *window, const QRegion &region, const QPoint &offset);
- void resize(const QSize &size);
+ void resize(const QSize &size, const QRegion &staticContents);
void beginPaint(const QRegion &);
private:
diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro
index 0a2084df3b..9010439939 100644
--- a/src/plugins/platforms/wayland/wayland.pro
+++ b/src/plugins/platforms/wayland/wayland.pro
@@ -13,7 +13,7 @@ QT += core-private gui-private opengl-private platformsupport-private
SOURCES = main.cpp \
qwaylandintegration.cpp \
qwaylandnativeinterface.cpp \
- qwaylandshmsurface.cpp \
+ qwaylandshmbackingstore.cpp \
qwaylandinputdevice.cpp \
qwaylandcursor.cpp \
qwaylanddisplay.cpp \
@@ -28,7 +28,7 @@ HEADERS = qwaylandintegration.h \
qwaylanddisplay.h \
qwaylandwindow.h \
qwaylandscreen.h \
- qwaylandshmsurface.h \
+ qwaylandshmbackingstore.h \
qwaylandbuffer.h \
qwaylandshmwindow.h \
qwaylandclipboard.h