From d812d9fac7bae4eff66a5ce8275be19d0ca77a32 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Nov 2012 21:13:16 +0300 Subject: Add own profiler and profiler info to some code. --- src/text.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/text.cpp') diff --git a/src/text.cpp b/src/text.cpp index 41b2b01ca..cf15590fe 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -125,6 +125,7 @@ void Text::adviseXY(const int x, const int y) void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) { + BLOCK_START("Text::draw") if (mIsSpeech) { static_cast(graphics)->drawImageRect( @@ -135,6 +136,7 @@ void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) TextRenderer::renderText(graphics, mText, mX - xOff, mY - yOff, gcn::Graphics::LEFT, *mColor, mFont, !mIsSpeech, true); + BLOCK_END("Text::draw") } FlashText::FlashText(const std::string &text, const int x, const int y, @@ -148,10 +150,15 @@ FlashText::FlashText(const std::string &text, const int x, const int y, void FlashText::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) { + BLOCK_START("FlashText::draw") if (mTime) { if ((--mTime & 4) == 0) + { + BLOCK_END("FlashText::draw") return; + } } Text::draw(graphics, xOff, yOff); + BLOCK_END("FlashText::draw") } -- cgit v1.2.3-70-g09d2