Drawable Renderer (#1570), clang-tidy pass
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
namespace mbgl {
|
||||
namespace gfx {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/renderer/renderer_observer.hpp>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/style/image.hpp>
|
||||
#include <mapbox/std/weak.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user