diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-06 21:13:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-07 12:46:08 +0300 |
commit | d812d9fac7bae4eff66a5ce8275be19d0ca77a32 (patch) | |
tree | 7f9619d23a44202a76282849bb1284773302309f /src/mobileopenglgraphics.cpp | |
parent | 1bcaac517036751a8fee9ff3d6561f5866e6969e (diff) | |
download | manaplus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.gz manaplus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.bz2 manaplus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.xz manaplus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.zip |
Add own profiler and profiler info to some code.
Diffstat (limited to 'src/mobileopenglgraphics.cpp')
-rw-r--r-- | src/mobileopenglgraphics.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp index 564f9be82..7cb445342 100644 --- a/src/mobileopenglgraphics.cpp +++ b/src/mobileopenglgraphics.cpp @@ -188,6 +188,7 @@ bool MobileOpenGLGraphics::drawImage2(const Image *const image, const int width, const int height, const bool useColor) { + FUNC_BLOCK("Graphics::drawImage2", 1) if (!image) return false; @@ -231,6 +232,7 @@ bool MobileOpenGLGraphics::drawRescaledImage(Image *const image, int srcX, const bool useColor, bool smooth) { + FUNC_BLOCK("Graphics::drawRescaledImage", 1) if (!image) return false; @@ -284,6 +286,7 @@ void MobileOpenGLGraphics::drawImagePattern(const Image *const image, const int x, const int y, const int w, const int h) { + FUNC_BLOCK("Graphics::drawImagePattern", 1) if (!image) return; @@ -739,11 +742,13 @@ void MobileOpenGLGraphics::drawTile(ImageVertexes *const vert) void MobileOpenGLGraphics::updateScreen() { + BLOCK_START("Graphics::updateScreen") // glFlush(); // glFinish(); SDL_GL_SwapBuffers(); // may be need clear? // glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + BLOCK_END("Graphics::updateScreen") } void MobileOpenGLGraphics::_beginDraw() @@ -984,6 +989,7 @@ void MobileOpenGLGraphics::setTexturingAndBlending(bool enable) void MobileOpenGLGraphics::drawRectangle(const gcn::Rectangle& rect, bool filled) { + BLOCK_START("Graphics::drawRectangle") setTexturingAndBlending(false); restoreColor(); @@ -1020,6 +1026,7 @@ void MobileOpenGLGraphics::drawRectangle(const gcn::Rectangle& rect, glVertexPointer(2, GL_SHORT, 0, &vert); glDrawArrays(GL_LINE_LOOP, 0, 4); } + BLOCK_END("Graphics::drawRectangle") } bool MobileOpenGLGraphics::drawNet(const int x1, const int y1, |