summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-08-24 15:19:07 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-08-25 18:25:09 (GMT)
commitdc4e9f4bb91237b26b82e27310eda6808786ce36 (patch)
tree4071cdf55469fc28d004fa877093cf859f620837 /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
parent9dc0914b30a3266be586e1dece931bcdb2f21e49 (diff)
downloadQt-dc4e9f4bb91237b26b82e27310eda6808786ce36.zip
Qt-dc4e9f4bb91237b26b82e27310eda6808786ce36.tar.gz
Qt-dc4e9f4bb91237b26b82e27310eda6808786ce36.tar.bz2
Implement support for DirectFB image providers
Reimplement QPixmapData::fromFile/fromData to load images using IDirectFBImage providers. This functionality might be accelerated on embedded boards and could have potentially large performance enhancements. Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
index c8dda0c..f0ae2f8 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
@@ -62,6 +62,12 @@ public:
// Re-implemented from QPixmapData:
virtual void resize(int width, int height);
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
+#ifdef QT_DIRECTFB_IMAGEPROVIDER
+ virtual bool fromFile(const QString &filename, const char *format,
+ Qt::ImageConversionFlags flags);
+ virtual bool fromData(const uchar *buffer, uint len, const char *format,
+ Qt::ImageConversionFlags flags);
+#endif
virtual void copy(const QPixmapData *data, const QRect &rect);
virtual void fill(const QColor &color);
virtual QPixmap transformed(const QTransform &matrix,
@@ -78,6 +84,9 @@ public:
static bool hasAlphaChannel(const QImage &img);
inline bool hasAlphaChannel() const { return alpha; }
private:
+#ifdef QT_DIRECTFB_IMAGEPROVIDER
+ bool fromDataBufferDescription(const DFBDataBufferDescription &dataBuffer);
+#endif
void invalidate();
bool alpha;
};