diff --git a/src/wayland/server/buffer_interface.cpp b/src/wayland/server/buffer_interface.cpp index 977edbc03f..4e0b33a3be 100644 --- a/src/wayland/server/buffer_interface.cpp +++ b/src/wayland/server/buffer_interface.cpp @@ -314,6 +314,16 @@ wl_resource *BufferInterface::resource() const return d->buffer; } +int BufferInterface::width() const +{ + return d->size.width(); +} + +int BufferInterface::height() const +{ + return d->size.height(); +} + QSize BufferInterface::size() const { return d->size; diff --git a/src/wayland/server/buffer_interface.h b/src/wayland/server/buffer_interface.h index c3b95c6881..1be5bab74d 100644 --- a/src/wayland/server/buffer_interface.h +++ b/src/wayland/server/buffer_interface.h @@ -119,6 +119,14 @@ public: **/ QImage data(); + /** + * Returns the width of the buffer in device pixels. + */ + int width() const; + /** + * Returns the height of the buffer in device pixels. + */ + int height() const; /** * Returns the size of this BufferInterface. * Note: only for shared memory buffers (shmBuffer) the size can be derived,