diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-27 14:52:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-27 14:52:10 +0300 |
commit | 45949cf0fbade4f211520926c5e839c68cd01fbb (patch) | |
tree | df264bef9f6876c65d3e1905e374b15739c8f655 /src/commands.cpp | |
parent | d003da4b7bbf1b37f95c2e8e761fbe3e54b25c7a (diff) | |
download | manaplus-45949cf0fbade4f211520926c5e839c68cd01fbb.tar.gz manaplus-45949cf0fbade4f211520926c5e839c68cd01fbb.tar.bz2 manaplus-45949cf0fbade4f211520926c5e839c68cd01fbb.tar.xz manaplus-45949cf0fbade4f211520926c5e839c68cd01fbb.zip |
Move chat command /testsdlfont into actions.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 18747f24e..1f474bd3f 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -328,50 +328,6 @@ impHandler(uploadLog) return true; } -impHandler0(testsdlfont) -{ -#if defined USE_OPENGL && defined DEBUG_SDLFONT - Font *font = new Font("fonts/dejavusans.ttf", 18); - timespec time1; - timespec time2; - NullOpenGLGraphics *nullGraphics = new NullOpenGLGraphics; - std::vector<std::string> data; - volatile int width = 0; - - for (int f = 0; f < 300; f ++) - data.push_back("test " + toString(f) + "string"); - nullGraphics->beginDraw(); - - clock_gettime(CLOCK_MONOTONIC, &time1); - for (int f = 0; f < 500; f ++) - { - FOR_EACH (std::vector<std::string>::const_iterator, it, data) - { - width += font->getWidth(*it); - font->drawString(nullGraphics, *it, 10, 10); - } - FOR_EACH (std::vector<std::string>::const_iterator, it, data) - font->drawString(nullGraphics, *it, 10, 10); - - font->doClean(); - } - - clock_gettime(CLOCK_MONOTONIC, &time2); - - delete nullGraphics; - delete font; - - int64_t diff = (static_cast<long long int>( - time2.tv_sec) * 1000000000LL + static_cast<long long int>( - time2.tv_nsec)) / 100000 - (static_cast<long long int>( - time1.tv_sec) * 1000000000LL + static_cast<long long int>( - time1.tv_nsec)) / 100000; - if (debugChatTab) - debugChatTab->chatLog("sdlfont time: " + toString(diff)); -#endif - return true; -} - impHandler0(debugSpawn) { int cnt = atoi(event.args.c_str()); |