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/mobileopenglgraphics.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mobileopenglgraphics.cpp') 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, -- cgit v1.2.3-60-g2f50