diff options
author | Thomas Senyk <thomas.senyk@qt.io> | 2023-02-24 15:43:30 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-27 12:59:28 +0000 |
commit | e0538a6df52ada8185aa1f92e45e40e9c634d19d (patch) | |
tree | 25c39a63c161cc09e160122f86fd051a92665624 /src/hardwareintegration | |
parent | 0a26cbb46b3f4efd82ece41262aff1011eadf645 (diff) | |
download | qtwayland-e0538a6df52ada8185aa1f92e45e40e9c634d19d.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
Change-Id: I0f341a64199637a415898309763f9b5416fc4be1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 5703d0a242aef9402d4b72ab50fe336f453e49fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/hardwareintegration')
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(); |