summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-10-20 12:10:07 -0700
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-10-21 11:20:20 -0700
commitad3078e73d4fda41937ccbc19f1444fa2ef8e52a (patch)
treef12b0b528f4d8e7ee0c5461bfd58922ece94c295 /src
parent5db4670d789b120363e460c37415add02bca55ee (diff)
downloadqtlocation-mapboxgl-ad3078e73d4fda41937ccbc19f1444fa2ef8e52a.tar.gz
[core] Remove redundant setDebug() from Painter
This information can be obtained directly from MapData.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map_context.cpp1
-rw-r--r--src/mbgl/renderer/painter.cpp4
-rw-r--r--src/mbgl/renderer/painter.hpp4
-rw-r--r--src/mbgl/renderer/painter_debug.cpp2
4 files changed, 1 insertions, 10 deletions
diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp
index f24216bb48..7b44222a78 100644
--- a/src/mbgl/map/map_context.cpp
+++ b/src/mbgl/map/map_context.cpp
@@ -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) {
diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp
index fc380c2f67..cd75447433 100644
--- a/src/mbgl/renderer/painter.cpp
+++ b/src/mbgl/renderer/painter.cpp
@@ -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));
diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp
index 07bd4c4d3d..7f6fccd582 100644
--- a/src/mbgl/renderer/painter.hpp
+++ b/src/mbgl/renderer/painter.hpp
@@ -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;
diff --git a/src/mbgl/renderer/painter_debug.cpp b/src/mbgl/renderer/painter_debug.cpp
index bc40553244..c401faaaa2 100644
--- a/src/mbgl/renderer/painter_debug.cpp
+++ b/src/mbgl/renderer/painter_debug.cpp
@@ -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);