Don't use std::function in the renderer hot paths (#1883)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mwilsnd
2023-11-27 10:36:03 -05:00
committed by GitHub
parent bf472b0703
commit 71d4ceabcd
27 changed files with 260 additions and 311 deletions

View File

@@ -425,8 +425,9 @@ void RenderRasterLayer::update(gfx::ShaderRegistry& shaders,
} else if (renderTiles) {
// Remove existing drawables that are no longer in the cover set
if (layerGroup) {
stats.drawablesRemoved += layerGroup->removeDrawablesIf(
[&](gfx::Drawable& drawable) { return drawable.getTileID() && !hasRenderTile(*drawable.getTileID()); });
stats.drawablesRemoved += removeLayerGroupDrawablesIf(*layerGroup, [&](gfx::Drawable& drawable) {
return drawable.getTileID() && !hasRenderTile(*drawable.getTileID());
});
} else {
// Set up a tile layer group
if (auto layerGroup_ = context.createTileLayerGroup(layerIndex, /*initialCapacity=*/64, getID())) {