diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp index 9868b5d9d..dedb4dc12 100644 --- a/include/mbgl/renderer/painter.hpp +++ b/include/mbgl/renderer/painter.hpp @@ -62,6 +62,8 @@ public: void cleanup(); + // Renders the backdrop of the OpenGL view. This also paints in areas where we don't have any + // tiles whatsoever. void clear(); // Updates the default matrices to the current viewport dimensions. @@ -73,10 +75,6 @@ public: // Renders debug information for a tile. void renderTileDebug(const Tile& tile); - // Renders the backdrop of the OpenGL view. This also paints in areas where we don't have any - // tiles whatsoever. - void renderMatte(); - // Renders the red debug frame around a tile, visualizing its perimeter. void renderDebugFrame(); diff --git a/src/map/map.cpp b/src/map/map.cpp index ff76de8a5..6124533e6 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -560,8 +560,6 @@ void Map::render() { source->source->finishRender(painter); } - painter.renderMatte(); - // Schedule another rerender when we definitely need a next frame. if (transform.needsTransition() || style->hasTransitions()) { update(); diff --git a/src/renderer/painter.cpp b/src/renderer/painter.cpp index a323b0582..c87bcb19a 100644 --- a/src/renderer/painter.cpp +++ b/src/renderer/painter.cpp @@ -205,21 +205,3 @@ const mat4 &Painter::translatedMatrix(const std::array &translation, c return vtxMatrix; } } - -void Painter::renderMatte() { - gl::group group("matte"); - glDisable(GL_DEPTH_TEST); - glStencilFunc(GL_EQUAL, 0x0, 0xFF); - - Color matte = {{ 0, 0, 0, 1 }}; - - useProgram(plainShader->program); - plainShader->setMatrix(nativeMatrix); - - // Draw the clipping mask - matteArray.bind(*plainShader, tileStencilBuffer, BUFFER_OFFSET(0)); - plainShader->setColor(matte); - glDrawArrays(GL_TRIANGLES, 0, (GLsizei)tileStencilBuffer.index()); - - glEnable(GL_DEPTH_TEST); -}