summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-03-31 15:58:46 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-04-06 11:13:19 +0200
commitf8a7190d635b8fb2bef7794467b2160ef4d2db41 (patch)
tree4a5b5ceed8ae635066b488e71ab882570374e8f0 /src/plugins/platforms/wayland/qwaylandshmwindow.cpp
parent2c57c935d75b2f35df3248b72b6a2903dd58867f (diff)
Lighthouse: Make wayland event handling happen in a separate thread
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandshmwindow.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmwindow.cpp37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandshmwindow.cpp b/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
index 2808ed65c..c083e5830 100644
--- a/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshmwindow.cpp
@@ -45,10 +45,10 @@
#include <QtCore/QVector>
+#include <QtCore/QDebug>
+
QWaylandShmWindow::QWaylandShmWindow(QWidget *widget)
: QWaylandWindow(widget)
- , mBuffer(0)
- , mWaitingForFrameSync(false)
{
newSurfaceCreated();
}
@@ -69,36 +69,3 @@ QPlatformGLContext * QWaylandShmWindow::glContext() const
return 0;
}
-void QWaylandShmWindow::attach(QWaylandBuffer *buffer)
-{
- mBuffer = buffer;
- if (mSurface) {
- wl_surface_attach(mSurface, buffer->buffer(),0,0);
- }
-}
-
-
-void QWaylandShmWindow::damage(const QRegion &region)
-{
- QVector<QRect> rects = region.rects();
- for (int i = 0; i < rects.size(); i++) {
- const QRect rect = rects.at(i);
- wl_surface_damage(mSurface,
- rect.x(), rect.y(), rect.width(), rect.height());
- }
- mWaitingForFrameSync = true;
- mDisplay->frameCallback(QWaylandShmWindow::frameCallback, this);
-}
-
-void QWaylandShmWindow::newSurfaceCreated()
-{
- if (mBuffer) {
- wl_surface_attach(mSurface,mBuffer->buffer(),0,0);
- }
-}
-
-void QWaylandShmWindow::frameCallback(void *data, uint32_t time)
-{
- QWaylandShmWindow *self = static_cast<QWaylandShmWindow*>(data);
- self->mWaitingForFrameSync = false;
-}