#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mbgl { using namespace style; enum class RenderState : uint8_t { Never, Partial, Fully, }; struct StillImageRequest { StillImageRequest(View& view_, Map::StillImageCallback&& callback_) : view(view_), callback(std::move(callback_)) { } View& view; Map::StillImageCallback callback; }; class Map::Impl : public style::Observer { public: Impl(Backend&, float pixelRatio, FileSource&, Scheduler&, MapMode, GLContextMode, ConstrainMode, ViewportMode); void onSourceAttributionChanged(style::Source&, const std::string&) override; void onUpdate(Update) override; void onStyleLoaded() override; void onStyleError() override; void onResourceError(std::exception_ptr) override; void update(); void render(View&); void loadStyleJSON(const std::string&); Backend& backend; FileSource& fileSource; Scheduler& scheduler; RenderState renderState = RenderState::Never; Transform transform; const MapMode mode; const GLContextMode contextMode; const float pixelRatio; MapDebugOptions debugOptions { MapDebugOptions::NoDebug }; Update updateFlags = Update::Nothing; util::AsyncTask asyncUpdate; std::unique_ptr annotationManager; std::unique_ptr painter; std::unique_ptr