diff options
Diffstat (limited to 'src/mbgl/algorithm/generate_clip_ids_impl.hpp')
-rw-r--r-- | src/mbgl/algorithm/generate_clip_ids_impl.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mbgl/algorithm/generate_clip_ids_impl.hpp b/src/mbgl/algorithm/generate_clip_ids_impl.hpp index 59ca66bf66..d63ba27b6b 100644 --- a/src/mbgl/algorithm/generate_clip_ids_impl.hpp +++ b/src/mbgl/algorithm/generate_clip_ids_impl.hpp @@ -76,8 +76,13 @@ void ClipIDGenerator::update(Renderables& renderables) { bit_offset += bit_count; } - if (bit_offset > 8) { + // Prevent this warning from firing on every frame, + // which can be expensive in some platforms. + static bool warned = false; + + if (!warned && bit_offset > 8) { Log::Error(Event::OpenGL, "stencil mask overflow"); + warned = true; } } |