From bf3fdc3f6697cfaec689e8422b6c43cfe49bf9b4 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 6 Apr 2009 22:34:05 -0700 Subject: Optimize bytesPerLine further If we're asking for the stride it's very likely the next thing we'll do is ask for the bits() so there's no good reason to unlock it again. In the raster buffer case memory() will be called just before bytesPerLine() so the code won't be hit but it's still the right thing to do. Reviewed-by: TrustMe --- src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp index edbfa7d..2a2ef5c 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp @@ -110,7 +110,6 @@ int QDirectFBPaintDevice::bytesPerLine() const QDirectFBPaintDevice* that = const_cast(this); that->lockDirectFB(); Q_ASSERT(bpl != -1); - that->unlockDirectFB(); } return bpl; } -- cgit v0.12