diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-06-26 20:48:47 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-07-01 14:18:41 +0200 |
commit | 7a8cc93a0546bc38c54343d640e63062c3b398b2 (patch) | |
tree | db79fc70c17374ab44adbabc5b0b641ab08a96eb /src/quick/scenegraph/util/qsgatlastexture.cpp | |
parent | c67af3861f8ecec0eb16808d6d4984eef89db5d1 (diff) |
Use categorized logging for all things scenegraph.
Change-Id: I865ee838b0fd6c257b7189f24130012b98206fd1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgatlastexture.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgatlastexture.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index ae9390a74b..fcd10ee577 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -62,10 +62,7 @@ QT_BEGIN_NAMESPACE #endif -#ifndef QSG_NO_RENDER_TIMING -static bool qsg_render_timing = !qgetenv("QSG_RENDER_TIMING").isEmpty(); static QElapsedTimer qsg_renderer_timer; -#endif namespace QSGAtlasTexture { @@ -116,8 +113,7 @@ Manager::Manager() m_atlas_size_limit = qsg_envInt("QSG_ATLAS_SIZE_LIMIT", qMax(w, h) / 2); m_atlas_size = QSize(w, h); - if (qEnvironmentVariableIsSet("QSG_INFO")) - qDebug() << "QSG: texture atlas dimensions:" << w << "x" << h; + qCDebug(QSG_LOG_INFO, "texture atlas dimensions: %dx%d", w, h); } @@ -388,11 +384,9 @@ void Atlas::bind(QSGTexture::Filtering filtering) // Upload all pending images.. for (int i=0; i<m_pending_uploads.size(); ++i) { -#ifndef QSG_NO_RENDER_TIMING - bool profileFrames = qsg_render_timing || QQuickProfiler::enabled; + bool profileFrames = QSG_LOG_TIME_TEXTURE().isDebugEnabled() || QQuickProfiler::enabled; if (profileFrames) qsg_renderer_timer.start(); -#endif if (m_externalFormat == GL_BGRA && !m_use_bgra_fallback) { @@ -401,13 +395,9 @@ void Atlas::bind(QSGTexture::Filtering filtering) upload(m_pending_uploads.at(i)); } -#ifndef QSG_NO_RENDER_TIMING - if (qsg_render_timing) { - qDebug(" - AtlasTexture(%dx%d), uploaded in %d ms", - m_pending_uploads.at(i)->image().width(), - m_pending_uploads.at(i)->image().height(), - (int) (qsg_renderer_timer.elapsed())); - } + qCDebug(QSG_LOG_TIME_TEXTURE).nospace() << "atlastexture uploaded in: " << qsg_renderer_timer.elapsed() + << "ms (" << m_pending_uploads.at(i)->image().width() << "x" + << m_pending_uploads.at(i)->image().height() << ")"; Q_QUICK_SG_PROFILE1(QQuickProfiler::SceneGraphTexturePrepare, ( 0, // bind (not relevant) @@ -415,7 +405,6 @@ void Atlas::bind(QSGTexture::Filtering filtering) 0, // swizzle (not relevant) qsg_renderer_timer.nsecsElapsed(), // (upload all of the above) 0)); // mipmap (not used ever...) -#endif } GLenum f = filtering == QSGTexture::Nearest ? GL_NEAREST : GL_LINEAR; |