[core] Convert GeometryTileWorker to "one-phase" loading

Modest simplification refactoring (issue #10457).
Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
This commit is contained in:
Chris Loer
2018-03-30 16:02:56 -07:00
committed by Chris Loer
parent 6762cd0a8f
commit 7f42e3970e
5 changed files with 141 additions and 162 deletions

View File

@@ -65,39 +65,6 @@ TEST(VectorTile, onError) {
EXPECT_TRUE(tile.isComplete());
}
TEST(VectorTile, Issue7615) {
VectorTileTest test;
VectorTile tile(OverscaledTileID(0, 0, 0), "source", test.tileParameters, test.tileset);
style::SymbolLayer symbolLayer("symbol", "source");
std::vector<SymbolInstance> symbolInstances;
auto symbolBucket = std::make_shared<SymbolBucket>(
style::SymbolLayoutProperties::PossiblyEvaluated(),
std::map<
std::string,
std::pair<style::IconPaintProperties::PossiblyEvaluated, style::TextPaintProperties::PossiblyEvaluated>>(),
16.0f, 1.0f, 0.0f, false, false, false, std::move(symbolInstances));
// Simulate placement of a symbol layer.
tile.onPlacement(GeometryTile::PlacementResult {
{{
symbolLayer.getID(),
symbolBucket
}},
{},
{},
}, 0);
// Subsequent onLayout should not cause the existing symbol bucket to be discarded.
tile.onLayout(GeometryTile::LayoutResult {
std::unordered_map<std::string, std::shared_ptr<Bucket>>(),
nullptr,
nullptr,
}, 0);
EXPECT_EQ(symbolBucket.get(), tile.getBucket(*symbolLayer.baseImpl));
}
TEST(VectorTile, Issue8542) {
VectorTileTest test;
VectorTile tile(OverscaledTileID(0, 0, 0), "source", test.tileParameters, test.tileset);