diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-07-22 09:47:19 -0700 |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-07-22 10:34:15 -0700 |
commit | 95baddfc2f5dc719188f52519c95206959983206 (patch) | |
tree | 0cda7170503bc93f1972278efaac63948c5e347c /src/plugins/gfxdrivers/directfb/qdirectfbscreen.h | |
parent | 7a208874ae5d69d2b70b08f03675ef8f0c843a7f (diff) |
Rewrite QDFBScreen::exposeRegion
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>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbscreen.h')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 090a6858fd..c1289325a8 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -52,7 +52,6 @@ QT_MODULE(Gui) #define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERION << 8) | DIRECTFB_MICRO_VERSION) -#include <QDebug> #define DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(F) \ static inline F operator~(F f) { return F(~int(f)); } \ static inline F operator&(F left, F right) { return F(int(left) & int(right)); } \ @@ -94,7 +93,6 @@ public: void shutdownDevice(); void exposeRegion(QRegion r, int changing); - void blit(const QImage &img, const QPoint &topLeft, const QRegion ®ion); void scroll(const QRegion ®ion, const QPoint &offset); void solidFill(const QColor &color, const QRegion ®ion); @@ -131,9 +129,12 @@ public: QImage::Format format, SurfaceCreationOptions options); IDirectFBSurface *copyToDFBSurface(const QImage &image, - QImage::Format format, - SurfaceCreationOptions options); + QImage::Format format, + SurfaceCreationOptions options); + void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags, + const QRegion ®ion, const QPoint &offset); void releaseDFBSurface(IDirectFBSurface *surface); + void erase(const QRegion ®ion); static int depth(DFBSurfacePixelFormat format); @@ -154,14 +155,9 @@ public: #endif static uchar *lockSurface(IDirectFBSurface *surface, uint flags, int *bpl = 0); - private: IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc, SurfaceCreationOptions options); - void compose(const QRegion &r); - void blit(IDirectFBSurface *src, const QPoint &topLeft, - const QRegion ®ion); - QDirectFBScreenPrivate *d_ptr; friend class SurfaceCache; }; |