summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-08-28 03:37:40 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-09-01 22:25:51 (GMT)
commitadd57539ec7cd24346e26b22a5298da50d81e91b (patch)
treefda78f056d25bd876b7348bf732463939b9fe648 /src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
parent913a21aae513714217be233c6cecfb39212a4be8 (diff)
downloadQt-add57539ec7cd24346e26b22a5298da50d81e91b.zip
Qt-add57539ec7cd24346e26b22a5298da50d81e91b.tar.gz
Qt-add57539ec7cd24346e26b22a5298da50d81e91b.tar.bz2
Rewrite of DirectFB locking mechanism
DirectFB allows you to have a locked subSurface that remains valid while you paint on the unlocked "parent" surface. The only limitation is that when accessing the locked memory you might have to call DirectFB->WaitIdle() in case pending GPU operations aren't finished. After this we keep the locked surface around at all times (from the first time it's requested) until the surface dies. Previous calls to lock() will just call WaitIdle if necessary and previous calls to unlock now just mark the surface as dirty and in need of a WaitIdle if someone needs to access its pixel data. Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbscreen.h')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
index e74adb1..0ce7a53 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h
@@ -54,6 +54,9 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
+#if !defined QT_NO_DIRECTFB_SUBSURFACE && !defined QT_DIRECTFB_SUBSURFACE
+#define QT_DIRECTFB_SUBSURFACE
+#endif
#if !defined QT_NO_DIRECTFB_LAYER && !defined QT_DIRECTFB_LAYER
#define QT_DIRECTFB_LAYER
#endif
@@ -166,8 +169,11 @@ public:
return static_cast<QDirectFBScreen*>(inst);
}
+ void waitIdle();
IDirectFBSurface *surfaceForWidget(const QWidget *widget, QRect *rect) const;
+#ifdef QT_DIRECTFB_SUBSURFACE
IDirectFBSurface *subSurfaceForWidget(const QWidget *widget, const QRect &area = QRect()) const;
+#endif
IDirectFB *dfb();
#ifdef QT_NO_DIRECTFB_WM
@@ -199,6 +205,12 @@ public:
IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc,
SurfaceCreationOptions options,
DFBResult *result);
+#ifdef QT_DIRECTFB_SUBSURFACE
+ IDirectFBSurface *getSubSurface(IDirectFBSurface *surface,
+ const QRect &rect,
+ SurfaceCreationOptions options,
+ DFBResult *result);
+#endif
void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags,
const QRegion &region, const QPoint &offset);