diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-07 07:21:30 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-07 07:21:30 (GMT) |
commit | a3c1b0703575ed5fc364011c73dc104ecdb8ef0c (patch) | |
tree | 4e57559b1753c7b1eb3f375aa59eee6ea1108f70 /src/openvg/qpixmapdata_vg_p.h | |
parent | f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02 (diff) | |
parent | 7a5bca82738e6b782047e50a813972eccd928307 (diff) | |
download | Qt-a3c1b0703575ed5fc364011c73dc104ecdb8ef0c.zip Qt-a3c1b0703575ed5fc364011c73dc104ecdb8ef0c.tar.gz Qt-a3c1b0703575ed5fc364011c73dc104ecdb8ef0c.tar.bz2 |
Merge branch '4.6' of ../../4.6 into 4.6
Conflicts:
examples/multimedia/audiodevices/audiodevices.cpp
Diffstat (limited to 'src/openvg/qpixmapdata_vg_p.h')
-rw-r--r-- | src/openvg/qpixmapdata_vg_p.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h index c0bb098..4ff95c1 100644 --- a/src/openvg/qpixmapdata_vg_p.h +++ b/src/openvg/qpixmapdata_vg_p.h @@ -63,6 +63,7 @@ class RSGImage; QT_BEGIN_NAMESPACE class QEglContext; +class QVGImagePool; #if !defined(QT_NO_EGL) class QVGPixmapData; @@ -101,6 +102,9 @@ public: // Return the VGImage form for a specific opacity setting. virtual VGImage toVGImage(qreal opacity); + // Detach this image from the image pool. + virtual void detachImageFromPool(); + // Release the VG resources associated with this pixmap and copy // the pixmap's contents out of the GPU back into main memory. // The VG resource will be automatically recreated the next time @@ -109,6 +113,10 @@ public: // process via a SgImage). virtual void hibernate(); + // Called when the QVGImagePool wants to reclaim this pixmap's + // VGImage objects to reuse storage. + virtual void reclaimImages(); + QSize size() const { return QSize(w, h); } #if defined(Q_OS_SYMBIAN) @@ -123,8 +131,13 @@ protected: void cleanup(); #endif -#if !defined(QT_NO_EGL) private: + QVGPixmapData *nextLRU; + QVGPixmapData *prevLRU; + bool inLRU; + friend class QVGImagePool; + +#if !defined(QT_NO_EGL) QVGPixmapData *next; QVGPixmapData *prev; @@ -140,6 +153,7 @@ protected: qreal cachedOpacity; mutable QImage source; mutable bool recreate; + bool inImagePool; #if !defined(QT_NO_EGL) mutable QEglContext *context; #endif @@ -148,6 +162,7 @@ protected: QImage::Format sourceFormat() const; void destroyImageAndContext(); + void destroyImages(); }; QT_END_NAMESPACE |