summaryrefslogtreecommitdiff
path: root/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement QDirectFBScreen::surfaceForWidgetAnders Bakken2009-08-261-0/+31
| | | | | | | | | | Allow applications to get a pointer to the surface of the window surface for a given widget or a subsurface of the widget. This function ignores whether or not the widget is fully or partially obscured. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* Render cursor with a window in dfb if desiredAnders Bakken2009-08-251-4/+162
| | | | | | | | Some DFB implementations do not support rendering the cursor using the intended interfaces. In these cases one can define QT_DIRECTFB_WINDOW_AS_CURSOR and use a window to render the cursor. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* Implement support for keeping image provider aliveAnders Bakken2009-08-251-0/+25
| | | | | | | | | | | If you define QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE we make sure atleast one IDirectFBImageProvider is alive at all times. Apparently this is refcounted by DirectFB on atleast one implementation and there's considerable overhead involved when releasing the last/creating the first image provider. Reviewed-by: TrustMe
* Refactor QDirectFBPaintDevice/QDirectFBPixmapDataAnders Bakken2009-08-251-0/+36
| | | | | | Move format into QDirectFBPaintDevice. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* Optimize createDFBSurfaceAnders Bakken2009-08-241-10/+11
| | | | | | When possible do a single memcpy instead of one per scan-line. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* Improve error reporting in DFBScreenAnders Bakken2009-08-241-18/+28
| | | | | | | Make it possible to pass a DFBResult* around to get notified of errors in calling functions. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* s/hasAlpha/hasAlphaChannel/gAnders Bakken2009-08-241-1/+1
| | | | | | Make it more consistent. Reviewed-by: TrustMe
* Clean up surface creation code in dfbAnders Bakken2009-08-211-124/+43
| | | | | | | Don't try too hard to temporarily represent an image in a real directfb surface. It leads to all sorts of rendering issues. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* Support RGB32 in DirectFB againAnders Bakken2009-08-201-8/+8
| | | | | | | | If I make sure all surfaces that Qt may paint on are ARGB instead of RGB32 the problem that was solved by cef63710576571405b4eed7b225e6c895a633d6a is still solved. Reviewed-by: Donald <qt-info@nokia.com>
* Make sure windows raise properly when focusedAnders Bakken2009-08-181-1/+24
| | | | | | | | | | We never used to properly raise windows with DirectFB's window management. Somehow the event happens on a window surface that doesn't really have a IDirectFBWindow associated with it but using permanentState I can establish a sibling relationship to ensure raise gets called on the right window surface. Reviewed-By: Donald <qt-info@nokia.com>
* Make sure to update pos QDFBCursor::moveAnders Bakken2009-08-181-0/+1
| | | | | | | | We don't need to chain to the base class since the QDirectFBScreenCursor always is rendered by hardware but we should update the pos variable in case people ask where the cursor is. Reviewed-by: TrustMe
* Clean up DirectFB with WM enabledAnders Bakken2009-08-171-50/+96
| | | | | | | | When we have proper window manager support from DirectFB we shouldn't create our own primary surface. This patch vastly cleans up a number of issues in QDirectFBScreen regarding this. Reviewed-by: Donald <qt-info@nokia.com>
* Clean up primary surface handling in DFBAnders Bakken2009-08-171-25/+23
| | | | | | | To avoid confusion rename QDirectFBScreen::dfbSurface() primarySurface() since this is what it is. Reviewed-by: Donald <qt-info@nokia.com>
* Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | Reviewed-by: Trust Me
* Merge branch '4.5'Thiago Macieira2009-08-031-11/+10
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsharedpointer.cpp src/corelib/tools/qsharedpointer_impl.h src/gui/dialogs/qcolordialog.cpp src/gui/painting/qwindowsurface_raster.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qsharedpointer/externaltests.cpp
| * Refactor QDirectFBPaintDeviceAnders Bakken2009-07-281-4/+6
| | | | | | | | | | | | | | | | | | | | Make the engine a member in QDirectFBPaintDevice instead of one in QDirectFBPixmapData and one in QDirectFBWindowSurface. Don't use the default screen for the dfbpaintdevices. Pass one explicitly. Reviewed-by: Noam Rosenthal <noam.rosenthal@nokia.com>
| * Remove ignore system clip stuff in dfbpaintengineAnders Bakken2009-07-271-3/+0
| | | | | | | | Reviewed-by: Donald <qt-info@nokia.com>
| * Fix off-by-one bug in QDirectFBScreen::flipSurfaceAnders Bakken2009-07-271-4/+4
| | | | | | | | | | | | | | | | | | | | DFBRegions are exactly like QRects it turns out. x2/y2 == QRect::right()/QRect::bottom() This means I actually can reinterpret_cast QRect to DFBRegions but it's not really worth it. Reviewed-by: Noam Rosenthal <noam.rosenthal@nokia.com>
* | Remove a warning in qdirectfbpaintengineAnders Bakken2009-07-281-3/+1
|/ | | | | | These structures are only used in versions after 0.922. Reviewed-by: Donald <qt-info@nokia.com>
* Fix a bug in directfb mouse handlingAnders Bakken2009-07-221-1/+1
| | | | | | | | | | | Always check the mouse data we read for coordinates rather than asking the layer. This approach works whether we have layers enabled/window management enabled or any combination thereof. Also, make sure we use a software cursor when either of NO_WM or NO_LAYER is defined. Reviewed: Donald <qt-info@nokia.com>
* Use BatchBlit in flush/exposeRegionAnders Bakken2009-07-221-10/+15
| | | | | | | | | Minor optimization. Also make sure cursor is drawn in flush even if we're not in Offscreen mode. Reviewed-by: TrustMe
* Use dfbsurface::FillRectangles in solidFillAnders Bakken2009-07-221-5/+15
| | | | | | Minor optimization Reviewed-by: Donald <qt-info@nokia.com>
* Fix IDirectFBSurface::ReleaseSource callsAnders Bakken2009-07-221-1/+2
| | | | | | Make sure that these calls are in the right order. Reviewed-by: Donald <qt-info@nokia.com>
* Rewrite QDFBScreen::exposeRegionAnders Bakken2009-07-221-167/+119
| | | | | | | | | | | | | | | This code should be a noop in the case where one has a proper dfb cursor and proper dfb window handling. This was the only case it actually worked. This patch makes it work for a screen cursor rendered by Qt and sets exposeRegion up to work for using an offscreen backing store. Since one can't query the background color set by directfb this patch also adds a connect option to set the background color. This is needed for erasing the background when the mouse cursor moves. Reviewed-by: Donald <qt-info@nokia.com>
* Don't create dfbsurface in video mem if systemonlyAnders Bakken2009-07-171-1/+3
| | | | | | | If DSCAPS_SYSTEMONLY is specified we shouldn't try to create the surface in video memory. Reviewed-by: TrustMe
* Clean up directfb bit flippingAnders Bakken2009-07-171-36/+26
| | | | | | | | | | | | | | DirectFB declares variables that are bit fields as enums. E.g. DFBSurfaceCapabilities caps; caps |= DSCAPS_LOCK; // doesn't compile in C++ Work around this problem by declaring operators for these operations. This greatly improves the readability of the code. Reviewed-by: TrustMe
* Use const ref for foreachAnders Bakken2009-06-211-1/+1
| | | | Reviewed-by: TrustMe
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Make DirectFB compile with 0.9.22Anders Bakken2009-06-081-3/+6
| | | | | | | 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-081-0/+14
| | | | | | | | | | 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>
* 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>
* 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>
* Improved debug output for directfb:debugAnders Bakken2009-05-061-6/+10
| | | | | | Include info on the primary surface pixelformat. Reviewed-by: TrustMe
* Refactored image cachingAnders Bakken2009-05-051-3/+10
| | | | | | | | | | | 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
* Improved debug outputAnders Bakken2009-05-051-30/+30
| | | | | | | Format the debug info on blitting, drawing and acceleration capabilities better. Reviewed-by: TrustMe
* Rename QDirectFBSurface to QDirectFBWindowSurfaceAnders Bakken2009-05-041-6/+6
| | | | | | | This helps avoid confusion between IDirectFBSurface and QDirectFBSurface. Reviewed-by: Donald <qt-info@nokia.com>
* Lock for read only when possibleAnders Bakken2009-05-041-3/+3
| | | | | | | | | | 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>
* Implemented an option to tune flippingAnders Bakken2009-05-031-0/+4
| | | | | | | | export QWS_DISPLAY=directfb:boundingrectflip to enable calling Flip on the bounding rect of the dirtied area rather than each dirty rectangle. This could be faster if you update many small rectangles. Reviewed-by: TrustMe
* Beautified codeAnders Bakken2009-05-021-10/+10
| | | | | | Qt's coding style => Object *ptr, not Object* ptr Reviewed-by: TrustMe
* Improve debug output (in debug mode only)Anders Bakken2009-05-011-2/+83
| | | | | | | Print out detailed information about acceleration mask, blitting flags and drawing flags when passing debug. Reviewed-by: Donald <qt-info@nokia.com>
* Extended surface capabilitiesAnders Bakken2009-05-011-5/+29
| | | | | | | Clean up code and make it possible to set more DFBSurfaceCapabilities on the primary surface. Also allow users to force systemonly for the surfaces.
* Cleaned up surface creation codeAnders Bakken2009-05-011-20/+19
| | | | | | | | Since I am taking a copy of the description anyway it makes sense to just pass this light-weight object in as a copy rather than a const pointer. Reviewed-by: Donald <qt-info@nokia.com>
* Remove superfluous call to base classAnders Bakken2009-04-281-2/+2
| | | | | | | | Make code more readable by not chaining to QScreenCursor for hide/show. Since hwaccel is true we don't need the exposeRegion call anyway. Reviewed-by: TrustMe
* Cleaned up mouse/cursor codeAnders Bakken2009-04-281-19/+0
| | | | | | | | | The enabling/disabling of the Cursor belongs in the QDirectFBMouseHandler class and not in the QDirectFBScreenCursor. Even if we use the Qt software cursor we need the events to come in from the mouse handler. Reviewed-by: TrustMe
* Fixed cursors with QT_NO_DIRECTFB_PREALLOCATEDAnders Bakken2009-04-281-75/+75
| | | | | | | | | | Refactor cursor management code to do. No need to change the cooperative level four times for each show/hide. Simplify code a little. Also we used to disable the cursor when we wanted to hide it which meant that we no longer received mouse events. Reviewed-by: Donald <qt-info@nokia.com>
* Fold boolean options into flagsAnders Bakken2009-04-281-15/+8
| | | | | | | Instead of having multiple bool QDirectFBScreen::.* getters I added DirectFBFlags QDirectFBScreen::directFBFlags() function. Reviewed-by: TrustMe
* Added an option for ignoring the system clipAnders Bakken2009-04-281-0/+9
| | | | | | | | | | | | This is currently the only way I can make QGraphicsView not have to fall back to the raster engine for all operations. It seems the QRegion passed to the paintEvent of QGraphicsView also is set as the systemClip which in the end makes the QRasterPaintEngine's clipRegion equal the systemClip. By exporting QWS_DISPLAY=directfb:ignoresystemclip you can now draw without having a complex clip and therefore take advantage of hw acceleration with DirectFB. Reviewed-By: Donald <qt-info@nokia.com>
* CompileAnders Bakken2009-04-221-2/+2
| | | | Reviewed-by: TrustMe
* Kill some warningsAnders Bakken2009-04-221-3/+2
| | | | | | | Refactor two small things so that we don't get warnings when QT_DIRECTFB_NO_(OPAQUEDETECTION|MOUSE|KEYBOARD) is defined Reviewed-by: Shane McLaughlin <Shane.McLaughlin@trolltech.com>