#pragma once #include #include #include #include #include #include #include #include namespace mbgl { namespace style { class CustomDrawableLayerHost { public: virtual ~CustomDrawableLayerHost() = default; virtual void initialize() = 0; virtual void update(RenderLayer& proxyLayer, gfx::ShaderRegistry& shaders, gfx::Context& context, const TransformState& state, const std::shared_ptr&, const RenderTree& renderTree, UniqueChangeRequestVec& changes) = 0; virtual void deinitialize() = 0; }; class CustomDrawableLayer final : public Layer { public: CustomDrawableLayer(const std::string& id, std::unique_ptr host); CustomDrawableLayer(const CustomDrawableLayer&) = delete; ~CustomDrawableLayer() final; class Impl; const Impl& impl() const; Mutable mutableImpl() const; private: std::optional setPropertyInternal(const std::string& name, const conversion::Convertible& value) final; StyleProperty getProperty(const std::string&) const final; std::unique_ptr cloneRef(const std::string& id) const final; Mutable mutableBaseImpl() const final; }; } // namespace style } // namespace mbgl