diff options
author | Thomas Senyk <thomas.senyk@qt.io> | 2023-02-24 15:43:30 +0100 |
---|---|---|
committer | Thomas Senyk <thomas.senyk@qt.io> | 2023-02-27 08:15:23 +0100 |
commit | 5703d0a242aef9402d4b72ab50fe336f453e49fd (patch) | |
tree | eda56c6a3811eae997041adfee0e6ed654feee7d /src/hardwareintegration/compositor | |
parent | 12da86346954f7290e3e1fb00f5c5f2307d2fd58 (diff) | |
download | qtwayland-5703d0a242aef9402d4b72ab50fe336f453e49fd.tar.gz |
Move setup functions from local to member
Two functions with the same name and signiture were committed in two files.
Normally this isn't an issue as those symbols end up in different plugins,
however for a static Qt build all are linked into the same binary => symbol clash!
Changing those functions to member functions of the respective private classes resolves this issue.
As the original name was rather long, it was also shorted in the process.
Fixes: QTBUG-111473
Pick-to: 6.5
Change-Id: I0f341a64199637a415898309763f9b5416fc4be1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/hardwareintegration/compositor')
2 files changed, 7 insertions, 5 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index 6852c595..b8a5b246 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -147,6 +147,7 @@ public: void initEglTexture(WaylandEglClientBuffer *buffer, EGLint format); bool ensureContext(); bool initEglStream(WaylandEglClientBuffer *buffer, struct ::wl_resource *bufferHandle); + void setupBufferAndCleanup(BufferState *bs, QOpenGLTexture *texture, int plane); void handleEglstreamTexture(WaylandEglClientBuffer *buffer, wl_resource *bufferHandle); void registerBuffer(struct ::wl_resource *buffer, BufferState state); void deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx); @@ -292,7 +293,7 @@ bool WaylandEglClientBufferIntegrationPrivate::ensureContext() } -void setupWaylandEglClientBufferWithTextureContextAndAboutToBeDestroyedConnection(BufferState *bs, QOpenGLTexture *texture, int plane) +void WaylandEglClientBufferIntegrationPrivate::setupBufferAndCleanup(BufferState *bs, QOpenGLTexture *texture, int plane) { QMutexLocker locker(&bs->texturesLock); @@ -368,7 +369,7 @@ bool WaylandEglClientBufferIntegrationPrivate::initEglStream(WaylandEglClientBuf auto texture = new QOpenGLTexture(static_cast<QOpenGLTexture::Target>(GL_TEXTURE_EXTERNAL_OES)); texture->create(); - setupWaylandEglClientBufferWithTextureContextAndAboutToBeDestroyedConnection(buffer->d, texture, 0); + setupBufferAndCleanup(buffer->d, texture, 0); qCDebug(qLcWaylandCompositorHardwareIntegration) << " NEW texture! It's pointer and ctx pointer: " @@ -677,7 +678,7 @@ QOpenGLTexture *WaylandEglClientBuffer::toOpenGlTexture(int plane) texture->setFormat(openGLFormatFromEglFormat(d->egl_format)); texture->setSize(d->size.width(), d->size.height()); texture->create(); - setupWaylandEglClientBufferWithTextureContextAndAboutToBeDestroyedConnection(this->d, texture, plane); + p->setupBufferAndCleanup(this->d, texture, plane); } if (m_textureDirty) { diff --git a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp index 2e2b2829..23883a2a 100644 --- a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp @@ -128,6 +128,7 @@ public: bool ensureContext(); bool initEglStream(WaylandEglStreamClientBuffer *buffer, struct ::wl_resource *bufferHandle); + void setupBufferAndCleanup(BufferState *bs, QOpenGLTexture *texture, int plane); void handleEglstreamTexture(WaylandEglStreamClientBuffer *buffer); void deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx); void deleteOrphanedTextures(); @@ -247,7 +248,7 @@ bool WaylandEglStreamClientBufferIntegrationPrivate::ensureContext() } -void setupWaylandEglClientBufferWithTextureContextAndAboutToBeDestroyedConnection(BufferState *bs, QOpenGLTexture *texture, int plane) +void WaylandEglStreamClientBufferIntegrationPrivate::setupBufferAndCleanup(BufferState *bs, QOpenGLTexture *texture, int plane) { QMutexLocker locker(&bs->texturesLock); @@ -320,7 +321,7 @@ bool WaylandEglStreamClientBufferIntegrationPrivate::initEglStream(WaylandEglStr auto texture = new QOpenGLTexture(static_cast<QOpenGLTexture::Target>(GL_TEXTURE_EXTERNAL_OES)); texture->create(); - setupWaylandEglClientBufferWithTextureContextAndAboutToBeDestroyedConnection(buffer->d, texture, 0); + setupBufferAndCleanup(buffer->d, texture, 0); texture->bind(); |