summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-10-08 13:29:17 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-10-09 07:00:48 +0000
commit43d12496c684b5f2b08c6a8c0b994f06efc25712 (patch)
tree30160366fe6d13a60b934257ce7207dca225df13
parentdc59e9decdaa5ca31b86f7fa63d088fefd35e645 (diff)
Clean up ShmServerBuffer's unused and shadowing membersv5.12.0-beta2
Change-Id: I588ccc782f593ec83a87f75bd88d98f873366395 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp16
-rw-r--r--src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
index 0c43b089..73ff9e6e 100644
--- a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
@@ -88,13 +88,13 @@ static QOpenGLTexture *createTextureFromShm(const QString &key, int w, int h, in
namespace QtWaylandClient {
-ShmServerBuffer::ShmServerBuffer(ShmServerBufferIntegration *integration, const QString &key, int32_t width, int32_t height, int32_t bytes_per_line, int32_t format)
- : m_integration(integration)
- , m_key(key)
- , m_bpl(bytes_per_line)
- , m_format(format)
+
+ShmServerBuffer::ShmServerBuffer(const QString &key, const QSize& size, int bytesPerLine, QWaylandServerBuffer::Format format)
+ : m_key(key)
+ , m_bpl(bytesPerLine)
{
- m_size = QSize(width, height);
+ m_format = format;
+ m_size = size;
}
ShmServerBuffer::~ShmServerBuffer()
@@ -132,7 +132,9 @@ void ShmServerBufferIntegration::wlDisplayHandleGlobal(void *data, ::wl_registry
void QtWaylandClient::ShmServerBufferIntegration::shm_emulation_server_buffer_server_buffer_created(qt_server_buffer *id, const QString &key, int32_t width, int32_t height, int32_t bytes_per_line, int32_t format)
{
- auto *server_buffer = new ShmServerBuffer(this, key, width, height, bytes_per_line, format);
+ QSize size(width, height);
+ auto fmt = QWaylandServerBuffer::Format(format);
+ auto *server_buffer = new ShmServerBuffer(key, size, bytes_per_line, fmt);
qt_server_buffer_set_user_data(id, server_buffer);
}
diff --git a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h
index fef7cfe4..b162d692 100644
--- a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h
+++ b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h
@@ -57,15 +57,13 @@ class ShmServerBufferIntegration;
class ShmServerBuffer : public QWaylandServerBuffer
{
public:
- ShmServerBuffer(ShmServerBufferIntegration *integration, const QString &key, int32_t width, int32_t height, int32_t bytes_per_line, int32_t format);
+ ShmServerBuffer(const QString &key, const QSize &size, int bytesPerLine, QWaylandServerBuffer::Format format);
~ShmServerBuffer() override;
QOpenGLTexture* toOpenGlTexture() override;
private:
- ShmServerBufferIntegration *m_integration = nullptr;
QOpenGLTexture *m_texture = nullptr;
QString m_key;
int m_bpl;
- int m_format;
};
class ShmServerBufferIntegration