summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/declarative/painting/paintbenchmark.cpp24
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml2
-rw-r--r--tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml2
7 files changed, 30 insertions, 6 deletions
diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.cpp b/tests/benchmarks/declarative/painting/paintbenchmark.cpp
index 9231b67..073e14e 100644
--- a/tests/benchmarks/declarative/painting/paintbenchmark.cpp
+++ b/tests/benchmarks/declarative/painting/paintbenchmark.cpp
@@ -43,6 +43,7 @@
#include <QPixmap>
#include <QImage>
#include <QPainter>
+#include <QPainterPath>
#include <QGLWidget>
#include <QTextLayout>
#include <QVBoxLayout>
@@ -218,6 +219,28 @@ void paint_QPixmapCachedRoundedRect(QPainter &p)
}
}
+void paint_pathCacheRoundedRect(QPainter &p)
+{
+ static bool first = true;
+ static QPainterPath path[lines];
+ if (first) {
+ for (int j = 0; j < lines; ++j) {
+ path[j].addRoundedRect(QRectF(0,0,(j+1)*50, spacing-1), 8, 8);
+ }
+ first = false;
+ }
+ p.setRenderHint(QPainter::Antialiasing, true);
+ p.setPen(Qt::black);
+ p.setBrush(Qt::red);
+ for (int i = 0; i < count; i++) {
+ for (int j = 0; j < lines; ++j) {
+ p.translate(0,j*spacing);
+ p.drawPath(path[j]);
+ p.translate(0,-j*spacing);
+ }
+ }
+}
+
void paint_QPixmap63x63_opaque(QPainter &p)
{
static bool first = true;
@@ -290,6 +313,7 @@ struct {
{ "CachedText", &paint_QPixmapCachedText },
{ "RoundedRect", &paint_RoundedRect },
{ "CachedRoundedRect", &paint_QPixmapCachedRoundedRect },
+ { "PathCacheRoundedRect", &paint_pathCacheRoundedRect },
{ "QPixmap63x63_opaque", &paint_QPixmap63x63_opaque },
{ "QPixmap64x64_opaque", &paint_QPixmap64x64_opaque },
{ "QPixmap63x63", &paint_QPixmap63x63 },
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
index 210c515..996602c 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml
@@ -24,7 +24,7 @@ Item {
Text { },
Text { },
Text { },
- MouseRegion { }
+ MouseArea { }
]
}
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
index 943634f..9f79c34 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml
@@ -24,7 +24,7 @@ Item {
Text { },
Text { },
Text { },
- MouseRegion { }
+ MouseArea { }
]
}
diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
index ce986b5..335aeb8 100644
--- a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml
@@ -24,7 +24,7 @@ Item {
Text { },
Text { },
Text { },
- MouseRegion { }
+ MouseArea { }
]
}
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
index 25e9c62..97bad47 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml
@@ -30,7 +30,7 @@ Item {
Text { }
}
}
- MouseRegion { }
+ MouseArea { }
}
}
}
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
index ee3f9d1..36dda15 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml
@@ -27,7 +27,7 @@ Item {
Text { }
Text { }
}
- MouseRegion { }
+ MouseArea { }
}
}
}
diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
index 4c46ec1..396e27d 100644
--- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
+++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml
@@ -30,7 +30,7 @@ Item {
Text { }
}
}
- MouseRegion { }
+ MouseArea { }
}
}
}