#pragma once #include #include #include #include #include #include #include #include namespace mbgl { class RendererObserver; class RenderedQueryOptions; class SourceQueryOptions; class UpdateParameters; namespace gfx { class RendererBackend; } // namespace gfx class Renderer { public: Renderer(gfx::RendererBackend&, float pixelRatio_, const optional localFontFamily = {}); ~Renderer(); void markContextLost(); void setObserver(RendererObserver*); void render(const UpdateParameters&); // Feature queries std::vector queryRenderedFeatures(const ScreenLineString&, const RenderedQueryOptions& options = {}) const; std::vector queryRenderedFeatures(const ScreenCoordinate& point, const RenderedQueryOptions& options = {}) const; std::vector queryRenderedFeatures(const ScreenBox& box, const RenderedQueryOptions& options = {}) const; std::vector querySourceFeatures(const std::string& sourceID, const SourceQueryOptions& options = {}) const; AnnotationIDs queryPointAnnotations(const ScreenBox& box) const; AnnotationIDs queryShapeAnnotations(const ScreenBox& box) const; AnnotationIDs getAnnotationIDs(const std::vector&) const; // Feature extension query FeatureExtensionValue queryFeatureExtensions(const std::string& sourceID, const Feature& feature, const std::string& extension, const std::string& extensionField, const optional>& args = {}) const; void setFeatureState(const std::string& sourceID, const optional& sourceLayerID, const std::string& featureID, const FeatureState& state); void getFeatureState(FeatureState& state, const std::string& sourceID, const optional& sourceLayerID, const std::string& featureID) const; void removeFeatureState(const std::string& sourceID, const optional& sourceLayerID, const optional& featureID, const optional& stateKey); // Debug void dumpDebugLogs(); // Memory void reduceMemoryUse(); private: class Impl; std::unique_ptr impl; }; } // namespace mbgl