summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorMolly Lloyd <molly@mapbox.com>2018-10-02 11:25:16 -0700
committerMolly Lloyd <mollymerp@users.noreply.github.com>2018-10-03 11:46:49 -0700
commit90be9d8d9d6769cc969183b83a8d4a1dce0b4b84 (patch)
treee64f41c396d9f77f17e91c3d043699d6984c4c31 /src/mbgl
parentced996ec469399934d11b5fe28bd90c245c7b931 (diff)
downloadqtlocation-mapboxgl-90be9d8d9d6769cc969183b83a8d4a1dce0b4b84.tar.gz
[core] only generate clip ids for clipped layers
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 84f6828186..306c18759c 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -361,6 +361,9 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
}
std::vector<std::reference_wrapper<RenderTile>> sortedTilesForInsertion;
+ const bool fillLayer = layer->is<RenderFillLayer>();
+ const bool lineLayer = layer->is<RenderLineLayer>();
+
for (auto& sortedTile : sortedTiles) {
auto& tile = sortedTile.get();
if (!tile.tile.isRenderable()) {
@@ -372,8 +375,8 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
sortedTilesForInsertion.emplace_back(tile);
tile.used = true;
- // We only need clipping when we're _not_ drawing a symbol layer.
- if (!symbolLayer) {
+ // We only need clipping when we're drawing fill or line layers.
+ if (fillLayer || lineLayer) {
tile.needsClipping = true;
}
}