Files
MapLibreParticleLab/src/mbgl/renderer/sources/render_vector_source.hpp
Tim Sylvester 247c776d26 Enable FastPFOR encodings in MLT (#4146)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
2026-07-14 12:31:41 -07:00

32 lines
1015 B
C++

#pragma once
#include <mbgl/renderer/sources/render_tile_source.hpp>
#include <mbgl/renderer/tile_pyramid.hpp>
#include <mbgl/style/sources/tile_source_impl.hpp>
namespace mbgl {
class RenderVectorSource final : public RenderTileSetSource {
public:
explicit RenderVectorSource(Immutable<style::TileSource::Impl>, const TaggedScheduler&);
/// Enable the decoding of MLT tiles with FastPFOR integer encodings.
/// Default is false. Such tiles will fail if not explicitly enabled.
void setFastPFOREnabled(bool enable) override { fastPFOREnabled = enable; }
protected:
void updateInternal(const Tileset&,
const std::vector<Immutable<style::LayerProperties>>&,
bool needsRendering,
bool needsRelayout,
const TileParameters&) override;
const std::optional<Tileset>& getTileset() const override;
private:
std::optional<bool> isMLT;
bool fastPFOREnabled = false;
};
} // namespace mbgl