Avoid style warnings on trace points (#2656)

This commit is contained in:
Tim Sylvester
2024-07-26 07:04:23 -07:00
committed by GitHub
parent 7b3c282792
commit 04d8a1105f
39 changed files with 315 additions and 279 deletions

View File

@@ -29,7 +29,7 @@
namespace mbgl {
LayerRenderData* GeometryTile::LayoutResult::getLayerRenderData(const style::Layer::Impl& layerImpl) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
auto it = layerRenderData.find(layerImpl.id);
if (it == layerRenderData.end()) {
@@ -65,7 +65,7 @@ private:
using namespace style;
std::optional<ImagePosition> GeometryTileRenderData::getPattern(const std::string& pattern) const {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (layoutResult) {
const auto& iconAtlas = layoutResult->iconAtlas;
@@ -78,7 +78,7 @@ std::optional<ImagePosition> GeometryTileRenderData::getPattern(const std::strin
}
void GeometryTileRenderData::upload(gfx::UploadPass& uploadPass) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (!layoutResult) return;
@@ -134,7 +134,7 @@ void GeometryTileRenderData::upload(gfx::UploadPass& uploadPass) {
}
void GeometryTileRenderData::prepare(const SourcePrepareParameters& parameters) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (!layoutResult) return;
imagePatches = layoutResult->iconAtlas.getImagePatchesAndUpdateVersions(parameters.imageManager);
@@ -187,7 +187,7 @@ GeometryTile::GeometryTile(const OverscaledTileID& id_, std::string sourceID_, c
showCollisionBoxes(parameters.debugOptions & MapDebugOptions::Collision) {}
GeometryTile::~GeometryTile() {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
markObsolete();
@@ -215,7 +215,7 @@ void GeometryTile::setError(std::exception_ptr err) {
}
void GeometryTile::setData(std::unique_ptr<const GeometryTileData> data_) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (obsolete) {
return;
@@ -231,7 +231,7 @@ void GeometryTile::setData(std::unique_ptr<const GeometryTileData> data_) {
}
void GeometryTile::reset() {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
// Mark the tile as pending again if it was complete before to prevent
// signaling a complete state despite pending parse operations.
@@ -242,13 +242,13 @@ void GeometryTile::reset() {
}
std::unique_ptr<TileRenderData> GeometryTile::createRenderData() {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
return std::make_unique<GeometryTileRenderData>(layoutResult, atlasTextures);
}
void GeometryTile::setLayers(const std::vector<Immutable<LayerProperties>>& layers) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
// Mark the tile as pending again if it was complete before to prevent
// signaling a complete state despite pending parse operations.
@@ -276,7 +276,7 @@ void GeometryTile::setLayers(const std::vector<Immutable<LayerProperties>>& laye
}
void GeometryTile::setShowCollisionBoxes(const bool showCollisionBoxes_) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (showCollisionBoxes != showCollisionBoxes_) {
showCollisionBoxes = showCollisionBoxes_;
@@ -286,7 +286,7 @@ void GeometryTile::setShowCollisionBoxes(const bool showCollisionBoxes_) {
}
void GeometryTile::onLayout(std::shared_ptr<LayoutResult> result, const uint64_t resultCorrelationID) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
loaded = true;
renderable = true;
@@ -311,13 +311,13 @@ void GeometryTile::onError(std::exception_ptr err, const uint64_t resultCorrelat
}
void GeometryTile::onGlyphsAvailable(GlyphMap glyphs) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
worker.self().invoke(&GeometryTileWorker::onGlyphsAvailable, std::move(glyphs));
}
void GeometryTile::getGlyphs(GlyphDependencies glyphDependencies) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (fileSource) {
glyphManager->getGlyphs(*this, std::move(glyphDependencies), *fileSource);
@@ -328,7 +328,7 @@ void GeometryTile::onImagesAvailable(ImageMap images,
ImageMap patterns,
ImageVersionMap versionMap,
uint64_t imageCorrelationID) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
worker.self().invoke(&GeometryTileWorker::onImagesAvailable,
std::move(images),
@@ -338,7 +338,7 @@ void GeometryTile::onImagesAvailable(ImageMap images,
}
void GeometryTile::getImages(ImageRequestPair pair) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
imageManager->getImages(*this, std::move(pair));
}
@@ -348,7 +348,7 @@ std::shared_ptr<FeatureIndex> GeometryTile::getFeatureIndex() const {
}
bool GeometryTile::layerPropertiesUpdated(const Immutable<style::LayerProperties>& layerProperties) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
LayerRenderData* renderData = getLayerRenderData(*layerProperties->baseImpl);
if (!renderData) {
@@ -371,13 +371,13 @@ const GeometryTileData* GeometryTile::getData() const {
}
LayerRenderData* GeometryTile::getLayerRenderData(const style::Layer::Impl& layerImpl) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
return layoutResult ? layoutResult->getLayerRenderData(layerImpl) : nullptr;
}
float GeometryTile::getQueryPadding(const std::unordered_map<std::string, const RenderLayer*>& layers) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
float queryPadding = 0;
for (const auto& pair : layers) {
@@ -396,7 +396,7 @@ void GeometryTile::queryRenderedFeatures(std::unordered_map<std::string, std::ve
const RenderedQueryOptions& options,
const mat4& projMatrix,
const SourceFeatureState& featureState) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
if (!getData()) return;
@@ -420,7 +420,7 @@ void GeometryTile::queryRenderedFeatures(std::unordered_map<std::string, std::ve
}
void GeometryTile::querySourceFeatures(std::vector<Feature>& result, const SourceQueryOptions& options) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
// Data not yet available, or tile is empty
if (!getData()) {
@@ -477,7 +477,7 @@ void GeometryTile::performedFadePlacement() {
}
void GeometryTile::setFeatureState(const LayerFeatureStates& states) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC()
auto layers = getData();
if ((layers == nullptr) || states.empty() || !layoutResult) {