diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/popups/beingpopup.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/listbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/debugwindow.cpp | 6 | ||||
-rw-r--r-- | src/guichan/basiccontainer.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/network.cpp | 8 |
7 files changed, 22 insertions, 2 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index c455640d6..b7e5c91ee 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -205,6 +205,8 @@ void BeingPopup::show(const int x, const int y, Being *const b) #ifdef USE_PROFILER void BeingPopup::logic() { + BLOCK_START("BeingPopup::logic") logicChildren(); + BLOCK_END("BeingPopup::logic") } #endif diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index 5010d3206..76eadff0a 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -299,7 +299,9 @@ void ListBox::adjustSize() void ListBox::logic() { + BLOCK_START("ListBox::logic") adjustSize(); + BLOCK_END("ListBox::logic") } int ListBox::getSelectionByMouse(const int y) const diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 12e2f74dd..542b0141f 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -1229,6 +1229,8 @@ bool Window::getOptionBool(const std::string &name) const #ifdef USE_PROFILER void Window::logic() { + BLOCK_START("Window::logic") logicChildren(); + BLOCK_END("Window::logic") } #endif diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index f10f0030e..5164c89b6 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -649,8 +649,10 @@ void CharCreateDialog::updateLook() void CharCreateDialog::logic() { + BLOCK_START("CharCreateDialog::logic") if (mPlayer) mPlayer->logic(); + BLOCK_END("CharCreateDialog::logic") } void CharCreateDialog::updatePlayer() diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp index 3c3a856b8..90a8fccd6 100644 --- a/src/gui/windows/debugwindow.cpp +++ b/src/gui/windows/debugwindow.cpp @@ -266,6 +266,7 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : void MapDebugTab::logic() { + BLOCK_START("MapDebugTab::logic") if (player_node) { // TRANSLATORS: debug window label @@ -359,6 +360,7 @@ void MapDebugTab::logic() mFPSLabel->setCaption(strprintf(mFPSText.c_str(), fps)); // TRANSLATORS: debug window label, logic per second mLPSLabel->setCaption(strprintf(_("%d LPS"), lps)); + BLOCK_END("MapDebugTab::logic") } TargetDebugTab::TargetDebugTab(const Widget2 *const widget) : @@ -409,6 +411,7 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) : void TargetDebugTab::logic() { + BLOCK_START("TargetDebugTab::logic") if (player_node && player_node->getTarget()) { const Being *const target = player_node->getTarget(); @@ -504,6 +507,7 @@ void TargetDebugTab::logic() mTargetPartyLabel->adjustSize(); mTargetGuildLabel->adjustSize(); mAttackDelayLabel->adjustSize(); + BLOCK_END("TargetDebugTab::logic") } NetDebugTab::NetDebugTab(const Widget2 *const widget) : @@ -526,6 +530,7 @@ NetDebugTab::NetDebugTab(const Widget2 *const widget) : void NetDebugTab::logic() { + BLOCK_START("NetDebugTab::logic") // TRANSLATORS: debug window label mPingLabel->setCaption(strprintf(_("Ping: %s ms"), player_node->getPingTime().c_str())); @@ -535,4 +540,5 @@ void NetDebugTab::logic() // TRANSLATORS: debug window label mOutPackets1Label->setCaption(strprintf(_("Out: %d bytes/s"), PacketCounters::getOutBytes())); + BLOCK_END("NetDebugTab::logic") } diff --git a/src/guichan/basiccontainer.cpp b/src/guichan/basiccontainer.cpp index e15b924c7..12093b19f 100644 --- a/src/guichan/basiccontainer.cpp +++ b/src/guichan/basiccontainer.cpp @@ -194,7 +194,9 @@ namespace gcn void BasicContainer::logic() { + BLOCK_START("BasicContainer::logic") logicChildren(); + BLOCK_END("BasicContainer::logic") } void BasicContainer::_setFocusHandler(FocusHandler* focusHandler) diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index a843c9b6b..175713d49 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -138,10 +138,11 @@ void Network::clearHandlers() void Network::dispatchMessages() { - BLOCK_START("Network::dispatchMessages") + BLOCK_START("Network::dispatchMessages 1") while (messageReady()) { SDL_mutexP(mMutex); + BLOCK_START("Network::dispatchMessages 2") const int msgId = readWord(0); int len; if (msgId == SMSG_SERVER_VERSION_RESPONSE) @@ -156,6 +157,8 @@ void Network::dispatchMessages() MessageIn msg(mInBuffer, len); SDL_mutexV(mMutex); + BLOCK_END("Network::dispatchMessages 2") + BLOCK_START("Network::dispatchMessages 3") if (len == 0) { @@ -175,8 +178,9 @@ void Network::dispatchMessages() } skip(len); + BLOCK_END("Network::dispatchMessages 3") } - BLOCK_END("Network::dispatchMessages") + BLOCK_END("Network::dispatchMessages 1") } bool Network::messageReady() |