[core] reparse tiles when new data arrives
We're now reparsing tiles when they expire. We're also swapping out buckets atomically to avoid flickering data; i.e. we're displaying the old data as long as we don't have a new parsed bucket for that layer yet. The parsed buckets now live in the *TileData objects rather than in the TileWorker; only partially parsed == pending buckets will remain in the TileWorker. Once they're parsed, they're moved to the *TileData object.
This commit is contained in:
@@ -5,21 +5,13 @@
|
||||
#include <mbgl/platform/gl.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
using namespace mbgl;
|
||||
|
||||
DebugBucket::DebugBucket(DebugFontBuffer& fontBuffer_)
|
||||
: fontBuffer(fontBuffer_) {
|
||||
}
|
||||
|
||||
void DebugBucket::upload() {
|
||||
fontBuffer.upload();
|
||||
|
||||
uploaded = true;
|
||||
}
|
||||
|
||||
void DebugBucket::render(Painter& painter, const StyleLayer&, const TileID&, const mat4& matrix) {
|
||||
painter.renderDebugText(*this, matrix);
|
||||
DebugBucket::DebugBucket(const TileID id, const TileData::State state_) : state(state_) {
|
||||
const std::string text = std::string(id) + " - " + TileData::StateToString(state);
|
||||
fontBuffer.addText(text.c_str(), 50, 200, 5);
|
||||
}
|
||||
|
||||
void DebugBucket::drawLines(PlainShader& shader) {
|
||||
|
||||
Reference in New Issue
Block a user