summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-08-28 16:39:29 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-08-28 16:43:03 -0700
commitc13cc4aa3818502a9ca505ea218dead57cbbbb5f (patch)
treec6af1f2876d0fc75b41dc172a91ed219d8082cbe
parentfd40bde61207c47710dba2d1587d90e505ed6837 (diff)
downloadqtlocation-mapboxgl-c13cc4aa3818502a9ca505ea218dead57cbbbb5f.tar.gz
Record frame history in the correct place
Fixes numerous issues with rendering tests.
-rw-r--r--include/mbgl/renderer/painter.hpp4
-rw-r--r--src/map/map.cpp2
-rw-r--r--src/renderer/painter.cpp1
3 files changed, 4 insertions, 3 deletions
diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp
index e2d56b1514..957660a525 100644
--- a/include/mbgl/renderer/painter.hpp
+++ b/include/mbgl/renderer/painter.hpp
@@ -153,8 +153,6 @@ public:
private:
Map& map;
- FrameHistory frameHistory;
-
bool debug = false;
uint32_t gl_program = 0;
@@ -167,6 +165,8 @@ private:
const float strata_epsilon = 1.0f / (1 << 16);
public:
+ FrameHistory frameHistory;
+
std::unique_ptr<PlainShader> plainShader;
std::unique_ptr<OutlineShader> outlineShader;
std::unique_ptr<LineShader> lineShader;
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 39542d3f59..45fae8444f 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -559,6 +559,8 @@ void Map::render() {
painter.drawClippingMasks(getActiveSources());
+ painter.frameHistory.record(getAnimationTime(), getState().getNormalizedZoom());
+
// Actually render the layers
if (debug::renderTree) { std::cout << "{" << std::endl; indent++; }
renderLayers(style->layers);
diff --git a/src/renderer/painter.cpp b/src/renderer/painter.cpp
index cfc3e8e546..4822ba7312 100644
--- a/src/renderer/painter.cpp
+++ b/src/renderer/painter.cpp
@@ -179,7 +179,6 @@ void Painter::renderTileLayer(const Tile& tile, std::shared_ptr<StyleLayer> laye
gl::group group(util::sprintf<32>("render %d/%d/%d\n", tile.id.z, tile.id.y, tile.id.z));
prepareTile(tile);
tile.data->render(*this, layer_desc, matrix);
- frameHistory.record(map.getAnimationTime(), map.getState().getNormalizedZoom());
}
}