diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-06-22 11:15:49 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-07-02 10:25:27 (GMT) |
commit | 35f0729a36f1562abc4b3bb12e35d86afdd19a9d (patch) | |
tree | 5462b6e8a701e73a14ec3afd06ca53d8c014fa1b /src/opengl/gl2paintengineex | |
parent | 7348a762379bbc615194281806949e7fbac503a1 (diff) | |
download | Qt-35f0729a36f1562abc4b3bb12e35d86afdd19a9d.zip Qt-35f0729a36f1562abc4b3bb12e35d86afdd19a9d.tar.gz Qt-35f0729a36f1562abc4b3bb12e35d86afdd19a9d.tar.bz2 |
Clean up debug output.
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 13 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 8 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | 5 |
3 files changed, 19 insertions, 7 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index c06bb3c..4b5f53e 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -46,6 +46,8 @@ #include <QMetaEnum> #endif +// #define QT_GL_SHARED_SHADER_DEBUG + QT_BEGIN_NAMESPACE class QGLShaderStorage @@ -53,10 +55,8 @@ class QGLShaderStorage public: QGLEngineSharedShaders *shadersForThread(const QGLContext *context) { QGLContextGroupResource<QGLEngineSharedShaders> *&shaders = m_storage.localData(); - if (!shaders) { - qDebug() << "New thread storage for:" << hex << QThread::currentThread(); + if (!shaders) shaders = new QGLContextGroupResource<QGLEngineSharedShaders>(); - } return shaders->value(context); } @@ -229,11 +229,16 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) << simpleShaderProg->log(); } +#ifdef QT_GL_SHARED_SHADER_DEBUG + qDebug(" -> QGLEngineSharedShaders() %p for thread %p.", this, QThread::currentThread()); +#endif } QGLEngineSharedShaders::~QGLEngineSharedShaders() { - qDebug() << "####### ~QGLEngineSharedShaders() ##########"; +#ifdef QT_GL_SHARED_SHADER_DEBUG + qDebug(" -> ~QGLEngineSharedShaders() %p for thread %p.", this, QThread::currentThread()); +#endif qDeleteAll(shaders); shaders.clear(); diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 001a09e..290c57e 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -66,12 +66,16 @@ QGLTextureGlyphCache::QGLTextureGlyphCache(const QGLContext *context, QFontEngin if (!ctx->d_ptr->workaround_brokenFBOReadBack && pex != 0) glGenFramebuffers(1, &m_fbo); - fprintf(stderr, "## QGLTextureGlyphCache(): ctx: %p - this: %p\n", ctx, this); +#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG + qDebug(" -> QGLTextureGlyphCache() %p for context %p.", this, ctx); +#endif } QGLTextureGlyphCache::~QGLTextureGlyphCache() { - fprintf(stderr, "## ~QGLTextureGlyphCache(): context: %p - this: %p\n", ctx, this); +#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG + qDebug(" -> ~QGLTextureGlyphCache() %p.", this); +#endif } void QGLTextureGlyphCache::createTextureData(int width, int height) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index 1a78eed..04d1354 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -57,6 +57,7 @@ #include <private/qgl_p.h> #include <qglshaderprogram.h> +// #define QT_GL_TEXTURE_GLYPH_CACHE_DEBUG QT_BEGIN_NAMESPACE @@ -87,7 +88,9 @@ public: } void freeResource(void *) { - qDebug() << "QGLTextureGlyphCache::freeResource():" << this << "ctx:" << ctx; +#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG + qDebug("Freeing glyph cache resource %p for context %p.", this, ctx); +#endif // At this point, the context group is made current, so it's safe to // release resources without a makeCurrent() call |