aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-01-07 11:10:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 14:44:32 +0100
commitf03de5497d269fadcddc71794869dddbf8870129 (patch)
tree65ab9e73fd914b9ac8dfa311cb7e760bb6f451cb /src
parent156ce398439bd955f8b231e95e391b703d161e75 (diff)
Use qDebug for all debug under src/quick/scenegraph.
Mixing printf and qDebug can make the output come out of sync. Change-Id: Ia71e71b09cb3bf651010eb2eb652db7899b07f0d Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp6
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer.cpp2
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer.cpp2
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp3
-rw-r--r--src/quick/scenegraph/qsgwindowsrenderloop.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgtexture.cpp4
7 files changed, 11 insertions, 10 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 8ff68e20bc..b1464a26cc 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -169,7 +169,7 @@ ShaderManager::Shader *ShaderManager::prepareMaterial(QSGMaterial *material)
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing)
- printf(" - compiling material: %dms\n", (int) qsg_renderer_timer.elapsed());
+ qDebug(" - compiling material: %dms", (int) qsg_renderer_timer.elapsed());
if (QQmlProfilerService::enabled) {
QQmlProfilerService::sceneGraphFrame(
@@ -208,7 +208,7 @@ ShaderManager::Shader *ShaderManager::prepareMaterialNoRewrite(QSGMaterial *mate
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing)
- printf(" - compiling material: %dms\n", (int) qsg_renderer_timer.elapsed());
+ qDebug(" - compiling material: %dms", (int) qsg_renderer_timer.elapsed());
if (QQmlProfilerService::enabled) {
QQmlProfilerService::sceneGraphFrame(
@@ -2249,7 +2249,7 @@ void Renderer::preprocess()
void Renderer::render()
{
if (Q_UNLIKELY(debug_dump)) {
- printf("\n\n");
+ qDebug("\n");
QSGNodeDumper::dump(rootNode());
}
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
index df70b5c5eb..e35bfe5494 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
@@ -279,7 +279,7 @@ void QSGRenderer::renderScene(const QSGBindable &bindable)
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing) {
- printf(" - Breakdown of render time: preprocess=%d, updates=%d, binding=%d, render=%d, total=%d\n",
+ qDebug(" - Breakdown of render time: preprocess=%d, updates=%d, binding=%d, render=%d, total=%d",
int(preprocessTime / 1000000),
int((updatePassTime - preprocessTime) / 1000000),
int((bindTime - updatePassTime) / 1000000),
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp
index 58c843a286..cb9e4bdf88 100644
--- a/src/quick/scenegraph/qsgadaptationlayer.cpp
+++ b/src/quick/scenegraph/qsgadaptationlayer.cpp
@@ -189,7 +189,7 @@ void QSGDistanceFieldGlyphCache::update()
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing) {
- printf(" - glyphs: count=%d, render=%d, store=%d, total=%d\n",
+ qDebug(" - glyphs: count=%d, render=%d, store=%d, total=%d",
count,
int(renderTime/1000000),
(int) qsg_render_timer.elapsed() - int(renderTime/1000000),
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index d779285a44..d8fe947122 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -1136,7 +1136,8 @@ void QSGThreadedRenderLoop::polishAndSync(Window *w)
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing)
- qDebug(" - on GUI: polish=%d, lock=%d, block/sync=%d -- animations=%d",
+ qDebug(" - Gui Thread: window=%p, polish=%d, lock=%d, block/sync=%d -- animations=%d",
+ w->window,
int(polishTime/1000000),
int((waitTime - polishTime)/1000000),
int((syncTime - waitTime)/1000000),
diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp
index 0b6d42aca6..5d9583cafb 100644
--- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp
+++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp
@@ -61,7 +61,7 @@ extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_
#ifdef QSG_RENDER_LOOP_DEBUG
static QElapsedTimer qsg_debug_timer;
-# define RLDEBUG(x) printf("(%6d) %s : %4d - %s\n", (int) qsg_debug_timer.elapsed(), __FILE__, __LINE__, x)
+# define RLDEBUG(x) qDebug("(%6d) %s : %4d - %s", (int) qsg_debug_timer.elapsed(), __FILE__, __LINE__, x)
#else
# define RLDEBUG(x)
#endif
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp
index 75bf0b6e3c..389945849f 100644
--- a/src/quick/scenegraph/util/qsgatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgatlastexture.cpp
@@ -375,7 +375,7 @@ bool Atlas::bind(QSGTexture::Filtering filtering)
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing) {
- printf(" - AtlasTexture(%dx%d), uploaded in %d ms\n",
+ 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()));
diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp
index 51b3bafaf7..df724d8a01 100644
--- a/src/quick/scenegraph/util/qsgtexture.cpp
+++ b/src/quick/scenegraph/util/qsgtexture.cpp
@@ -629,7 +629,7 @@ void QSGPlainTexture::bind()
glDeleteTextures(1, &m_texture_id);
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing) {
- printf(" - texture deleted in %dms (size: %dx%d)\n",
+ qDebug(" - texture deleted in %dms (size: %dx%d)",
(int) qsg_renderer_timer.elapsed(),
m_texture_size.width(),
m_texture_size.height());
@@ -725,7 +725,7 @@ void QSGPlainTexture::bind()
if (qsg_render_timing) {
mipmapTime = qsg_renderer_timer.nsecsElapsed();
- printf(" - plaintexture(%dx%d) bind=%d, convert=%d, swizzle=%d (%s->%s), upload=%d, mipmap=%d, total=%d\n",
+ qDebug(" - plaintexture(%dx%d) bind=%d, convert=%d, swizzle=%d (%s->%s), upload=%d, mipmap=%d, total=%d",
m_texture_size.width(), m_texture_size.height(),
int(bindTime/1000000),
int((convertTime - bindTime)/1000000),