summaryrefslogtreecommitdiff
path: root/src/test/testlauncher.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-14 02:17:38 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-14 11:41:50 +0300
commiteecd33fff488d54d038d84d8676000fad826e940 (patch)
tree9eb6c12810579d52c8df16e43d294852ba5613bb /src/test/testlauncher.cpp
parent4b8a6d93c5a785c673ec6c9f8a09880c48dee065 (diff)
downloadmv-eecd33fff488d54d038d84d8676000fad826e940.tar.gz
mv-eecd33fff488d54d038d84d8676000fad826e940.tar.bz2
mv-eecd33fff488d54d038d84d8676000fad826e940.tar.xz
mv-eecd33fff488d54d038d84d8676000fad826e940.zip
fix modernoepngl drawing.
Add simple draw test in most renders.
Diffstat (limited to 'src/test/testlauncher.cpp')
-rw-r--r--src/test/testlauncher.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 7072e292d..84283ee6e 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -90,6 +90,8 @@ int TestLauncher::exec()
return testDye();
else if (mTest == "102")
return testDraw();
+ else if (mTest == "103")
+ return testFps2();
return -1;
}
@@ -184,6 +186,39 @@ int TestLauncher::testFps()
return 0;
}
+int TestLauncher::testFps2()
+{
+ timeval start;
+ timeval end;
+
+ Wallpaper::loadWallpapers();
+ Wallpaper::getWallpaper(800, 600);
+ Image *img[1];
+ const int sz = 4;
+
+ img[0] = Theme::getImageFromTheme("graphics/images/login_wallpaper.png");
+ mainGraphics->drawImage(img[0], 0, 0);
+ int idx = 0;
+
+ const int cnt = 500;
+
+ gettimeofday(&start, nullptr);
+ for (int k = 0; k < cnt; k ++)
+ {
+ for (int f = 0; f < 300; f ++)
+ mainGraphics->testDraw();
+ mainGraphics->updateScreen();
+ }
+
+ gettimeofday(&end, nullptr);
+ const int tFps = calcFps(&start, &end, cnt);
+ file << mTest << std::endl;
+ file << tFps << std::endl;
+
+ sleep(1);
+ return 0;
+}
+
int TestLauncher::testBatches()
{
int batches = 512;