[core] Make MapDebugOptions::StencilClip a no-op in Release mode
This commit is contained in:
@@ -159,10 +159,12 @@ void Painter::render(const Style& style, const FrameData& frame_, SpriteAtlas& a
|
||||
drawClippingMasks(parameters, generator.getStencils());
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
if (frame.debugOptions & MapDebugOptions::StencilClip) {
|
||||
renderClipMasks();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Actually render the layers
|
||||
if (debug::renderTree) { Log::Info(Event::Render, "{"); indent++; }
|
||||
|
||||
@@ -86,7 +86,10 @@ public:
|
||||
// Renders the red debug frame around a tile, visualizing its perimeter.
|
||||
void renderDebugFrame(const mat4 &matrix);
|
||||
|
||||
#if defined(DEBUG)
|
||||
// Renders tile clip boundaries, using stencil buffer to calculate fill color.
|
||||
void renderClipMasks();
|
||||
#endif
|
||||
|
||||
void renderDebugText(Tile&, const mat4&);
|
||||
void renderFill(PaintParameters&, FillBucket&, const style::FillLayer&, const RenderTile&);
|
||||
|
||||
@@ -87,6 +87,7 @@ void Painter::renderDebugFrame(const mat4 &matrix) {
|
||||
MBGL_CHECK_ERROR(glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)tileBorderBuffer.index()));
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Painter::renderClipMasks() {
|
||||
config.stencilTest = GL_FALSE;
|
||||
config.depthTest = GL_FALSE;
|
||||
@@ -122,5 +123,6 @@ void Painter::renderClipMasks() {
|
||||
MBGL_CHECK_ERROR(glDrawPixels(fbSize[0], fbSize[1], GL_LUMINANCE, GL_UNSIGNED_BYTE, pixels.get()));
|
||||
#endif // GL_ES_VERSION_2_0
|
||||
}
|
||||
#endif // defined(DEBUG)
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user