Skip to content

Commit

Permalink
tweak fill and symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSylvester committed Aug 9, 2024
1 parent 362d627 commit 8ad5837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/mbgl/renderer/layers/render_fill_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,

// If we already have drawables for this tile, update them.
auto updateExisting = [&](gfx::Drawable& drawable) {
if (drawable.getLayerTweaker() != layerTweaker) {
// This drawable was produced on a previous style/bucket, and should not be updated.
return false;
}
drawable.setVertexAttributes(vertexAttrs);
return true;
};
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/renderer/layers/render_symbol_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ void RenderSymbolLayer::update(gfx::ShaderRegistry& shaders,
const auto values = isText ? textPropertyValues(evaluated, layout) : iconPropertyValues(evaluated, layout);
const std::string suffix = isText ? "text/" : "icon/";

auto addVertices = [&collisionBuilder](const auto& vertices) {
const auto addVertices = [&collisionBuilder](const auto& vertices) {
collisionBuilder->setRawVertices({}, vertices.size(), gfx::AttributeDataType::Short2);
};

Expand Down Expand Up @@ -1148,7 +1148,7 @@ void RenderSymbolLayer::update(gfx::ShaderRegistry& shaders,
gfx::DrawableTweakerPtr textTweaker, iconTweaker;
};

std::unordered_map<UnwrappedTileID, TileInfo> tileCache;
mbgl::unordered_map<UnwrappedTileID, TileInfo> tileCache;
tileCache.reserve(renderTiles->size());

for (auto& group : renderableSegments) {
Expand Down

0 comments on commit 8ad5837

Please sign in to comment.