[core] Remove redundant setDebug() from Painter

This information can be obtained directly from MapData.
This commit is contained in:
Bruno de Oliveira Abinader
2015-10-20 12:10:07 -07:00
parent 5db4670d78
commit ad3078e73d
4 changed files with 1 additions and 10 deletions

View File

@@ -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) {

View File

@@ -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));

View File

@@ -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;

View File

@@ -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);