summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/symbol_bucket.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-10-20 12:19:11 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-10-26 15:54:27 +0100
commitc0c554e36fd43bfe57ef13fe60f9cd50b5c018fd (patch)
treeb2c2cbbac1af0a6afbc9de51b90179ec3edaf32f /src/mbgl/renderer/symbol_bucket.hpp
parent5173bf1bb8d21054b0dd6251d23eb37323d6c525 (diff)
downloadqtlocation-mapboxgl-c0c554e36fd43bfe57ef13fe60f9cd50b5c018fd.tar.gz
[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.
Diffstat (limited to 'src/mbgl/renderer/symbol_bucket.hpp')
-rw-r--r--src/mbgl/renderer/symbol_bucket.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mbgl/renderer/symbol_bucket.hpp b/src/mbgl/renderer/symbol_bucket.hpp
index c3c39627cf..54015ae1b9 100644
--- a/src/mbgl/renderer/symbol_bucket.hpp
+++ b/src/mbgl/renderer/symbol_bucket.hpp
@@ -17,6 +17,7 @@
#include <memory>
#include <map>
+#include <set>
#include <vector>
namespace mbgl {
@@ -69,7 +70,7 @@ public:
void upload() override;
void render(Painter&, const StyleLayer&, const TileID&, const mat4&) override;
- bool hasData() const;
+ bool hasData() const override;
bool hasTextData() const;
bool hasIconData() const;
bool hasCollisionBoxData() const;
@@ -85,10 +86,10 @@ public:
void drawIcons(IconShader& shader);
void drawCollisionBoxes(CollisionBoxShader& shader);
- bool needsDependencies(const GeometryTileLayer&,
- const FilterExpression&,
- GlyphStore&,
- Sprite&);
+ void parseFeatures(const GeometryTileLayer&,
+ const FilterExpression&);
+ bool needsDependencies(GlyphStore& glyphStore,
+ Sprite& sprite);
void placeFeatures(CollisionTile&) override;
private:
@@ -120,6 +121,7 @@ private:
const float tileExtent = 4096.0f;
const float tilePixelRatio;
+ std::set<GlyphRange> ranges;
std::vector<SymbolInstance> symbolInstances;
std::vector<SymbolFeature> features;