summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opengl/qgltexturepool.cpp6
-rw-r--r--src/openvg/qvgimagepool.cpp13
-rw-r--r--src/openvg/qvgimagepool_p.h4
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def2
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def2
5 files changed, 21 insertions, 6 deletions
diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp
index d19b1db..9ad66f2 100644
--- a/src/opengl/qgltexturepool.cpp
+++ b/src/opengl/qgltexturepool.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget();
-Q_GLOBAL_STATIC(QGLTexturePool, qt_gl_texture_pool)
+static QGLTexturePool *qt_gl_texture_pool = 0;
class QGLTexturePoolPrivate
{
@@ -69,7 +69,9 @@ QGLTexturePool::~QGLTexturePool()
QGLTexturePool *QGLTexturePool::instance()
{
- return qt_gl_texture_pool();
+ if (!qt_gl_texture_pool)
+ qt_gl_texture_pool = new QGLTexturePool();
+ return qt_gl_texture_pool;
}
GLuint QGLTexturePool::createTexture(GLenum target,
diff --git a/src/openvg/qvgimagepool.cpp b/src/openvg/qvgimagepool.cpp
index cd1caf4..3a187b0 100644
--- a/src/openvg/qvgimagepool.cpp
+++ b/src/openvg/qvgimagepool.cpp
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC(QVGImagePool, qt_vg_image_pool)
+static QVGImagePool *qt_vg_image_pool = 0;
class QVGImagePoolPrivate
{
@@ -66,7 +66,16 @@ QVGImagePool::~QVGImagePool()
QVGImagePool *QVGImagePool::instance()
{
- return qt_vg_image_pool();
+ if (!qt_vg_image_pool)
+ qt_vg_image_pool = new QVGImagePool();
+ return qt_vg_image_pool;
+}
+
+void QVGImagePool::setImagePool(QVGImagePool *pool)
+{
+ if (qt_vg_image_pool != pool)
+ delete qt_vg_image_pool;
+ qt_vg_image_pool = pool;
}
VGImage QVGImagePool::createTemporaryImage(VGImageFormat format,
diff --git a/src/openvg/qvgimagepool_p.h b/src/openvg/qvgimagepool_p.h
index e4fd4e1..07c57bf 100644
--- a/src/openvg/qvgimagepool_p.h
+++ b/src/openvg/qvgimagepool_p.h
@@ -69,6 +69,10 @@ public:
static QVGImagePool *instance();
+ // This function can be used from system-specific graphics system
+ // plugins to alter the image allocation strategy.
+ static void setImagePool(QVGImagePool *pool);
+
// Create a new VGImage from the pool with the specified parameters
// that is not associated with a pixmap. The VGImage is returned to
// the pool when releaseImage() is called.
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index dc1ddce..547931e 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -159,7 +159,7 @@ EXPORTS
?hibernate@QVGImagePool@@UAEXXZ @ 158 NONAME ; void QVGImagePool::hibernate(void)
?qt_vg_destroy_context@@YAXPAVQEglContext@@H@Z @ 159 NONAME ; void qt_vg_destroy_context(class QEglContext *, int)
??0QVGImagePool@@QAE@XZ @ 160 NONAME ; QVGImagePool::QVGImagePool(void)
- ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ABSENT ; void QVGImagePool::setImagePool(class QVGImagePool *)
+ ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ; void QVGImagePool::setImagePool(class QVGImagePool *)
?pixmapLRU@QVGImagePool@@IAEPAVQVGPixmapData@@XZ @ 162 NONAME ; class QVGPixmapData * QVGImagePool::pixmapLRU(void)
?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int)
?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void)
diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def
index f87c71d..a66df98 100644
--- a/src/s60installs/eabi/QtOpenVGu.def
+++ b/src/s60installs/eabi/QtOpenVGu.def
@@ -176,7 +176,7 @@ EXPORTS
_ZN12QVGImagePool11detachImageEP13QVGPixmapData @ 175 NONAME
_ZN12QVGImagePool12reclaimSpaceE13VGImageFormatllP13QVGPixmapData @ 176 NONAME
_ZN12QVGImagePool12releaseImageEP13QVGPixmapDatam @ 177 NONAME
- _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME ABSENT
+ _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME
_ZN12QVGImagePool13removeFromLRUEP13QVGPixmapData @ 179 NONAME
_ZN12QVGImagePool15moveToHeadOfLRUEP13QVGPixmapData @ 180 NONAME
_ZN12QVGImagePool20createImageForPixmapE13VGImageFormatllmP13QVGPixmapData @ 181 NONAME