Record frame history in the correct place

Fixes numerous issues with rendering tests.
This commit is contained in:
John Firebaugh
2014-08-28 16:39:29 -07:00
parent fd40bde612
commit c13cc4aa38
3 changed files with 4 additions and 3 deletions

View File

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

View File

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

View File

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