summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-05-04 17:38:37 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-05-04 17:48:02 (GMT)
commit885adf0541e4b709bf5a3774361e85db2a35fc47 (patch)
tree6f4ca4ef6870876d4286d2f1ba4939de95a55e21 /src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
parenta5c1161fb6bb2a24cebc104bc2a9b8def0a6e466 (diff)
downloadQt-885adf0541e4b709bf5a3774361e85db2a35fc47.zip
Qt-885adf0541e4b709bf5a3774361e85db2a35fc47.tar.gz
Qt-885adf0541e4b709bf5a3774361e85db2a35fc47.tar.bz2
Lock for read only when possible
From benchmarking I've established that surface->Lock(DSLF_READ) is faster than surface->Lock(DSLF_WRITE) which is faster than surface->Lock(DSLF_READ|DSLF_WRITE). This patch will make us Lock for read only, when possible. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index c1b75c5..9ec5f5f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1336,12 +1336,12 @@ bool QDirectFBScreen::initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *d
return true;
}
-uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl)
+uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, uint flags, int *bpl)
{
void *mem;
- const DFBResult result = surface->Lock(surface, flags, static_cast<void**>(&mem), bpl);
+ const DFBResult result = surface->Lock(surface, static_cast<DFBSurfaceLockFlags>(flags), static_cast<void**>(&mem), bpl);
if (result != DFB_OK) {
- DirectFBError("QDirectFBPixmapData::lockSurface()", result);
+ DirectFBError("QDirectFBScreen::lockSurface()", result);
}
return reinterpret_cast<uchar*>(mem);