diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-08-24 15:19:07 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-08-25 18:25:09 (GMT) |
commit | dc4e9f4bb91237b26b82e27310eda6808786ce36 (patch) | |
tree | 4071cdf55469fc28d004fa877093cf859f620837 /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h | |
parent | 9dc0914b30a3266be586e1dece931bcdb2f21e49 (diff) | |
download | Qt-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.h | 9 |
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; }; |