diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-11-01 16:14:33 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-11-08 18:09:58 +0100 |
commit | bcdbbbcac2e331ea3a23085b1e0f5a0f5d25e0a7 (patch) | |
tree | f7961bcbb800b781a980e9e387d8f191d22051ca /src/mbgl/algorithm | |
parent | 3b38cf48b706ace413bee44e8d2742710c9425b4 (diff) | |
download | qtlocation-mapboxgl-bcdbbbcac2e331ea3a23085b1e0f5a0f5d25e0a7.tar.gz |
[core] don't assign clip IDs to tiles that aren't rendered
Diffstat (limited to 'src/mbgl/algorithm')
-rw-r--r-- | src/mbgl/algorithm/generate_clip_ids_impl.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mbgl/algorithm/generate_clip_ids_impl.hpp b/src/mbgl/algorithm/generate_clip_ids_impl.hpp index 47f7df12f9..9b550fcbba 100644 --- a/src/mbgl/algorithm/generate_clip_ids_impl.hpp +++ b/src/mbgl/algorithm/generate_clip_ids_impl.hpp @@ -15,6 +15,10 @@ void ClipIDGenerator::update(Renderables& renderables) { for (auto it = renderables.begin(); it != end; it++) { auto& tileID = it->first; auto& renderable = it->second; + if (!renderable.used) { + continue; + } + renderable.clip = {}; Leaf leaf{ renderable.clip }; @@ -58,6 +62,9 @@ void ClipIDGenerator::update(Renderables& renderables) { uint8_t count = 1; for (auto& pair : renderables) { auto& renderable = pair.second; + if (!renderable.used) { + continue; + } renderable.clip.mask |= mask; // Assign only to clip IDs that have no value yet. |