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:
committed by
Bart Louwers
parent
408a1e39e2
commit
3bc013d3ac
@@ -26,7 +26,11 @@ public:
|
||||
void layerRemoved(UniqueChangeRequestVec&) override;
|
||||
|
||||
/// Generate any changes needed by the layer
|
||||
void update(int32_t layerIndex, gfx::ShaderRegistry&, gfx::Context&, const TransformState&, UniqueChangeRequestVec&) override;
|
||||
void update(int32_t layerIndex,
|
||||
gfx::ShaderRegistry&,
|
||||
gfx::Context&,
|
||||
const TransformState&,
|
||||
UniqueChangeRequestVec&) override;
|
||||
|
||||
private:
|
||||
void transition(const TransitionParameters&) override;
|
||||
|
||||
@@ -286,234 +286,236 @@ void RenderFillLayer::update(const int32_t layerIndex,
|
||||
shader = context.getGenericShader(shaders, shaderName);
|
||||
}
|
||||
|
||||
//const auto& evaluated = getEvaluated<FillLayerProperties>(evaluatedProperties);
|
||||
// std::optional<Color> color;
|
||||
// if (evaluated.get<FillPattern>().from.empty()) {
|
||||
// const auto opacity = evaluated.get<style::FillOpacity>();
|
||||
// if (opacity > 0.0f) {
|
||||
// color = evaluated.get<FillColor>() * evaluated.get<FillOpacity>();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // If the result is transparent or missing, just remove any existing drawables and stop
|
||||
// if (!color) {
|
||||
// removeDrawables<decltype(tileDrawables)::const_iterator>(
|
||||
// tileDrawables.cbegin(), tileDrawables.cend(), changes, [](auto& ii) { return ii->second->getId(); });
|
||||
// tileDrawables.clear();
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// const bool colorChange = (color != lastColor);
|
||||
// const bool layerChange = (layerIndex != lastLayerIndex);
|
||||
// lastColor = color;
|
||||
// lastLayerIndex = layerIndex;
|
||||
//
|
||||
// const auto zoom = state.getIntegerZoom();
|
||||
// const auto tileCover = util::tileCover(state, zoom);
|
||||
//
|
||||
// // Drawables per overscaled or canonical tile?
|
||||
// // const UnwrappedTileID unwrappedTileID = tileID.toUnwrapped();
|
||||
//
|
||||
// // Put the tile cover into a searchable form.
|
||||
// // TODO: Likely better to sort and `std::binary_search` the vector.
|
||||
// // If it's returned in a well-defined order, we might not even need to sort.
|
||||
// const std::unordered_set<OverscaledTileID> newTileIDs(tileCover.begin(), tileCover.end());
|
||||
//
|
||||
// // For each existing tile drawable...
|
||||
// for (auto iter = tileDrawables.begin(); iter != tileDrawables.end();) {
|
||||
// const auto& drawable = iter->second;
|
||||
//
|
||||
// // Has this tile dropped out of the cover set?
|
||||
// if (newTileIDs.find(iter->first) == newTileIDs.end()) {
|
||||
// // remove it
|
||||
// changes.emplace_back(std::make_unique<RemoveDrawableRequest>(drawable->getId()));
|
||||
// // Log::Warning(Event::General, "Removing drawable for " + util::toString(iter->first) + " total " +
|
||||
// // std::to_string(stats.tileDrawablesRemoved+1));
|
||||
// iter = tileDrawables.erase(iter);
|
||||
// ++stats.tileDrawablesRemoved;
|
||||
// continue;
|
||||
// }
|
||||
// ++iter;
|
||||
//
|
||||
// // If the color evaluated to a new value, update all vertexes of the drawable to the new color
|
||||
// if (colorChange) {
|
||||
// drawable->resetColor(*color);
|
||||
// }
|
||||
// if (layerChange) {
|
||||
// drawable->setLayerIndex(layerIndex);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// std::unique_ptr<gfx::DrawableBuilder> builder;
|
||||
//
|
||||
// // For each tile in the cover set, add a tile drawable if one doesn't already exist.
|
||||
// // We currently assume only one drawable per tile.
|
||||
// for (const auto& tileID : tileCover) {
|
||||
// const auto result = tileDrawables.insert(std::make_pair(tileID, gfx::DrawablePtr()));
|
||||
// if (!result.second) {
|
||||
// // Already present
|
||||
// // TODO: Update matrix here or in the tweaker?
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // We actually need to build things, so set up a builder if we haven't already
|
||||
// if (!builder) {
|
||||
// builder = context.createDrawableBuilder("background");
|
||||
// builder->setShader(shader);
|
||||
// builder->addTweaker(context.createDrawableTweaker());
|
||||
// builder->setColor(*color);
|
||||
// builder->setColorMode(gfx::DrawableBuilder::ColorMode::PerDrawable);
|
||||
// builder->setDepthType(gfx::DepthMaskType::ReadWrite);
|
||||
// builder->setLayerIndex(layerIndex);
|
||||
// }
|
||||
//
|
||||
// // Tile coordinates are fixed...
|
||||
// builder->addQuad(0, 0, util::EXTENT, util::EXTENT);
|
||||
//
|
||||
// // ... they're placed with the matrix in the uniforms, which changes with the view
|
||||
// builder->setMatrix(/*parameters.matrixForTile(tileID.toUnwrapped())*/ matrix::identity4());
|
||||
//
|
||||
// builder->flush();
|
||||
//
|
||||
// auto drawables = builder->clearDrawables();
|
||||
// if (!drawables.empty()) {
|
||||
// auto& drawable = drawables[0];
|
||||
// drawable->setTileID(tileID);
|
||||
// result.first->second = drawable;
|
||||
// changes.emplace_back(std::make_unique<AddDrawableRequest>(std::move(drawable)));
|
||||
// ++stats.tileDrawablesAdded;
|
||||
// // Log::Warning(Event::General, "Adding drawable for " + util::toString(tileID) + " total " +
|
||||
// // std::to_string(stats.tileDrawablesAdded+1));
|
||||
// }
|
||||
// }
|
||||
|
||||
// const auto& evaluated = getEvaluated<FillLayerProperties>(evaluatedProperties);
|
||||
// std::optional<Color> color;
|
||||
// if (evaluated.get<FillPattern>().from.empty()) {
|
||||
// const auto opacity = evaluated.get<style::FillOpacity>();
|
||||
// if (opacity > 0.0f) {
|
||||
// color = evaluated.get<FillColor>() * evaluated.get<FillOpacity>();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // If the result is transparent or missing, just remove any existing drawables and stop
|
||||
// if (!color) {
|
||||
// removeDrawables<decltype(tileDrawables)::const_iterator>(
|
||||
// tileDrawables.cbegin(), tileDrawables.cend(), changes, [](auto& ii) { return ii->second->getId(); });
|
||||
// tileDrawables.clear();
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// const bool colorChange = (color != lastColor);
|
||||
// const bool layerChange = (layerIndex != lastLayerIndex);
|
||||
// lastColor = color;
|
||||
// lastLayerIndex = layerIndex;
|
||||
//
|
||||
// const auto zoom = state.getIntegerZoom();
|
||||
// const auto tileCover = util::tileCover(state, zoom);
|
||||
//
|
||||
// // Drawables per overscaled or canonical tile?
|
||||
// // const UnwrappedTileID unwrappedTileID = tileID.toUnwrapped();
|
||||
//
|
||||
// // Put the tile cover into a searchable form.
|
||||
// // TODO: Likely better to sort and `std::binary_search` the vector.
|
||||
// // If it's returned in a well-defined order, we might not even need to sort.
|
||||
// const std::unordered_set<OverscaledTileID> newTileIDs(tileCover.begin(), tileCover.end());
|
||||
//
|
||||
// // For each existing tile drawable...
|
||||
// for (auto iter = tileDrawables.begin(); iter != tileDrawables.end();) {
|
||||
// const auto& drawable = iter->second;
|
||||
//
|
||||
// // Has this tile dropped out of the cover set?
|
||||
// if (newTileIDs.find(iter->first) == newTileIDs.end()) {
|
||||
// // remove it
|
||||
// changes.emplace_back(std::make_unique<RemoveDrawableRequest>(drawable->getId()));
|
||||
// // Log::Warning(Event::General, "Removing drawable for " + util::toString(iter->first) + " total " +
|
||||
// // std::to_string(stats.tileDrawablesRemoved+1));
|
||||
// iter = tileDrawables.erase(iter);
|
||||
// ++stats.tileDrawablesRemoved;
|
||||
// continue;
|
||||
// }
|
||||
// ++iter;
|
||||
//
|
||||
// // If the color evaluated to a new value, update all vertexes of the drawable to the new color
|
||||
// if (colorChange) {
|
||||
// drawable->resetColor(*color);
|
||||
// }
|
||||
// if (layerChange) {
|
||||
// drawable->setLayerIndex(layerIndex);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// std::unique_ptr<gfx::DrawableBuilder> builder;
|
||||
//
|
||||
// // For each tile in the cover set, add a tile drawable if one doesn't already exist.
|
||||
// // We currently assume only one drawable per tile.
|
||||
// for (const auto& tileID : tileCover) {
|
||||
// const auto result = tileDrawables.insert(std::make_pair(tileID, gfx::DrawablePtr()));
|
||||
// if (!result.second) {
|
||||
// // Already present
|
||||
// // TODO: Update matrix here or in the tweaker?
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // We actually need to build things, so set up a builder if we haven't already
|
||||
// if (!builder) {
|
||||
// builder = context.createDrawableBuilder("background");
|
||||
// builder->setShader(shader);
|
||||
// builder->addTweaker(context.createDrawableTweaker());
|
||||
// builder->setColor(*color);
|
||||
// builder->setColorMode(gfx::DrawableBuilder::ColorMode::PerDrawable);
|
||||
// builder->setDepthType(gfx::DepthMaskType::ReadWrite);
|
||||
// builder->setLayerIndex(layerIndex);
|
||||
// }
|
||||
//
|
||||
// // Tile coordinates are fixed...
|
||||
// builder->addQuad(0, 0, util::EXTENT, util::EXTENT);
|
||||
//
|
||||
// // ... they're placed with the matrix in the uniforms, which changes with the view
|
||||
// builder->setMatrix(/*parameters.matrixForTile(tileID.toUnwrapped())*/ matrix::identity4());
|
||||
//
|
||||
// builder->flush();
|
||||
//
|
||||
// auto drawables = builder->clearDrawables();
|
||||
// if (!drawables.empty()) {
|
||||
// auto& drawable = drawables[0];
|
||||
// drawable->setTileID(tileID);
|
||||
// result.first->second = drawable;
|
||||
// changes.emplace_back(std::make_unique<AddDrawableRequest>(std::move(drawable)));
|
||||
// ++stats.tileDrawablesAdded;
|
||||
// // Log::Warning(Event::General, "Adding drawable for " + util::toString(tileID) + " total " +
|
||||
// // std::to_string(stats.tileDrawablesAdded+1));
|
||||
// }
|
||||
// }
|
||||
|
||||
if (unevaluated.get<FillPattern>().isUndefined()) {
|
||||
// parameters.renderTileClippingMasks(renderTiles);
|
||||
// parameters.renderTileClippingMasks(renderTiles);
|
||||
for (const RenderTile& tile : *renderTiles) {
|
||||
const auto renderPass = RenderPass::Translucent;
|
||||
const LayerRenderData* renderData = getRenderDataForPass(tile, renderPass);
|
||||
if (!renderData) {
|
||||
continue;
|
||||
}
|
||||
//auto& bucket = static_cast<FillBucket&>(*renderData->bucket);
|
||||
//const auto& evaluated = getEvaluated<FillLayerProperties>(renderData->layerProperties);
|
||||
// auto& bucket = static_cast<FillBucket&>(*renderData->bucket);
|
||||
// const auto& evaluated = getEvaluated<FillLayerProperties>(renderData->layerProperties);
|
||||
|
||||
// evaluated.get<FillTranslate>(),
|
||||
// evaluated.get<FillTranslateAnchor>(),
|
||||
// parameters.stencilModeForClipping(tile.id),
|
||||
// parameters.colorModeForRenderPass(),
|
||||
// gfx::CullFaceMode::disabled(),
|
||||
//
|
||||
// const auto isOpaque = (evaluated.get<FillColor>().constantOr(Color()).a >= 1.0f &&
|
||||
// evaluated.get<FillOpacity>().constantOr(0) >= 1.0f
|
||||
// );// && layerIndex >= parameters.opaquePassCutoff);
|
||||
// const auto fillRenderPass = isOpaque ? RenderPass::Opaque : RenderPass::Translucent;
|
||||
//
|
||||
// if (renderPass == fillRenderPass) {
|
||||
// }
|
||||
// evaluated.get<FillTranslate>(),
|
||||
// evaluated.get<FillTranslateAnchor>(),
|
||||
// parameters.stencilModeForClipping(tile.id),
|
||||
// parameters.colorModeForRenderPass(),
|
||||
// gfx::CullFaceMode::disabled(),
|
||||
//
|
||||
// const auto isOpaque = (evaluated.get<FillColor>().constantOr(Color()).a >= 1.0f &&
|
||||
// evaluated.get<FillOpacity>().constantOr(0) >= 1.0f
|
||||
// );// && layerIndex >= parameters.opaquePassCutoff);
|
||||
// const auto fillRenderPass = isOpaque ? RenderPass::Opaque : RenderPass::Translucent;
|
||||
//
|
||||
// if (renderPass == fillRenderPass) {
|
||||
// }
|
||||
|
||||
//const auto depthMask = (renderPass == RenderPass::Opaque) ? gfx::DepthMaskType::ReadWrite
|
||||
// : gfx::DepthMaskType::ReadOnly;
|
||||
// const auto depthMask = (renderPass == RenderPass::Opaque) ? gfx::DepthMaskType::ReadWrite
|
||||
// : gfx::DepthMaskType::ReadOnly;
|
||||
|
||||
// const auto depthMode = parameters.depthModeForSublayer(1, depthMask);
|
||||
// const auto depthMode = parameters.depthModeForSublayer(1, depthMask);
|
||||
|
||||
// if (evaluated.get<FillAntialias>() && parameters.pass == RenderPass::Translucent) {
|
||||
// draw(*fillOutlineProgram,
|
||||
// gfx::Lines{2.0f},
|
||||
// parameters.depthModeForSublayer(unevaluated.get<FillOutlineColor>().isUndefined() ? 2 : 0,
|
||||
// gfx::DepthMaskType::ReadOnly),
|
||||
// *bucket.lineIndexBuffer,
|
||||
// bucket.lineSegments,
|
||||
// FillOutlineProgram::TextureBindings{});
|
||||
// }
|
||||
// if (evaluated.get<FillAntialias>() && parameters.pass == RenderPass::Translucent) {
|
||||
// draw(*fillOutlineProgram,
|
||||
// gfx::Lines{2.0f},
|
||||
// parameters.depthModeForSublayer(unevaluated.get<FillOutlineColor>().isUndefined() ? 2
|
||||
// : 0,
|
||||
// gfx::DepthMaskType::ReadOnly),
|
||||
// *bucket.lineIndexBuffer,
|
||||
// bucket.lineSegments,
|
||||
// FillOutlineProgram::TextureBindings{});
|
||||
// }
|
||||
}
|
||||
} else {
|
||||
// if (parameters.pass != RenderPass::Translucent) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// parameters.renderTileClippingMasks(renderTiles);
|
||||
//
|
||||
// for (const RenderTile& tile : *renderTiles) {
|
||||
// const LayerRenderData* renderData = getRenderDataForPass(tile, parameters.pass);
|
||||
// if (!renderData) {
|
||||
// continue;
|
||||
// }
|
||||
// auto& bucket = static_cast<FillBucket&>(*renderData->bucket);
|
||||
// const auto& evaluated = getEvaluated<FillLayerProperties>(renderData->layerProperties);
|
||||
// const auto& crossfade = getCrossfade<FillLayerProperties>(renderData->layerProperties);
|
||||
//
|
||||
// const auto& fillPatternValue = evaluated.get<FillPattern>().constantOr(Faded<expression::Image>{"", ""});
|
||||
// std::optional<ImagePosition> patternPosA = tile.getPattern(fillPatternValue.from.id());
|
||||
// std::optional<ImagePosition> patternPosB = tile.getPattern(fillPatternValue.to.id());
|
||||
//
|
||||
// auto draw = [&](auto& programInstance,
|
||||
// const auto& drawMode,
|
||||
// const auto& depthMode,
|
||||
// const auto& indexBuffer,
|
||||
// const auto& segments,
|
||||
// auto&& textureBindings) {
|
||||
// const auto& paintPropertyBinders = bucket.paintPropertyBinders.at(getID());
|
||||
// paintPropertyBinders.setPatternParameters(patternPosA, patternPosB, crossfade);
|
||||
//
|
||||
// const auto allUniformValues = programInstance.computeAllUniformValues(
|
||||
// FillPatternProgram::layoutUniformValues(
|
||||
// tile.translatedMatrix(
|
||||
// evaluated.get<FillTranslate>(), evaluated.get<FillTranslateAnchor>(), parameters.state),
|
||||
// parameters.backend.getDefaultRenderable().getSize(),
|
||||
// tile.getIconAtlasTexture().size,
|
||||
// crossfade,
|
||||
// tile.id,
|
||||
// parameters.state,
|
||||
// parameters.pixelRatio),
|
||||
// paintPropertyBinders,
|
||||
// evaluated,
|
||||
// static_cast<float>(parameters.state.getZoom()));
|
||||
// const auto allAttributeBindings = programInstance.computeAllAttributeBindings(
|
||||
// *bucket.vertexBuffer, paintPropertyBinders, evaluated);
|
||||
//
|
||||
// checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));
|
||||
//
|
||||
// programInstance.draw(parameters.context,
|
||||
// *parameters.renderPass,
|
||||
// drawMode,
|
||||
// depthMode,
|
||||
// parameters.stencilModeForClipping(tile.id),
|
||||
// parameters.colorModeForRenderPass(),
|
||||
// gfx::CullFaceMode::disabled(),
|
||||
// indexBuffer,
|
||||
// segments,
|
||||
// allUniformValues,
|
||||
// allAttributeBindings,
|
||||
// std::forward<decltype(textureBindings)>(textureBindings),
|
||||
// getID());
|
||||
// };
|
||||
//
|
||||
// if (bucket.triangleIndexBuffer) {
|
||||
// draw(*fillPatternProgram,
|
||||
// gfx::Triangles(),
|
||||
// parameters.depthModeForSublayer(1, gfx::DepthMaskType::ReadWrite),
|
||||
// *bucket.triangleIndexBuffer,
|
||||
// bucket.triangleSegments,
|
||||
// FillPatternProgram::TextureBindings{
|
||||
// textures::image::Value{tile.getIconAtlasTexture().getResource(),
|
||||
// gfx::TextureFilterType::Linear},
|
||||
// });
|
||||
// }
|
||||
// if (evaluated.get<FillAntialias>() && unevaluated.get<FillOutlineColor>().isUndefined()) {
|
||||
// draw(*fillOutlinePatternProgram,
|
||||
// gfx::Lines{2.0f},
|
||||
// parameters.depthModeForSublayer(2, gfx::DepthMaskType::ReadOnly),
|
||||
// *bucket.lineIndexBuffer,
|
||||
// bucket.lineSegments,
|
||||
// FillOutlinePatternProgram::TextureBindings{
|
||||
// textures::image::Value{tile.getIconAtlasTexture().getResource(),
|
||||
// gfx::TextureFilterType::Linear},
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// if (parameters.pass != RenderPass::Translucent) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// parameters.renderTileClippingMasks(renderTiles);
|
||||
//
|
||||
// for (const RenderTile& tile : *renderTiles) {
|
||||
// const LayerRenderData* renderData = getRenderDataForPass(tile, parameters.pass);
|
||||
// if (!renderData) {
|
||||
// continue;
|
||||
// }
|
||||
// auto& bucket = static_cast<FillBucket&>(*renderData->bucket);
|
||||
// const auto& evaluated = getEvaluated<FillLayerProperties>(renderData->layerProperties);
|
||||
// const auto& crossfade = getCrossfade<FillLayerProperties>(renderData->layerProperties);
|
||||
//
|
||||
// const auto& fillPatternValue =
|
||||
// evaluated.get<FillPattern>().constantOr(Faded<expression::Image>{"", ""});
|
||||
// std::optional<ImagePosition> patternPosA = tile.getPattern(fillPatternValue.from.id());
|
||||
// std::optional<ImagePosition> patternPosB = tile.getPattern(fillPatternValue.to.id());
|
||||
//
|
||||
// auto draw = [&](auto& programInstance,
|
||||
// const auto& drawMode,
|
||||
// const auto& depthMode,
|
||||
// const auto& indexBuffer,
|
||||
// const auto& segments,
|
||||
// auto&& textureBindings) {
|
||||
// const auto& paintPropertyBinders = bucket.paintPropertyBinders.at(getID());
|
||||
// paintPropertyBinders.setPatternParameters(patternPosA, patternPosB, crossfade);
|
||||
//
|
||||
// const auto allUniformValues = programInstance.computeAllUniformValues(
|
||||
// FillPatternProgram::layoutUniformValues(
|
||||
// tile.translatedMatrix(
|
||||
// evaluated.get<FillTranslate>(), evaluated.get<FillTranslateAnchor>(),
|
||||
// parameters.state),
|
||||
// parameters.backend.getDefaultRenderable().getSize(),
|
||||
// tile.getIconAtlasTexture().size,
|
||||
// crossfade,
|
||||
// tile.id,
|
||||
// parameters.state,
|
||||
// parameters.pixelRatio),
|
||||
// paintPropertyBinders,
|
||||
// evaluated,
|
||||
// static_cast<float>(parameters.state.getZoom()));
|
||||
// const auto allAttributeBindings = programInstance.computeAllAttributeBindings(
|
||||
// *bucket.vertexBuffer, paintPropertyBinders, evaluated);
|
||||
//
|
||||
// checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));
|
||||
//
|
||||
// programInstance.draw(parameters.context,
|
||||
// *parameters.renderPass,
|
||||
// drawMode,
|
||||
// depthMode,
|
||||
// parameters.stencilModeForClipping(tile.id),
|
||||
// parameters.colorModeForRenderPass(),
|
||||
// gfx::CullFaceMode::disabled(),
|
||||
// indexBuffer,
|
||||
// segments,
|
||||
// allUniformValues,
|
||||
// allAttributeBindings,
|
||||
// std::forward<decltype(textureBindings)>(textureBindings),
|
||||
// getID());
|
||||
// };
|
||||
//
|
||||
// if (bucket.triangleIndexBuffer) {
|
||||
// draw(*fillPatternProgram,
|
||||
// gfx::Triangles(),
|
||||
// parameters.depthModeForSublayer(1, gfx::DepthMaskType::ReadWrite),
|
||||
// *bucket.triangleIndexBuffer,
|
||||
// bucket.triangleSegments,
|
||||
// FillPatternProgram::TextureBindings{
|
||||
// textures::image::Value{tile.getIconAtlasTexture().getResource(),
|
||||
// gfx::TextureFilterType::Linear},
|
||||
// });
|
||||
// }
|
||||
// if (evaluated.get<FillAntialias>() && unevaluated.get<FillOutlineColor>().isUndefined()) {
|
||||
// draw(*fillOutlinePatternProgram,
|
||||
// gfx::Lines{2.0f},
|
||||
// parameters.depthModeForSublayer(2, gfx::DepthMaskType::ReadOnly),
|
||||
// *bucket.lineIndexBuffer,
|
||||
// bucket.lineSegments,
|
||||
// FillOutlinePatternProgram::TextureBindings{
|
||||
// textures::image::Value{tile.getIconAtlasTexture().getResource(),
|
||||
// gfx::TextureFilterType::Linear},
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -21,7 +21,11 @@ public:
|
||||
void layerRemoved(UniqueChangeRequestVec&) override;
|
||||
|
||||
/// Generate any changes needed by the layer
|
||||
void update(int32_t layerIndex, gfx::ShaderRegistry&, gfx::Context&, const TransformState&, UniqueChangeRequestVec&) override;
|
||||
void update(int32_t layerIndex,
|
||||
gfx::ShaderRegistry&,
|
||||
gfx::Context&,
|
||||
const TransformState&,
|
||||
UniqueChangeRequestVec&) override;
|
||||
|
||||
private:
|
||||
void transition(const TransitionParameters&) override;
|
||||
|
||||
@@ -141,7 +141,8 @@ public:
|
||||
virtual std::optional<Color> getSolidBackground() const;
|
||||
|
||||
/// Generate any changes needed by the layer
|
||||
virtual void update(int32_t /*layerIndex*/, gfx::ShaderRegistry&, gfx::Context&, const TransformState&, UniqueChangeRequestVec&) {}
|
||||
virtual void update(
|
||||
int32_t /*layerIndex*/, gfx::ShaderRegistry&, gfx::Context&, const TransformState&, UniqueChangeRequestVec&) {}
|
||||
|
||||
virtual void layerRemoved(UniqueChangeRequestVec&) {}
|
||||
|
||||
|
||||
@@ -138,7 +138,6 @@ void RenderOrchestrator::setObserver(RendererObserver* observer_) {
|
||||
|
||||
std::unique_ptr<RenderTree> RenderOrchestrator::createRenderTree(
|
||||
const std::shared_ptr<UpdateParameters>& updateParameters) {
|
||||
|
||||
const bool isMapModeContinuous = updateParameters->mode == MapMode::Continuous;
|
||||
if (!isMapModeContinuous) {
|
||||
// Reset zoom history state.
|
||||
|
||||
Reference in New Issue
Block a user