summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-20 12:18:10 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-20 12:18:10 +0300
commit811b0152c0e3911a58c357ec84fac9f84dbe911a (patch)
tree6658623c25525417918503d8b69c9ebd29bebadd /src/gui
parent91f1d79f268b657c834c8df2c24368fc6067df81 (diff)
downloadmv-811b0152c0e3911a58c357ec84fac9f84dbe911a.tar.gz
mv-811b0152c0e3911a58c357ec84fac9f84dbe911a.tar.bz2
mv-811b0152c0e3911a58c357ec84fac9f84dbe911a.tar.xz
mv-811b0152c0e3911a58c357ec84fac9f84dbe911a.zip
Add more profiler labels.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/beingpopup.cpp7
-rw-r--r--src/gui/beingpopup.h4
-rw-r--r--src/gui/botcheckerwindow.cpp9
-rw-r--r--src/gui/botcheckerwindow.h4
-rw-r--r--src/gui/chatwindow.cpp9
-rw-r--r--src/gui/chatwindow.h4
-rw-r--r--src/gui/debugwindow.cpp9
-rw-r--r--src/gui/debugwindow.h4
-rw-r--r--src/gui/ministatuswindow.cpp9
-rw-r--r--src/gui/ministatuswindow.h4
-rw-r--r--src/gui/shortcutwindow.cpp9
-rw-r--r--src/gui/shortcutwindow.h4
-rw-r--r--src/gui/socialwindow.cpp9
-rw-r--r--src/gui/socialwindow.h4
-rw-r--r--src/gui/whoisonline.cpp2
-rw-r--r--src/gui/widgets/progressindicator.cpp2
-rw-r--r--src/gui/widgets/window.cpp7
-rw-r--r--src/gui/widgets/window.h4
-rw-r--r--src/gui/windowmenu.cpp9
-rw-r--r--src/gui/windowmenu.h4
20 files changed, 117 insertions, 0 deletions
diff --git a/src/gui/beingpopup.cpp b/src/gui/beingpopup.cpp
index ac35f5a57..e5fda9ecf 100644
--- a/src/gui/beingpopup.cpp
+++ b/src/gui/beingpopup.cpp
@@ -202,3 +202,10 @@ void BeingPopup::show(const int x, const int y, Being *const b)
position(x, y);
return;
}
+
+#ifdef USE_PROFILER
+void BeingPopup::logic()
+{
+ logicChildren();
+}
+#endif
diff --git a/src/gui/beingpopup.h b/src/gui/beingpopup.h
index 440242778..3ac46d30c 100644
--- a/src/gui/beingpopup.h
+++ b/src/gui/beingpopup.h
@@ -50,6 +50,10 @@ class BeingPopup final : public Popup
*/
void show(const int x, const int y, Being *const b);
+#ifdef USE_PROFILER
+ void logic();
+#endif
+
private:
Label *mBeingName;
Label *mBeingParty;
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp
index ad5535559..97e01b4b2 100644
--- a/src/gui/botcheckerwindow.cpp
+++ b/src/gui/botcheckerwindow.cpp
@@ -416,3 +416,12 @@ void BotCheckerWindow::optionChanged(const std::string &name)
if (name == "enableBotCheker")
mEnabled = config.getBoolValue("enableBotCheker");
}
+
+#ifdef USE_PROFILER
+void BotCheckerWindow::logicChildren()
+{
+ BLOCK_START("BotCheckerWindow::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("BotCheckerWindow::logicChildren")
+}
+#endif
diff --git a/src/gui/botcheckerwindow.h b/src/gui/botcheckerwindow.h
index 53eeca01c..70304b25e 100644
--- a/src/gui/botcheckerwindow.h
+++ b/src/gui/botcheckerwindow.h
@@ -75,6 +75,10 @@ class BotCheckerWindow final : public Window,
void optionChanged(const std::string &name) override;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
private:
UsersTableModel *mTableModel;
GuiTable *mTable;
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 5d0c76b91..05595fe89 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -1704,3 +1704,12 @@ void ChatWindow::unHideWindow()
{
mHaveMouse = true;
}
+
+#ifdef USE_PROFILER
+void ChatWindow::logicChildren()
+{
+ BLOCK_START("ChatWindow::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("ChatWindow::logicChildren")
+}
+#endif
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index 9c7ae9596..85856776a 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -292,6 +292,10 @@ class ChatWindow final : public Window,
void widgetResized(const gcn::Event &event) override;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
protected:
friend class ChatTab;
friend class WhisperTab;
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 4fe4fbe1b..b154a59bc 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -148,6 +148,15 @@ void DebugWindow::widgetResized(const gcn::Event &event)
mDimension.width, mDimension.height));
}
+#ifdef USE_PROFILER
+void DebugWindow::logicChildren()
+{
+ BLOCK_START("DebugWindow::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("DebugWindow::logicChildren")
+}
+#endif
+
MapDebugTab::MapDebugTab(const Widget2 *const widget) :
DebugTab(widget),
// TRANSLATORS: debug window label
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index 972378708..cce158ca2 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -153,6 +153,10 @@ class DebugWindow final : public Window
void widgetResized(const gcn::Event &event) override;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
private:
TabbedArea *mTabs;
MapDebugTab *mMapWidget;
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index 91b0f956b..7a1a95fcc 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -513,3 +513,12 @@ gcn::Rectangle MiniStatusWindow::getChildrenArea()
rect.width - padding2,
rect.height - padding2);
}
+
+#ifdef USE_PROFILER
+void MiniStatusWindow::logicChildren()
+{
+ BLOCK_START("MiniStatusWindow::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("MiniStatusWindow::logicChildren")
+}
+#endif
diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h
index 023276e94..5c0b36a38 100644
--- a/src/gui/ministatuswindow.h
+++ b/src/gui/ministatuswindow.h
@@ -89,6 +89,10 @@ class MiniStatusWindow final : public Popup,
gcn::Rectangle getChildrenArea() override A_WARN_UNUSED;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
private:
bool isInBar(ProgressBar *bar, int x, int y) const;
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index ef893c1ba..87b43e758 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -230,3 +230,12 @@ void ShortcutWindow::widgetMoved(const gcn::Event& event)
FOR_EACH (std::vector<ShortcutContainer*>::iterator, it, mPages)
(*it)->setRedraw(true);
}
+
+#ifdef USE_PROFILER
+void ShortcutWindow::logicChildren()
+{
+ BLOCK_START("ShortcutWindow::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("ShortcutWindow::logicChildren")
+}
+#endif
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index 57e399f17..cc2ba97b0 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -68,6 +68,10 @@ class ShortcutWindow final : public Window
void mouseDragged(gcn::MouseEvent &event) override;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
private:
ShortcutWindow();
ShortcutContainer *mItems;
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index b2e1e20aa..83569416a 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -1712,3 +1712,12 @@ void SocialWindow::widgetResized(const gcn::Event &event)
if (mTabs)
mTabs->fixSize();
}
+
+#ifdef USE_PROFILER
+void SocialWindow::logicChildren()
+{
+ BLOCK_START("SocialWindow::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("SocialWindow::logicChildren")
+}
+#endif
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 33891c92a..b8ed73655 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -120,6 +120,10 @@ public:
void widgetResized(const gcn::Event &event) override;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
protected:
friend class SocialTab;
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index b2810aa0b..e5eb90cd1 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -595,7 +595,9 @@ void WhoIsOnline::download()
void WhoIsOnline::logic()
{
+ BLOCK_START("WhoIsOnline::logic")
mScrollArea->logic();
+ BLOCK_END("WhoIsOnline::logic")
}
void WhoIsOnline::slowLogic()
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index d3d398c87..c33fa6bfe 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -60,8 +60,10 @@ ProgressIndicator::~ProgressIndicator()
void ProgressIndicator::logic()
{
+ BLOCK_START("ProgressIndicator::logic")
if (mIndicator)
mIndicator->update(10);
+ BLOCK_END("ProgressIndicator::logic")
}
void ProgressIndicator::draw(gcn::Graphics *graphics)
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 4e921a287..94937cac6 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -1195,3 +1195,10 @@ bool Window::getOptionBool(const std::string &name) const
return mSkin->getOption(name) != 0;
return 0;
}
+
+#ifdef USE_PROFILER
+void Window::logic()
+{
+ logicChildren();
+}
+#endif
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 11b30eba9..139dbcb1d 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -417,6 +417,10 @@ class Window : public gcn::Window,
bool isWindowVisible() const A_WARN_UNUSED
{ return mVisible; }
+#ifdef USE_PROFILER
+ virtual void logic();
+#endif
+
protected:
bool canMove() const A_WARN_UNUSED;
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 57feba81c..bc7e0f736 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -427,3 +427,12 @@ void WindowMenu::optionChanged(const std::string &name)
if (name == "autohideButtons")
mAutoHide = config.getIntValue("autohideButtons");
}
+
+#ifdef USE_PROFILER
+void WindowMenu::logicChildren()
+{
+ BLOCK_START("WindowMenu::logicChildren")
+ BasicContainer::logicChildren();
+ BLOCK_END("WindowMenu::logicChildren")
+}
+#endif
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index b3b77b16f..8519a17ba 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -113,6 +113,10 @@ class WindowMenu final : public Container,
void optionChanged(const std::string &name) override;
+#ifdef USE_PROFILER
+ void logicChildren();
+#endif
+
protected:
void drawChildren(gcn::Graphics* graphics) override;