diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2012-04-06 13:35:43 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-04-10 18:54:33 +0200 |
commit | a72e662b4e5c45988bbe06d587e167901b5606da (patch) | |
tree | 74f4aa9e6338ac62b90403bcd914065d8f08a8b0 /src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp | |
parent | 585a1080cc755c0c7820a06ecfd059f75af60bfd (diff) |
Update wayland_sha1 and implement buffer_pool interface
Change-Id: I0628a7655a6deb061a5d0b6c6304c89d8655cf11
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp index 7efa72545..6aafd1c98 100644 --- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp +++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp @@ -79,7 +79,8 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display, } mImage = QImage(data, size.width(), size.height(), stride, format); - mBuffer = wl_shm_create_buffer(display->shm(),fd, size.width(), size.height(), + mShmPool = wl_shm_create_pool(display->shm(), fd, alloc); + mBuffer = wl_shm_pool_create_buffer(mShmPool,0, size.width(), size.height(), stride, WL_SHM_FORMAT_ARGB8888); close(fd); } @@ -88,6 +89,7 @@ QWaylandShmBuffer::~QWaylandShmBuffer(void) { munmap((void *) mImage.constBits(), mImage.byteCount()); wl_buffer_destroy(mBuffer); + wl_shm_pool_destroy(mShmPool); } QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window) @@ -122,7 +124,6 @@ void QWaylandShmBackingStore::flush(QWindow *window, const QRegion ®ion, cons QVector<QRect> rects = region.rects(); for (int i = 0; i < rects.size(); i++) { const QRect rect = rects.at(i); - wl_buffer_damage(mBuffer->buffer(),rect.x(),rect.y(),rect.width(),rect.height()); waylandWindow->damage(rect); } } |