From 9dc0914b30a3266be586e1dece931bcdb2f21e49 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 25 Aug 2009 11:19:59 -0700 Subject: Optimize QDirectFBPaintDevice::bytesPerLine If we actually need it locked we'll probably need it locked for read|write. Reviewed-by: Donald Carr --- src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp index f45f256..6abf0ff 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp @@ -104,7 +104,7 @@ int QDirectFBPaintDevice::bytesPerLine() const // Can only get the stride when we lock the surface Q_ASSERT(!lockedImage); QDirectFBPaintDevice* that = const_cast(this); - that->lockDirectFB(DSLF_READ); + that->lockDirectFB(DSLF_READ|DSLF_WRITE); Q_ASSERT(bpl != -1); } return bpl; -- cgit v0.12