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:
parent
c2b0bca984
commit
775b5e2631
@ -237,7 +237,6 @@ uchar *QPlatformGraphicsBuffer::data()
|
||||
*/
|
||||
int QPlatformGraphicsBuffer::byteCount() const
|
||||
{
|
||||
Q_ASSERT(isLocked() & SWReadAccess);
|
||||
return size().height() * bytesPerLine();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user