diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-14 02:17:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-14 11:41:50 +0300 |
commit | eecd33fff488d54d038d84d8676000fad826e940 (patch) | |
tree | 9eb6c12810579d52c8df16e43d294852ba5613bb /src/test | |
parent | 4b8a6d93c5a785c673ec6c9f8a09880c48dee065 (diff) | |
download | plus-eecd33fff488d54d038d84d8676000fad826e940.tar.gz plus-eecd33fff488d54d038d84d8676000fad826e940.tar.bz2 plus-eecd33fff488d54d038d84d8676000fad826e940.tar.xz plus-eecd33fff488d54d038d84d8676000fad826e940.zip |
fix modernoepngl drawing.
Add simple draw test in most renders.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/testlauncher.cpp | 35 | ||||
-rw-r--r-- | src/test/testlauncher.h | 2 |
2 files changed, 37 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; diff --git a/src/test/testlauncher.h b/src/test/testlauncher.h index ed2b9251f..bc5d93ea8 100644 --- a/src/test/testlauncher.h +++ b/src/test/testlauncher.h @@ -56,6 +56,8 @@ class TestLauncher final int testFps(); + int testFps2(); + int testInternal(); int testDye(); |