[core] Don't upload empty buckets
This commit is contained in:
@@ -28,6 +28,9 @@ public:
|
||||
Bucket() = default;
|
||||
virtual ~Bucket() = default;
|
||||
|
||||
// Feature geometries are also used to populate the feature index.
|
||||
// Obtaining these is a costly operation, so we do it only once, and
|
||||
// pass-by-const-ref the geometries as a second parameter.
|
||||
virtual void addFeature(const GeometryTileFeature&,
|
||||
const GeometryCollection&) {};
|
||||
|
||||
@@ -46,7 +49,7 @@ public:
|
||||
};
|
||||
|
||||
bool needsUpload() const {
|
||||
return !uploaded;
|
||||
return hasData() && !uploaded;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -69,8 +69,7 @@ void SymbolBucket::render(Painter& painter,
|
||||
}
|
||||
|
||||
bool SymbolBucket::hasData() const {
|
||||
assert(false); // Should be calling SymbolLayout::has{Text,Icon,CollisonBox}Data() instead.
|
||||
return false;
|
||||
return hasTextData() || hasIconData() || hasCollisionBoxData();
|
||||
}
|
||||
|
||||
bool SymbolBucket::hasTextData() const {
|
||||
|
||||
Reference in New Issue
Block a user