Skip to content
Permalink
Browse files
Use simplifiedTypeRef in 2d geometry rendering
This avoids unnecessary cloning/segmentation in some cases, e.g. if
a compound curve containing only a single linestring curve is rendered.
  • Loading branch information
nyalldawson committed May 24, 2021
1 parent adab3fe commit 859ade7ecf3d787e801e6e0f8d7b83e1ef8760a2
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/symbology/qgssymbol.cpp
@@ -1197,7 +1197,10 @@ void QgsSymbol::renderFeature( const QgsFeature &feature, QgsRenderContext &cont
}
};

getPartGeometry( geom.constGet(), 0 );
// Use the simplified type ref when rendering -- this avoids some unnecessary cloning/geometry modification
// (e.g. if the original geometry is a compound curve containing only a linestring curve, we don't have
// to segmentize the geometry before rendering)
getPartGeometry( geom.constGet()->simplifiedTypeRef(), 0 );

// step 2 - determine which layers to render
std::vector< int > layers;

0 comments on commit 859ade7

Please sign in to comment.