summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/uitests/benchmarktest.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/uitests/benchmarktest.cc b/test/uitests/benchmarktest.cc
index b240388..33defc6 100644
--- a/test/uitests/benchmarktest.cc
+++ b/test/uitests/benchmarktest.cc
@@ -116,6 +116,34 @@ int main()
}
{
+ GUI::PixelBuffer wpixbuf(800, 600);
+ std::vector<GUI::PixelBufferAlpha*> children;
+ for(int i = 0; i < 100; ++i)
+ {
+ auto child = new GUI::PixelBufferAlpha(300, 300);
+ child->x = i * 2;
+ child->y = i * 2;
+ children.push_back(child);
+ }
+
+ TimedScope timed("Buffer flattening", 100);
+ for(int i = 0; i < 100; ++i)
+ {
+ for(auto child : children)
+ {
+ child->dirty = true;
+ }
+
+ wpixbuf.updateBuffer(children);
+ }
+
+ for(auto child : children)
+ {
+ delete child;
+ }
+ }
+
+ {
TimedScope timed("Scaled 1:1 no alpha", 1000);
for(int i = 0; i < 1000; ++i)
{