summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't call prepare more than necessaryAnders Bakken2009-05-051-16/+20
| | | | | | | | | | | Store the memory address of our last QRasterBuffer::prepare() call to make sure we reprepare if someone has unlocked and locked the device behind our back. Also optimize QDirectFBDevice::memory() since it might get called a fair bit. Reviewed-by: Donald <qt-info@nokia.com>
* Lock for read only when possibleAnders Bakken2009-05-041-8/+13
| | | | | | | | | | 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>
* Unify IDirectFBSurface->Lock() callsAnders Bakken2009-04-221-13/+6
| | | | | | | | | | | | | | | | Certain compilers warns on this kind of code: uchar *mem = ...; (void**)(&mem) dereferencing type punned pointer etc. Since we had this for every call to Lock I put it all into a convenience function. Also fix some issues where we memcpy'ed more bytes than necessary (when stride != w * depth() / 8) and fix issue with QDirectFBScreen::solidFill with pixelFormat == RGB32 Reviewed-by: Donald <qt-info@nokia.com>
* Optimize bytesPerLine furtherAnders Bakken2009-04-071-1/+0
| | | | | | | | | | | 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
* Silence warning and beautify codeAnders Bakken2009-04-031-24/+4
| | | | | | | Even though these variables couldn't really be used uninitialized GCC 4.3.2 thinks it could. This is nicer, more readable and faster anyway. Reviewed-by: Donald <qt-info@nokia.com>
* Rename functionAnders Bakken2009-03-301-1/+1
| | | | | Everything else capitalizes both the F and the B. s/Fb/FB/g Reviewed-by: TrustMe
* Major surface related fixAnders Bakken2009-03-271-8/+2
| | | | | | | | | | | | | Make sure all QDirectFBPaintDevice surfaces always are created with a format that is either QScreen::pixelFormat() or QDirectFBScreen::alphaPixmapFormat(). Also, clean up surface creation by providing more high level functions. Fix a bug where we would assume that ARGB means Format_ARGB32_Premultiplied and not Format_ARGB32. Reviewed-by: Tom Cooksey
* Optimize bytesPerLine.Anders Bakken2009-03-251-6/+9
| | | | | | No sense in locking every time we want the bpl. The bpl won't change Reviewed-by: Tom Cooksey
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+201