Drawable Renderer (#1570), clang-tidy pass

This commit is contained in:
mwilsnd
2023-07-06 12:20:38 -05:00
committed by Bart Louwers
parent 429f9a4f97
commit 1bef197efc
8 changed files with 15 additions and 6 deletions

View File

@@ -2,6 +2,8 @@
#include <cstdint>
#include <exception>
#include <functional>
#include <string>
namespace mbgl {

View File

@@ -4,6 +4,7 @@
#include <cassert>
#include <cstddef>
#include <type_traits>
namespace mbgl {
namespace gfx {

View File

@@ -5,6 +5,7 @@
#include <mbgl/renderer/bucket_parameters.hpp>
#include <mbgl/renderer/render_layer.hpp>
#include <mbgl/style/expression/image.hpp>
#include <mbgl/style/properties.hpp>
#include <mbgl/style/layer_properties.hpp>
namespace mbgl {

View File

@@ -1,6 +1,9 @@
#pragma once
#include <mbgl/renderer/renderer_observer.hpp>
#include <functional>
#include <string>
#include <vector>
namespace mbgl {

View File

@@ -331,8 +331,6 @@ void RenderFillExtrusionLayer::update(gfx::ShaderRegistry& shaders,
std::unique_ptr<gfx::DrawableBuilder> depthBuilder;
std::unique_ptr<gfx::DrawableBuilder> colorBuilder;
gfx::VertexAttributeArray vertexAttrs;
std::vector<uint8_t> rawVertices;
const auto& shaderGroup = hasPattern ? fillExtrusionPatternGroup : fillExtrusionGroup;
if (!shaderGroup) {
@@ -352,7 +350,7 @@ void RenderFillExtrusionLayer::update(gfx::ShaderRegistry& shaders,
const auto& renderData = *optRenderData;
const auto& bucket = static_cast<const FillExtrusionBucket&>(*renderData.bucket);
vertexAttrs.clear();
gfx::VertexAttributeArray vertexAttrs;
gfx::DrawableTweakerPtr tweaker;
if (depthBuilder) {
@@ -471,7 +469,7 @@ void RenderFillExtrusionLayer::update(gfx::ShaderRegistry& shaders,
}
}
rawVertices.resize(vertexSize * vertexCount);
std::vector<uint8_t> rawVertices(vertexSize * vertexCount);
for (std::size_t i = 0; i < vertexCount; ++i) {
std::memcpy(&rawVertices[vertexSize * i], &bucket.vertices.at(i).a1, vertexSize);
}

View File

@@ -300,7 +300,7 @@ void RenderHeatmapLayer::update(gfx::ShaderRegistry& shaders,
return;
}
tileLayerGroup->setLayerTweaker(std::make_shared<HeatmapLayerTweaker>(evaluatedProperties));
renderTarget->addLayerGroup(tileLayerGroup, /*canReplace=*/true);
renderTarget->addLayerGroup(tileLayerGroup, /*replace=*/true);
}
if (renderTarget->getTexture()->getSize() != size) {

View File

@@ -1,6 +1,7 @@
#pragma once
#include <mbgl/style/image.hpp>
#include <mapbox/std/weak.hpp>
#include <string>
#include <map>

View File

@@ -2,9 +2,12 @@
#include <mbgl/util/immutable.hpp>
#include <algorithm>
#include <cassert>
#include <memory>
#include <string>
#include <optional>
#include <string>
#include <vector>
namespace mbgl {
namespace style {