summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers
Commit message (Collapse)AuthorAgeFilesLines
* Don't assume that raster can do porter duff in dfbAnders Bakken2009-07-171-5/+1
| | | | | | | PorterDuff should only be enabled if the raster engine says it is. E.g. if we're painting on a format with alpha. Reviewed-by: TrustMe
* Clean up qdirectfbpaintengine.cppAnders Bakken2009-07-151-149/+150
| | | | | | | | - Move implementation of debug functions to the bottom of the file. - Move ImageCache stuff to under QDirectFBPaintEnginePrivate - Move SurfaceCache stuff to under QDirectFBPaintEnginePrivate Reviewed-by: Shane McLaughlin <Shane.McLaughlin@trolltech.com>
* Don't force a lock in QDirectFBPaintEngine::clipAnders Bakken2009-07-152-27/+5
| | | | | | | | | | | Pretty much every paint operation on DirectFB surfaces starts with a clipping operations which until now would always cause a IDirectFBSurface->Lock(). This was to make sure QRasterBuffer::prepare had been called so QClipData::initialize() would allocate a big enough array for its spans. We can safely not make QDirectFBPaintDevice::memory() return 0 until we actually fall back. Reviewed-By: Donald <qt-info@nokia.com>
* Clean up rect/line drawing in dfb paintengineAnders Bakken2009-07-151-82/+63
| | | | | | | | Slight optimization by using the pluralized functions when possible. Also make templatized helper functions to avoid near-duplication of code for the float/int cases. Reviewed-by: Donald <qt-info@nokia.com>
* Fix off by one bug in dfbpe::drawTiledPixmapAnders Bakken2009-07-151-4/+4
| | | | | | | The drawTiledPixmap code iterated while x < right and y < bottom. This should be x <= right and y <= bottom. Reviewed-by: Donald <qt-info@nokia.com>
* Fix QDirectFBPixmap::toImageAnders Bakken2009-07-131-0/+5
| | | | | | | | | | Preallocated surfaces can currently be copied to video memory behind our back. This means that we can not use this mechanism for toImage() In later versions of DirectFB this might be possible to toggle with a flag so I'll leave the code in there #if 0'ed Reviewed-by: Donald <qt-info@nokia.com>
* Move ALPHA_PREMULTAnders Bakken2009-07-131-7/+7
| | | | | | | It's only used once and I want to unclutter the top of qdirectfbpaintengine.cpp Reviewed-by: TrustMe
* Remove QDirectFBPaintEnginePrivate::setOpacityAnders Bakken2009-07-131-9/+2
| | | | | | | The function only sets a variable anyway. Replace with: d->opacity = state()->opacity * 255 Reviewed-by: Donald <qt-info@nokia.com>
* Remove unused variables in QDirectFBPaintEngineAnders Bakken2009-07-131-4/+1
| | | | | | fbWidth/fbHeight were never used for anything Reviewed-by: Donald <qt-info@nokia.com>
* Code cleanup in QDirectFBPaintEngineAnders Bakken2009-07-131-13/+13
| | | | | | Take out the QPen member. Reviewed-by: Donald <qt-info@nokia.com>
* Clean up QDirectFBPaintEngine codeAnders Bakken2009-07-131-66/+71
| | | | | | | | | | | | | | | | - Remove unnecessary copy of QTransform - Fold matrixRotShear and scale into transformationFlags. Note that transformationFlags is not a proper bitset of the types of transform but rather set to the most complex operation (from QTransform::type()) and having NegativeScale added if qMin(transform.m11(), transform.m22()) < 0 - Fix a bug whereby setState didn't call setRenderHints - Make everything more readable - Don't initialize state in QDirectFBPaintEngine::begin() QDirectFBPaintEngine::setState will be called from QPainter::begin just before QDirectFBPaintEngine::begin Reviewed-by: Donald <qt-info@nokia.com>
* Fix QDFBPaintEngine::drawTiledPixmap/fillRectAnders Bakken2009-07-101-57/+111
| | | | | | | | | Until this fix very few cases of drawTiledPixmap and fillRect(r, textureBrush) have been handled by DirectFB. This patch makes it possible to accelerate such operations. Reviewed-By: Donald <qt-info@nokia.com>
* QDirectFBPaintEngine return if destRect is nullAnders Bakken2009-07-031-0/+2
| | | | Reviewed-by: Donald <qt-info@nokia.com>
* Better debug output for QDirectFBPaintEngineAnders Bakken2009-07-021-2/+5
| | | | | | Add unsupportedCompositionMode to the output. Reviewed-by: TrustMe
* We still need to Flip in NO_WM modeAnders Bakken2009-07-021-1/+1
| | | | | | This ifdef was simply in the wrong place. Reviewed-by: Donald <qt-info@nokia.com>
* Make sure we check the right deviceAnders Bakken2009-07-011-2/+2
| | | | | | Also. Make sure to call QRasterPaintEngine::end() Reviewed-by: Donald <qt-info@nokia.com>
* Code cleanupAnders Bakken2009-07-011-48/+36
| | | | | | | Move the code from QDirectFBPaintEnginePrivate::(end|begin) into QDirectFBPaintEngine::(end|begin) Reviewed-by: TrustMe
* Remove superfluous call to SetBlittingFlagsAnders Bakken2009-06-291-1/+0
| | | | | | We already do this in QDirectFBWindowSurface::scroll Reviewed-by: TrustMe
* Fix off by one bug in DirectFBPaintEngineAnders Bakken2009-06-241-2/+2
| | | | | | This bug made us call lock more than we needed to. Reviewed-by: Donald <qt-info@nokia.com>
* Fix a rendering issueAnders Bakken2009-06-242-3/+8
| | | | | | Make sure surfaces always are locked when used as source for something. Reviewed-by: TrustMe
* Make sure simplePen gets set properlyAnders Bakken2009-06-241-5/+11
| | | | | | | | | The logic regarding whether or not a pen was simple was broken. Essentially the pen is sonly simple if it should en up as a single pixel line. Reviewed-by: Donald <qt-info@nokia.com>
* Minor optimizationAnders Bakken2009-06-221-1/+0
| | | | | | | No need to set the pen in begin. It's always done before it's used anyway. Reviewed-by: TrustMe
* Bail out on invalid color in fillRectAnders Bakken2009-06-221-1/+6
| | | | Reviewed-by: TrustMe
* Use const ref for foreachAnders Bakken2009-06-221-1/+1
| | | | Reviewed-by: TrustMe
* Update license headers as requested by the marketing department.Jason McDonald2009-06-1639-78/+78
| | | | Reviewed-by: Trust Me
* Get rid of warningsAnders Bakken2009-06-141-2/+2
| | | | Reviewed-by: TrustMe
* Make DirectFB compile with 0.9.22Anders Bakken2009-06-092-3/+8
| | | | | | | Some options were added for 0.9.23. This change adds some ifdefs so DFB 0.9.22 compiles Reviewed-by: TrustMe
* Make the directfb plugin compile against 0.9Anders Bakken2009-06-085-4/+40
| | | | | | | | | | Not sure to what extent it actually works but atleast it compiles now. - A couple of image formats doesn't exist in 0.9 - IDirectFBSurface::ReleaseSource doesn't exist in 0.9 - IDirectFBWindow::SetBounds doesn't exist in 0.9 Reviewed-by: Donald <qt-info@nokia.com>
* Make sure to retain alpha information in copyAnders Bakken2009-06-041-3/+4
| | | | | | We need to set alpha to the right value when copying pixmaps. Reviewed-by: Donald <qt-info@nokia.com>
* Improve readability of QDFBWindowSurface::scrollAnders Bakken2009-06-011-21/+18
| | | | | | The batch-blits buys us nothing and this is much more readable. Reviewed-by: TrustMe
* Don't support porter duff |= source overAnders Bakken2009-05-291-96/+24
| | | | | | | | DirectFB and Qt treats these things rather differently so the mapping just doesn't work very well. Only use DirectFB for SourceOver stuff (which is the default mode anyway) Reviewed-by: Donald <qt-info@nokia.com>
* Remove all force raster on RGB32 stuffAnders Bakken2009-05-284-75/+32
| | | | | | | | | Previously we allowed RGB32 but forced fallbacks for all drawing operations. It turns out blitting operations doesn't work right either so we'll rather just disallow this format altogether. See also 36ae58e7a6a888d3ae7bd162d59daada550bbfb1 Reviewed-by: Donald <qt-info@nokia.com>
* Warn when trying to use an unsupported formatAnders Bakken2009-05-281-5/+10
| | | | | | | Due to incompatibilities between RGB32 in DirectFB and Qt we can't use RGB32. Reviewed-by: Donald <qt-info@nokia.com>
* Removed warningAnders Bakken2009-05-211-1/+1
| | | | | | Explicitly cast to integer. Reviewed-by: Shane McLaughlin <Shane.McLaughlin@trolltech.com>
* Fixed wrong function name in warningAnders Bakken2009-05-121-3/+3
| | | | Reviewed-by: Donald <qt-info@nokia.com>
* initialize all DFBSurfaceDescriptions to 0Anders Bakken2009-05-111-1/+6
| | | | | | Since this is C there are no constructors. Reviewed-by: Donald <qt-info@nokia.com>
* Remove unused variableAnders Bakken2009-05-111-1/+0
| | | | Reviewed-by: TrustMe
* Fix a type in warningAnders Bakken2009-05-111-1/+1
| | | | | | QDirecttFBPixmapData => QDirectFBPixmapData Reviewed-by: TrustMe
* Whitespace fixAnders Bakken2009-05-071-1/+1
| | | | Reviewed-by: TrustMe
* Use proper ways to create "window" surfaceAnders Bakken2009-05-061-9/+1
| | | | Reviewed-by: TrustMe
* Improved debug output for directfb:debugAnders Bakken2009-05-061-6/+10
| | | | | | Include info on the primary surface pixelformat. Reviewed-by: TrustMe
* Pass the scale parameter as an int.Anders Bakken2009-05-061-1/+1
| | | | | | We're just printout out the integer value anyway. Reviewed-by: TrustMe
* Make Scale publicAnders Bakken2009-05-061-1/+3
| | | | | Needed for fallback warnings Reviewed-by: TrustMe
* Cleaned up codeAnders Bakken2009-05-051-24/+20
| | | | | | | | | Put all variables in the same area for QDirectFBPaintEnginePrivate. Make QDirectFBPaintEngine a friend. Also, do away with setClipDirty and replace it with d->clipDirty = true; Reviewed-by: TrustMe
* Cleaned up codeAnders Bakken2009-05-051-439/+443
| | | | | | | Move private functions to the bottom of the file to be more in line with how most qt cpp files are structured. Reviewed-by: TrustMe
* Refactored image cachingAnders Bakken2009-05-057-141/+147
| | | | | | | | | | | Make image caching a lot cleaner and more sensible. By default we do not cache images since creating a preallocated surface is quick and we don't really want to waste memory. In the case where the driver does not support preallocated surfaces you can enable image caching to speed up drawImage. Reviewed-by: TrustMe
* Make sure image caching works with Qt3SupportAnders Bakken2009-05-051-0/+1
| | | | | | | | | Store whether qt was built with qt3support enabled in .qmake.cache. We need this info to decide if QT3_SUPPORT should be defined when we include qimage_p.h. Otherwise we get data corruption issues since the size of struct in Qt is larger than the one we include in libqdirectfb. Reviewed-by: Donald <qt-info@nokia.com>
* Cleaned up code a littleAnders Bakken2009-05-051-41/+28
| | | | | | Made SurfaceCache entirely inline for better readability. Reviewed-by: TrustMe
* Don't call prepare more than necessaryAnders Bakken2009-05-053-22/+37
| | | | | | | | | | | 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>
* DirectFB can't handle "mirrored" scalesAnders Bakken2009-05-051-14/+23
| | | | | | | | Fall back to raster engine when using a transform with m11 < 0 || m22 < 0. Task-number: 252921 Reviewed-by: Donald <qt-info@nokia.com>