aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/scenegraph
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-01 13:30:46 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-01 13:35:42 +0200
commit18c11ce3405526a6e16b28395dd1b9eb6659ba40 (patch)
tree9db364cb46fd3d7c52c6afb2485b33bac2c469f6 /src/declarative/scenegraph
parent3e0c19d5ba0e4826c3f036c3172d8ea0e30530a6 (diff)
define for timing
Change-Id: Id91e47be0c2706de7871f3492725c577063ae5fb Reviewed-on: http://codereview.qt.nokia.com/2438 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/declarative/scenegraph')
-rw-r--r--src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp
index 2cd3db4074..a1df05c2de 100644
--- a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp
+++ b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp
@@ -1170,6 +1170,12 @@ void QSGDistanceFieldGlyphCache::updateCache()
// ### Remove before final release
static bool cacheDistanceFields = QApplication::arguments().contains("--cache-distance-fields");
+// #define QSGDISTANCEFIELDS_TIME_CREATION
+#ifdef QSGDISTANCEFIELDS_TIME_CREATION
+ QTime time;
+ time.start();
+#endif
+
QString tmpPath = QString::fromLatin1("%1/.qt/").arg(QDir::tempPath());
QString keyBase = QString::fromLatin1("%1%2%3_%4_%5_%6.fontblob")
.arg(tmpPath)
@@ -1218,6 +1224,13 @@ void QSGDistanceFieldGlyphCache::updateCache()
file.write((const char *) glyph.constBits(), glyph.width() * glyph.height());
}
}
+
+#ifdef QSGDISTANCEFIELDS_TIME_CREATION
+ static int totalTime;
+ totalTime += time.elapsed();
+ printf("time: %d\n", totalTime);
+#endif
+
m_textureData->pendingGlyphs.reset();
}