[core] Remove redundant setDebug() from Painter
This information can be obtained directly from MapData.
This commit is contained in:
@@ -248,7 +248,6 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame)
|
||||
painter->setup();
|
||||
}
|
||||
|
||||
painter->setDebug(data.getDebug());
|
||||
painter->render(*style, transformState, frame, data.getAnimationTime());
|
||||
|
||||
if (data.mode == MapMode::Still) {
|
||||
|
||||
@@ -113,10 +113,6 @@ void Painter::resize() {
|
||||
}
|
||||
}
|
||||
|
||||
void Painter::setDebug(bool enabled) {
|
||||
debug = enabled;
|
||||
}
|
||||
|
||||
void Painter::useProgram(GLuint program) {
|
||||
if (gl_program != program) {
|
||||
MBGL_CHECK_ERROR(glUseProgram(program));
|
||||
|
||||
@@ -120,9 +120,6 @@ public:
|
||||
// Adjusts the dimensions of the OpenGL viewport
|
||||
void resize();
|
||||
|
||||
// Changes whether debug information is drawn onto the map
|
||||
void setDebug(bool enabled);
|
||||
|
||||
void drawClippingMasks(const std::set<Source*>&);
|
||||
void drawClippingMask(const mat4& matrix, const ClipID& clip);
|
||||
|
||||
@@ -189,7 +186,6 @@ private:
|
||||
TransformState state;
|
||||
FrameData frame;
|
||||
|
||||
bool debug = false;
|
||||
int indent = 0;
|
||||
|
||||
gl::Config config;
|
||||
|
||||
@@ -12,7 +12,7 @@ using namespace mbgl;
|
||||
void Painter::renderTileDebug(const Tile& tile) {
|
||||
MBGL_DEBUG_GROUP(std::string { "debug " } + std::string(tile.id));
|
||||
assert(tile.data);
|
||||
if (debug) {
|
||||
if (data.getDebug()) {
|
||||
prepareTile(tile);
|
||||
renderDebugText(tile.data->debugBucket, tile.matrix);
|
||||
renderDebugFrame(tile.matrix);
|
||||
|
||||
Reference in New Issue
Block a user