test: add core particle render layer validation
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/layermanager/layer_factory.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
// VALIDATION ONLY: factory for the 30-01 Core RenderLayer experiment.
|
||||
class ParticleValidationLayerFactory final : public LayerFactory {
|
||||
public:
|
||||
const style::LayerTypeInfo* getTypeInfo() const noexcept override;
|
||||
std::unique_ptr<style::Layer> createLayer(const std::string&,
|
||||
const style::conversion::Convertible&) noexcept override;
|
||||
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept override;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
32
include/mbgl/style/layers/particle_validation_layer.hpp
Normal file
32
include/mbgl/style/layers/particle_validation_layer.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/style/layer.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
|
||||
// VALIDATION ONLY: minimal source-less Core layer for 30-01 architecture validation.
|
||||
class ParticleValidationLayer final : public Layer {
|
||||
public:
|
||||
explicit ParticleValidationLayer(const std::string& layerID);
|
||||
~ParticleValidationLayer() override;
|
||||
|
||||
bool isActive() const;
|
||||
void setActive(bool);
|
||||
|
||||
class Impl;
|
||||
const Impl& impl() const;
|
||||
Mutable<Impl> mutableImpl() const;
|
||||
|
||||
private:
|
||||
explicit ParticleValidationLayer(Immutable<Impl>);
|
||||
|
||||
std::optional<conversion::Error> setPropertyInternal(const std::string&, const conversion::Convertible&) override;
|
||||
StyleProperty getProperty(const std::string&) const override;
|
||||
Value serialize() const override;
|
||||
std::unique_ptr<Layer> cloneRef(const std::string& id) const override;
|
||||
Mutable<Layer::Impl> mutableBaseImpl() const override;
|
||||
};
|
||||
|
||||
} // namespace style
|
||||
} // namespace mbgl
|
||||
Reference in New Issue
Block a user