summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-12-14 18:23:39 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2010-02-10 17:01:04 (GMT)
commit24239b56ab563a30facde3a5217536e7276f9bb8 (patch)
treeea734b08ca9e879b5b29e454fe6526e7907652ad /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
parent9c8f678ef95ed3eb6eae09a72695a27728a0e1c6 (diff)
downloadQt-24239b56ab563a30facde3a5217536e7276f9bb8.zip
Qt-24239b56ab563a30facde3a5217536e7276f9bb8.tar.gz
Qt-24239b56ab563a30facde3a5217536e7276f9bb8.tar.bz2
Export a function to get dfb-surface from a pixmap
This function is only exported when DirectFB is built as part of libQtGui. Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index f27440e..ba50329 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -593,6 +593,17 @@ void QDirectFBPixmapData::invalidate()
imageFormat = QImage::Format_Invalid;
}
+#ifndef QT_DIRECTFB_PLUGIN
+Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pixmap)
+{
+ const QPixmapData *data = pixmap.pixmapData();
+ if (!data || data->classId() != QPixmapData::DirectFBClass)
+ return 0;
+ const QDirectFBPixmapData *dfbData = static_cast<const QDirectFBPixmapData*>(data);
+ return dfbData->directFBSurface();
+}
+#endif
+
QT_END_NAMESPACE
#endif // QT_NO_QWS_DIRECTFB