diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-03-29 08:06:52 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-03-29 08:06:52 (GMT) |
commit | a5e1442d8960d3a9f363a8101d02e6fae804b6f8 (patch) | |
tree | e4ccac01df0d33b79dfd06e3f335766e25a34831 /src/gui/painting/qpaintengine_blitter.cpp | |
parent | 9e12625b31e1d95f023fe67deb50e8bf97903994 (diff) | |
download | Qt-a5e1442d8960d3a9f363a8101d02e6fae804b6f8.zip Qt-a5e1442d8960d3a9f363a8101d02e6fae804b6f8.tar.gz Qt-a5e1442d8960d3a9f363a8101d02e6fae804b6f8.tar.bz2 |
Make sure the blitter api works with Raster GS(x11 and win) and QWS
Diffstat (limited to 'src/gui/painting/qpaintengine_blitter.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_blitter.cpp | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp index 1032852..0b74a4d 100644 --- a/src/gui/painting/qpaintengine_blitter.cpp +++ b/src/gui/painting/qpaintengine_blitter.cpp @@ -1,10 +1,13 @@ #include "private/qpaintengine_blitter_p.h" + +#include "private/qblittable_p.h" #include "private/qpaintengine_raster_p.h" #include "private/qpainter_p.h" #include "private/qapplication_p.h" #include "private/qpixmap_blitter_p.h" #ifndef QT_NO_BLITTABLE +QT_BEGIN_NAMESPACE #define STATE_XFORM_SCALE 0x00000001 #define STATE_XFORM_COMPLEX 0x00000002 @@ -617,60 +620,6 @@ inline QRasterPaintEngine *QBlitterPaintEngine::raster() const return d->raster; } -class QBlittablePrivate -{ -public: - QBlittablePrivate(const QRect &rect, QBlittable::Capabilities caps) - : caps(caps), m_rect(rect), locked(false), cachedImg(0) - {} - QBlittable::Capabilities caps; - QRect m_rect; - bool locked; - QImage *cachedImg; -}; - - -QBlittable::QBlittable(const QRect &rect, Capabilities caps) - : d_ptr(new QBlittablePrivate(rect,caps)) -{ -} - -QBlittable::~QBlittable() -{ - delete d_ptr; -} - - -QBlittable::Capabilities QBlittable::capabilities() const -{ - Q_D(const QBlittable); - return d->caps; -} - -QRect QBlittable::rect() const -{ - Q_D(const QBlittable); - return d->m_rect; -} - -QImage *QBlittable::lock() -{ - Q_D(QBlittable); - if (!d->locked) { - d->cachedImg = doLock(); - d->locked = true; - } - - return d->cachedImg; -} - -void QBlittable::unlock() -{ - Q_D(QBlittable); - if (d->locked) { - doUnlock(); - d->locked = false; - } -} - +QT_END_NAMESPACE #endif //QT_NO_BLITTABLE + |