aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-10-31 09:45:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-05 10:04:45 +0100
commit2a1fc76f4ed1680e78b740c47fa736768aed82e9 (patch)
treea4390b6324d995808ad7441e7f5d66befa9db01f /src
parent1cd51d23446ba8945b14522157af9a4d96abb6dd (diff)
Added QSG_INFO=1 environment variable to spit out graphics info
Change-Id: I12bc0bc475b3e99185aefcd58eef5a0fb5e9852e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp10
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp10
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture.cpp3
3 files changed, 22 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index c6dbf350b6..4ccbaca08e 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -206,6 +206,16 @@ void QSGContext::renderContextInitialized(QSGRenderContext *renderContext)
d->antialiasingMethod = VertexAntialiasing;
}
}
+
+ static bool dumped = false;
+ if (!dumped && qEnvironmentVariableIsSet("QSG_INFO")) {
+ dumped = true;
+ qDebug() << "GL_VENDOR: " << (const char *) glGetString(GL_VENDOR);
+ qDebug() << "GL_RENDERER: " << (const char *) glGetString(GL_RENDERER);
+ qDebug() << "GL_VERSION: " << (const char *) glGetString(GL_VERSION);
+ qDebug() << "GL_EXTENSIONS:\n " << QByteArray((const char *) glGetString(GL_EXTENSIONS)).replace(" ", "\n ").constData();
+ }
+
d->mutex.unlock();
}
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index f294cb4a2d..0cc2a15c51 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -144,8 +144,13 @@ QSGRenderLoop *QSGRenderLoop::instance()
if (!s_instance) {
s_instance = QSGContext::createWindowManager();
- if (useConsistentTiming())
+ bool info = qEnvironmentVariableIsSet("QSG_INFO");
+
+ if (useConsistentTiming()) {
QUnifiedTimer::instance(true)->setConsistentTiming(true);
+ if (info)
+ qDebug() << "QSG: using fixed animation steps";
+ }
if (!s_instance) {
@@ -178,12 +183,15 @@ QSGRenderLoop *QSGRenderLoop::instance()
switch (loopType) {
case ThreadedRenderLoop:
+ if (info) qDebug() << "QSG: threaded render loop";
s_instance = new QSGThreadedRenderLoop();
break;
case WindowsRenderLoop:
+ if (info) qDebug() << "QSG: windows render loop";
s_instance = new QSGWindowsRenderLoop();
break;
default:
+ if (info) qDebug() << "QSG: basic render loop";
s_instance = new QSGGuiThreadRenderLoop();
break;
}
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp
index b180bc43bd..2bc106a025 100644
--- a/src/quick/scenegraph/util/qsgatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgatlastexture.cpp
@@ -104,6 +104,9 @@ 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;
}