summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-22 18:19:54 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-24 20:25:00 +0000
commitc907becbf166593c1b6b21e92eef032fefe48aba (patch)
tree71a5ac9cdfa7a4bb3a6a48b5f6227639290ecdf8
parenta905d9d91c229ea2760c54e5375ece35aa081b7a (diff)
Always unlock graphics buffer after binding texture during composeAndFlush
The code path for re-generating the texture already has the unlock, but the non-regenerating code-path was missing an unlock, causing asserts when the graphics buffer was then attempted to be locked (again) at a later point. Change-Id: Ic65add838360079829b7e81d7c1cfe2274959059 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 3081a4b1b6..afb4613ba5 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -411,6 +411,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
} else if (!region.isEmpty()){
funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
QPlatformGraphicsBufferHelper::lockAndBindToTexture(graphicsBuffer, &d_ptr->needsSwizzle, &d_ptr->premultiplied);
+ graphicsBuffer->unlock();
}
if (graphicsBuffer->origin() == QPlatformGraphicsBuffer::OriginBottomLeft)