Remove requirement to lock graphics buffer before getting total size

QPlatformGraphicsBuffer::byteCount() shouldn't need locking unless
bytesPerLine() is implemented in a way that requires it, in which
case the assert should be in the subclass.

Change-Id: I0fdb04c0a3ab042408d6d17b2759509853573d16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-01-22 16:30:44 +01:00
parent c2b0bca984
commit 775b5e2631

View File

@ -237,7 +237,6 @@ uchar *QPlatformGraphicsBuffer::data()
*/
int QPlatformGraphicsBuffer::byteCount() const
{
Q_ASSERT(isLocked() & SWReadAccess);
return size().height() * bytesPerLine();
}