Skip to content

Commit

Permalink
Massive speed boost to 2d point cloud renders
Browse files Browse the repository at this point in the history
We'll need to selectively enable this optimisation when we add control
over the point shape, but for now this gives orders of magnitude faster
2d point cloud renders
  • Loading branch information
nyalldawson committed Dec 1, 2020
1 parent 6b6347d commit f68e3ae
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/pointcloud/qgspointcloudrgbrenderer.cpp
Expand Up @@ -220,9 +220,15 @@ void QgsPointCloudRgbRenderer::renderBlock( const QgsPointCloudBlock *block, Qgs

mapToPixel.transformInPlace( x, y );

#if 0
pen.setColor( QColor( red, green, blue ) );
context.renderContext().painter()->setPen( pen );
context.renderContext().painter()->drawPoint( QPointF( x, y ) );
#else
context.renderContext().painter()->fillRect( QRectF( x - mPainterPenWidth * 0.5,
y - mPainterPenWidth * 0.5,
mPainterPenWidth, mPainterPenWidth ), QColor( red, green, blue ) );
#endif

rendered++;
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f68e3ae

Please sign in to comment.