summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Beautify displayArgs parsingAnders Bakken2009-04-091-12/+18
| | | | | | | | Also add support for setting the width and height of the primary surface using display arguments (which can be good when debugging performace issues). Reviewed-by: Donald <qt-info@nokia.com>
* Take out the DSCAPS_TRIPLE when not blittingAnders Bakken2009-04-091-7/+0
| | | | | | | | | | When this code was written there was never a case when we would not blit our flips and hence the entire if (!(flipFlags & DSFLIP_BLIT)) business seems not to have been tested anyway. Since I don't see the point of this I am taking it out. Might enable us to actually create the primary surface in video memory more often. Reviewed-by: TrustMe
* Better warnings when primary is not in videomemAnders Bakken2009-04-091-3/+5
| | | | | | | If connect options are set to include videoonly and creating the primary surface in video memory fails warn even in release mode. Reviewed-by: TrustMe
* Clean up code a little and get rid extra memcpysAnders Bakken2009-04-091-48/+3
| | | | | | | | | The QVarLengthArray approach makes no sense with DirectFB. Draw.*s is a regular function call and the receiving function even memcpy's the data on arrival anyway. Just call the Draw.* functions one by one Reviewed-by: TrustMe
* Fix setOpacityAnders Bakken2009-04-091-6/+8
| | | | | | | | Opacity doesn't play well with PorterDuff so we need to disable the porter duff when opacity is set. Also the DSBLIT_SRC_PREMULTCOLOR flag is not the right thing for us. Reviewed-by: TrustMe
* Inline hasAlphaChannel and add pixelFormat getterAnders Bakken2009-04-092-7/+2
| | | | Reviewed-by: TrustMe
* Make sure to update the member opacity variableAnders Bakken2009-04-091-1/+2
| | | | Reviewed-by: TrustMe
* Be smarter about alpha formatsAnders Bakken2009-04-093-32/+133
| | | | | | | | | Try harder to prevent blends by explicitly checking for alpha pixels in the source image (unless asked not to). Can be defined out by #defining QT_NO_DIRECTFB_OPAQUE_DETECTION Reviewed-by: Donald <qt-info@nokia.com>
* Make flipping and paintOnScreen work betterAnders Bakken2009-04-091-12/+14
| | | | | | | Make the paintOnScreen case paint directly on the primary surface if the size of the window surface == size of primary surface. Reviewed-by: Donald <qt-info@nokia.com>
* Diagnostic info when failing to create surfaceAnders Bakken2009-04-081-0/+10
| | | | | | | Only enabled in debug builds since it could something that should be ignored. Reviewed-by: Donald <qt-info@nokia.com>
* Fix up drawing/blitting/porterduff situationAnders Bakken2009-04-081-135/+77
| | | | | | | | | | This was rather broken previously. For example, porterduff mode does not play well with alpha values and blends. Also, setting the flags to the existing value is a noop in DirectFB (checked the code) so bool dirty approach buys us nothing. Reviewed-by: Donald <qt-info@nokia.com>
* Don't convert unsupported images for dfbAnders Bakken2009-04-081-9/+4
| | | | | | | Fall back to raster engine for formats not supported by dfb rather than converting the image to a supported format. Reviewed-by: Donald <qt-info@nokia.com>
* Work around RGB32 issue in solidFillAnders Bakken2009-04-071-15/+22
| | | | | | | | | Drawing operations with DirectFB in RGB32 changes the alpha byte to 0. This doesn't play well with QRasterEngine. See 5fb7752ff93b31635e64fa321917749744cc9db6 and 34059fba55816496d2570b3306ac2b631b12a5c6 Reviewed-by: TrustMe
* Make flipflags work a little better.Anders Bakken2009-04-073-24/+41
| | | | | | | | Make it more flexible. This patch allows people to use DFB without DSFLIP_BLIT. Also, before this patch the flip= options weren't really used for anything. Reviewed-by: TrustMe
* Make sure to clear surface in toImageAnders Bakken2009-04-071-1/+6
| | | | | | | It seems DirectFB doesn't preserve alpha value of a blit unless BLEND is specified and if it is we need to Clear to transparent first. Reviewed-by: TrustMe
* Kill some warningsAnders Bakken2009-04-071-0/+6
| | | | Reviewed-by: TrustMe
* Approriate warning with incompatible optionsAnders Bakken2009-04-071-0/+4
| | | | | | QT_NO_DIRECTFB_LAYER doesn't work unless QT_NO_DIRECTFB_WM also is defined. Reviewed-by: TrustMe
* Code cleanup.Anders Bakken2009-04-072-9/+9
| | | | | | QDirectFBPaintDevice's know their screen. No need to use instance() in these cases. Reviewed-by: TrustMe
* Call ReleaseSource where appropriateAnders Bakken2009-04-073-2/+5
| | | | | | | | DirectFB caches the last source surface in the target surface after a Blit. This can cause a surface to be kept around longer than desired since the caching increases the ref-count. Unless it's likely that the blit will happen again soon we Release the source. Reviewed-by: TrustMe
* Better QDirectFBPixmapData::toImage()Anders Bakken2009-04-071-0/+11
| | | | | | | | | This is essentially a return to the earlier version of toImage(). Use a preallocated surface that operates on the returned image to do the conversion. If this causes drawing bugs it is likely a bug in the directfb driver and can be worked around by compiling with QT_NO_DIRECTFB_PREALLOCATED. Reviewed-by: TrustMe
* 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
* Optimize fillRects/fillRegionAnders Bakken2009-04-071-23/+5
| | | | | | | This is not X11. There's no need to create another structure to hold the DFB rectangles. Verified by DirectFB expert. Reviewed-by: TrustMe
* Cleanup. This function is no longer used.Anders Bakken2009-04-071-10/+0
| | | | Reviewed-by: TrustMe
* Make sure to set blitting flagsAnders Bakken2009-04-073-25/+43
| | | | | | | | | Need to set blitting flags before blitting from a surface with alpha channel. Otherwise alpha areas become white. For some reason setting the porterduff to DSPD_SRC does not fix this. Reviewed-by: TrustMe
* Improve QDirectFBPixmapData::copyAnders Bakken2009-04-071-2/+8
| | | | | | Make sure we retain the alpha channel of the original surface. Reviewed-by: TrustMe
* Improve QDirectFBPixmapData::transformedAnders Bakken2009-04-071-5/+14
| | | | | | Make sure we keep retain alpha if there is one in the source. Reviewed-by: TrustMe
* Clean up surface creation codeAnders Bakken2009-04-071-9/+5
| | | | | | Use the intended functions for surface creation. Reviewed-by: TrustMe
* Make sure to dirty clip in setStateAnders Bakken2009-04-071-2/+1
| | | | | | | | | For an example of something that breaks without this fix show a spinbox in plastique style. The clip is never removed. Reviewed-by: TrustMe
* Make windows the right formats and videoonlyAnders Bakken2009-04-071-5/+14
| | | | | | | | CreateWindow gives you more control over how windows are created. Make sure to specify that they're in the same format as the primary surface and that they're in video memory if this is supported. Reviewed-by: TrustMe
* Make sure RGB32 workaround works for windowsAnders Bakken2009-04-071-0/+3
| | | | | Need to set forceRaster to true if the window surface is RGB32. Reviewed-by: TrustMe
* Pens can have brushesAnders Bakken2009-04-071-1/+3
| | | | | DirectFB can only handle cases where the pen's brush is Qt::SolidPattern Reviewed-by: TrustMe
* Fix up some QT_...NO_PALETTE codepathsAnders Bakken2009-04-071-4/+6
| | | | | | | Make sure we create the surface from the converted image and not the original one. Reviewed-by: TrustMe
* Don't use uninitialized capsAnders Bakken2009-04-061-2/+6
| | | | | | | If flags does not contain DSDESC_CAPS caps might very well be uninitialized. Make sure to properly deal with this situation. Reviewed-by: Donald <qt-info@nokia.com>
* Add some timing capabilitiesAnders Bakken2009-04-043-1/+26
| | | | | | | Add some frames-per-second output for debugging when QT_DIRECTFB_TIMING is defined. Reviewed-by: Donald <qt-info@nokia.com>
* QScreen::flush() no longer draws the titlebarAnders Bakken2009-04-041-5/+0
| | | | | | We don't need to chain to the base class anymore. Reviewed-by: Donald <qt-info@nokia.com>
* Silence warning and beautify codeAnders Bakken2009-04-032-24/+13
| | | | | | | 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>
* Suppress unnecessary "Could not re-create the temporary EGL surface" warningsRhys Weatherley2009-04-031-1/+1
| | | | | | | The wrong temporary surface id was being used to recreate the EGL surface. It was "tempSurface" when it should have been -1. Reviewed-by: Ian Walters
* Add information about QT_* defines that are needed to make PowerVR workRhys Weatherley2009-04-031-0/+3
| | | | | | | The QT_QWS_CLIENTBLIT and QT_NO_QWS_CURSOR defines must be supplied or the direct paint regions used by the PowerVR driver won't work. Reviewed-by: trustme
* CompileAnders Bakken2009-03-311-1/+0
| | | | | | I messed up the cherry-pick merge and left one of these in. Reviewed-by: TrustMe
* Remove these convenience functions.Anders Bakken2009-03-311-22/+12
| | | | | | | They only make sense under the assumption that there most of the time is no transform. With Falcon this isn't really the case. Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* No sense in detecting the format twiceAnders Bakken2009-03-311-6/+2
| | | | | | | Use the format passed in to the function rather than detecting it again based on hasAlphaChannel(). Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* Prevent crash on resizingAnders Bakken2009-03-311-4/+16
| | | | | | | | | | The crash was caused by out-of-bounds reading on the raster engine's clipping structures since our size had changed size last lock. This code makes sure the clipData structures are atleast as tall as the current height of the paint device. Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* Take out todos that have been doneAnders Bakken2009-03-301-5/+0
| | | | | | Clipping for drawLines works fine. textureBrushes are now accelerated Reviewed-by: TrustMe
* Compile with QT_NO_DIRECTFB_PREALLOCATEDAnders Bakken2009-03-301-2/+2
| | | | | | Use the right surface for locking/unlocking. Reviewed-by: TrustMe
* Compile with QT_NO_DIRECTFB_WMAnders Bakken2009-03-301-1/+1
| | | | | | s/QDirectFBSurface/QDirectFBScreen/g Reviewed-by: TrustMe
* Rename functionAnders Bakken2009-03-305-8/+8
| | | | | Everything else capitalizes both the F and the B. s/Fb/FB/g Reviewed-by: TrustMe
* Work around raster engine not ignoring the pad byte in RGB32Anders Bakken2009-03-303-55/+78
| | | | | | | | | | | | | DirectFB sets the alpha byte to 0 in RGB32 for all drawing operations. The raster paint engine needs this padding byte to be 0xFF as it shares some code paths with RGBA8888_Premultiplied. So, always fall back to raster engine for draw operations. This is really due to a bug in the raster paint engine (Tracked by task 184073), which should ignore the extra byte. Once this task is fixed, this patch can probably be reverted. Reviewed-by: Tom Cooksey
* Major surface related fixAnders Bakken2009-03-276-217/+327
| | | | | | | | | | | | | 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
* Fix flipping.Anders Bakken2009-03-251-5/+16
| | | | | | | | Fixes two bugs with regards to Flip(). We blit'ed the boundingRect of the updated region rather than each rect which is wasteful. More importantly we ignored the offset which would lead to painting errors. Reviewed-by: Tom Cooksey
* Clean up locking/unlockingAnders Bakken2009-03-251-21/+11
| | | | | | | | Store the QDirectFBPaintDevice we're painting and use this when unlocking/locking instead of working on QPaintEngine::device() which isn't necessarily the same. Reviewed-by: Tom Cooksey