Drawable Renderer (#1570), [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2023-05-08 15:52:22 +00:00
committed by Bart Louwers
parent b052cb904e
commit 041acbaf0e
3 changed files with 10 additions and 10 deletions

View File

@@ -224,13 +224,13 @@ void RenderBackgroundLayer::update(const int32_t layerIndex,
const auto& evaluated = getEvaluated<BackgroundLayerProperties>(evaluatedProperties);
// TODO: If background is solid, we can skip drawables and rely on the clear color
const auto passes = evaluated.get<style::BackgroundOpacity>() == 0.0f
? RenderPass::None
: (!unevaluated.get<style::BackgroundPattern>().isUndefined()
|| evaluated.get<style::BackgroundOpacity>() < 1.0f
|| evaluated.get<style::BackgroundColor>().a < 1.0f)
? RenderPass::Translucent
: RenderPass::Opaque | RenderPass::Translucent; // evaluated based on opaquePassCutoff in render()
const auto passes = evaluated.get<style::BackgroundOpacity>() == 0.0f ? RenderPass::None
: (!unevaluated.get<style::BackgroundPattern>().isUndefined() ||
evaluated.get<style::BackgroundOpacity>() < 1.0f ||
evaluated.get<style::BackgroundColor>().a < 1.0f)
? RenderPass::Translucent
: RenderPass::Opaque |
RenderPass::Translucent; // evaluated based on opaquePassCutoff in render()
// unevaluated.hasTransition();
// getCrossfade<BackgroundLayerProperties>(evaluatedProperties).t != 1;

View File

@@ -458,8 +458,8 @@ void RenderFillLayer::update(const int32_t layerIndex,
const auto fillRenderPass = (evaluated.get<FillColor>().constantOr(Color()).a >= 1.0f &&
evaluated.get<FillOpacity>().constantOr(0) >= 1.0f
/* && parameters.currentLayer >= parameters.opaquePassCutoff*/)
? RenderPass::Opaque
: RenderPass::Translucent;
? RenderPass::Opaque
: RenderPass::Translucent;
builder->setRenderPass(fillRenderPass);
const std::vector<gfx::VertexVector<gfx::detail::VertexType<gfx::AttributeType<int16_t, 2>>>::Vertex>&

View File

@@ -202,7 +202,7 @@ void Renderer::Impl::render(const RenderTree& renderTree) {
}
// Draw Drawables
const auto drawDrawables = [&](const mbgl::RenderPass renderPass){
const auto drawDrawables = [&](const mbgl::RenderPass renderPass) {
// TODO: figure out how to make drawables participate in the depth system
// Maybe make it a function mapping draw priority to the depth range (always (0,1)?)
parameters.depthRangeSize = 1 - (1 + 2) * parameters.numSublayers * parameters.depthEpsilon;