From 405f78f8e1ef68ebce2abd790820438c9e420755 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 9 Apr 2009 09:32:57 -0700 Subject: Inline hasAlphaChannel and add pixelFormat getter Reviewed-by: TrustMe --- src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 5 ----- src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index a4e235b..0a1696a 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -283,11 +283,6 @@ void QDirectFBPixmapData::fill(const QColor &color) } } -bool QDirectFBPixmapData::hasAlphaChannel() const -{ - return alpha; -} - QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, Qt::TransformationMode mode) const { diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h index 7aa6df8..6cfafcd 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h @@ -64,7 +64,7 @@ public: void fromImage(const QImage &image, Qt::ImageConversionFlags flags); void copy(const QPixmapData *data, const QRect &rect); void fill(const QColor &color); - bool hasAlphaChannel() const; + inline bool hasAlphaChannel() const { return alpha; } QPixmap transformed(const QTransform &matrix, Qt::TransformationMode mode) const; QImage toImage() const; @@ -73,7 +73,7 @@ public: // Pure virtual in QPixmapData, so re-implement here and delegate to QDirectFBPaintDevice int metric(QPaintDevice::PaintDeviceMetric m) const {return QDirectFBPaintDevice::metric(m);} - + inline QImage::Format pixelFormat() const { return format; } private: void invalidate(); QDirectFBPaintEngine *engine; -- cgit v0.12