summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-19 11:57:58 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-19 11:57:58 (GMT)
commit477bf4379b0eb7b9a44f4730ce9b8fc07a8e635e (patch)
treefef39cfe5893d8203d34ffa41d914ce210703f94 /tests/benchmarks/declarative
parent7e7cbe2152efe47972e11875f008ddb8f0cc78db (diff)
parentc3f85f9f3a15c7e880d1d2b10ef6b98881f7f87c (diff)
downloadQt-477bf4379b0eb7b9a44f4730ce9b8fc07a8e635e.zip
Qt-477bf4379b0eb7b9a44f4730ce9b8fc07a8e635e.tar.gz
Qt-477bf4379b0eb7b9a44f4730ce9b8fc07a8e635e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (126 commits) Skip OpenGL threading tests on Mac as they were causing reboots Fixed compile of autotests. Fix warnings on gcc Add experimental VBO support for drawCachedGlyphs()'s index array Fix threaded gl autotest build failure on GLES2 Removed redundant debug output from trace benchmark. Added two QML based traces to trace benchmark. Fixed old trace files no longer working. Reduced the memory footprint of qttrace files. Added trace replayer benchmark. Added --range and --single arguments to qttracereplay. Always accept values reported directly using QTest::setBenchmarkResult. Make threading use-cases work for X11 Run firstRun initialization in declarative/painting benchmark Optimization for text drawing on OpenGL Enable QStaticText in QtDeclarative painting benchmark Fix no-webkit compiler helpviewer Make sure height of glyph cache is a power of two Fixes crash when destroying a QGraphicsItem. Move benchmarks/qvector to benchmarks/corelib/tools/qvector ...
Diffstat (limited to 'tests/benchmarks/declarative')
-rw-r--r--tests/benchmarks/declarative/painting/paintbenchmark.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.cpp b/tests/benchmarks/declarative/painting/paintbenchmark.cpp
index d6a873c..dd52740 100644
--- a/tests/benchmarks/declarative/painting/paintbenchmark.cpp
+++ b/tests/benchmarks/declarative/painting/paintbenchmark.cpp
@@ -48,10 +48,7 @@
#include <QVBoxLayout>
#include <QTime>
#include <QDebug>
-
-#ifdef HAVE_STATICTEXT
-#include <private/qstatictext_p.h>
-#endif
+#include <QStaticText>
int iterations = 20;
const int count = 600;
@@ -105,7 +102,6 @@ void paint_QTextLayout_cache(QPainter &p)
paint_QTextLayout(p, true);
}
-#ifdef HAVE_STATICTEXT
void paint_QStaticText(QPainter &p, bool useOptimizations)
{
static QStaticText *staticText[lines];
@@ -113,7 +109,10 @@ void paint_QStaticText(QPainter &p, bool useOptimizations)
if (first) {
for (int i = 0; i < lines; ++i) {
staticText[i] = new QStaticText(strings[i]);
- staticText[i]->setUseBackendOptimizations(useOptimizations);
+ if (useOptimizations)
+ staticText[i]->setPerformanceHint(QStaticText::AggressiveCaching);
+ else
+ staticText[i]->setPerformanceHint(QStaticText::ModerateCaching);
}
first = false;
}
@@ -133,7 +132,6 @@ void paint_QStaticText_optimizations(QPainter &p)
{
paint_QStaticText(p, true);
}
-#endif
void paint_QPixmapCachedText(QPainter &p)
{
@@ -203,10 +201,8 @@ struct {
} funcs[] = {
{ "QTextLayoutNoCache", &paint_QTextLayout_noCache },
{ "QTextLayoutWithCache", &paint_QTextLayout_cache },
-#ifdef HAVE_STATICTEXT
{ "QStaticTextNoBackendOptimizations", &paint_QStaticText_noOptimizations },
{ "QStaticTextWithBackendOptimizations", &paint_QStaticText_optimizations },
-#endif
{ "CachedText", &paint_QPixmapCachedText },
{ "RoundedRect", &paint_RoundedRect },
{ "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
@@ -231,7 +227,7 @@ public:
void paintEvent(QPaintEvent *) {
static int last = 0;
static bool firstRun = true;
- if (firstRun == 0) {
+ if (firstRun) {
timer.start();
firstRun = false;
} else {