Skip to content
Permalink
Browse files

Rename layerRenderingTime()->perLayerRenderingTime()

  • Loading branch information
nyalldawson committed Dec 4, 2017
1 parent 56508b5 commit 5ee9cdd2225c0c37d0582ca4001f9fd683be7d31
@@ -138,11 +138,11 @@ List of errors that happened during the rendering job - available when the rende
int renderingTime() const;
%Docstring
Returns the total time it took to finish the job (in milliseconds).
.. seealso:: layerRenderingTime()
.. seealso:: perLayerRenderingTime()
:rtype: int
%End

QMap< QString, int > layerRenderingTime() const;
QMap< QString, int > perLayerRenderingTime() const;
%Docstring
Returns the render time (in ms) per layer, by layer ID.
.. versionadded:: 3.0
@@ -414,7 +414,7 @@ void QgsMapRendererJob::cleanupJobs( LayerRenderJobs &jobs )
}

if ( job.layer )
mLayerRenderingTime.insert( job.layer->id(), job.renderingTime );
mPerLayerRenderingTime.insert( job.layer->id(), job.renderingTime );
}

jobs.clear();
@@ -201,15 +201,15 @@ class CORE_EXPORT QgsMapRendererJob : public QObject

/**
* Returns the total time it took to finish the job (in milliseconds).
* \see layerRenderingTime()
* \see perLayerRenderingTime()
*/
int renderingTime() const { return mRenderingTime; }

/**
* Returns the render time (in ms) per layer, by layer ID.
* \since QGIS 3.0
*/
QMap< QString, int > layerRenderingTime() const { return mLayerRenderingTime; }
QMap< QString, int > perLayerRenderingTime() const { return mPerLayerRenderingTime; }

/**
* Return map settings with which this job was started.
@@ -249,7 +249,7 @@ class CORE_EXPORT QgsMapRendererJob : public QObject
int mRenderingTime = 0;

//! Render time (in ms) per layer, by layer ID
QMap< QString, int > mLayerRenderingTime;
QMap< QString, int > mPerLayerRenderingTime;

/**
* Prepares the cache for storing the result of labeling. Returns false if
@@ -612,7 +612,7 @@ void QgsMapCanvas::rendererJobFinished()

mMap->setContent( img, imageRect( img, mSettings ) );

mLastLayerRenderTime = mJob->layerRenderingTime();
mLastLayerRenderTime = mJob->perLayerRenderingTime();
if ( mUsePreviewJobs )
startPreviewJobs();
}

0 comments on commit 5ee9cdd

Please sign in to comment.
You can’t perform that action at this time.