From 18c11ce3405526a6e16b28395dd1b9eb6659ba40 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 1 Aug 2011 13:30:46 +0200 Subject: define for timing Change-Id: Id91e47be0c2706de7871f3492725c577063ae5fb Reviewed-on: http://codereview.qt.nokia.com/2438 Reviewed-by: Qt Sanity Bot Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/declarative/scenegraph') 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(); } -- cgit v1.2.3