Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added timing for rendering, cleanup of debug messages
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5061 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Mar 19, 2006
1 parent ad79318 commit 7955a13
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/gui/qgsmaprender.cpp
Expand Up @@ -26,7 +26,7 @@
#include <QPixmap>
#include <QPainter>
#include <Q3PaintDeviceMetrics>

#include <QTime>


QgsMapRender::QgsMapRender()
Expand Down Expand Up @@ -191,7 +191,9 @@ void QgsMapRender::render(QPainter* painter)
int myRenderCounter = 0;

#ifdef QGISDEBUG
std::cout << "QgsMapCanvas::render: Starting to render layer stack." << std::endl;
std::cout << "QgsMapRender::render: Starting to render layer stack." << std::endl;
QTime renderTime;
renderTime.start();
#endif
// render all layers in the stack, starting at the base
std::deque<QString> layers = mLayers.layerSet();
Expand Down Expand Up @@ -274,7 +276,7 @@ void QgsMapRender::render(QPainter* painter)
} // while (li != end)

#ifdef QGISDEBUG
std::cout << "QgsMapRender::render: Done rendering map layers...emitting renderComplete(paint)\n";
std::cout << "QgsMapRender::render: Done rendering map layers" << std::endl;
#endif

if (!mOverview)
Expand Down Expand Up @@ -309,13 +311,10 @@ void QgsMapRender::render(QPainter* painter)
emit setProgress(1,1);

#ifdef QGISDEBUG
std::cout << "QgsMapCanvas::render: Done rendering map labels...emitting renderComplete(paint)\n";
std::cout << "QgsMapRender::render: Rendering done in " <<
renderTime.elapsed() / 1000.0 << " seconds" << std::endl;
#endif

// notify any listeners that rendering is complete
//note that pmCanvas is not draw to gui yet
// TODO: emit renderComplete(paint);

mDrawing = false;

}
Expand Down

0 comments on commit 7955a13

Please sign in to comment.