summaryrefslogtreecommitdiff
path: root/src/mbgl/algorithm/generate_clip_ids_impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/algorithm/generate_clip_ids_impl.hpp')
-rw-r--r--src/mbgl/algorithm/generate_clip_ids_impl.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mbgl/algorithm/generate_clip_ids_impl.hpp b/src/mbgl/algorithm/generate_clip_ids_impl.hpp
index ff8f8d3fdf..59ca66bf66 100644
--- a/src/mbgl/algorithm/generate_clip_ids_impl.hpp
+++ b/src/mbgl/algorithm/generate_clip_ids_impl.hpp
@@ -1,8 +1,8 @@
#pragma once
#include <mbgl/algorithm/generate_clip_ids.hpp>
-#include <mbgl/util/math.hpp>
-#include <mbgl/platform/log.hpp>
+#include <mbgl/math/log2.hpp>
+#include <mbgl/util/logging.hpp>
namespace mbgl {
namespace algorithm {
@@ -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.