From 3832f8d0d8194b81ea34a045e19b0d5bc7a89e25 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Tue, 13 Jun 2017 10:50:16 +0300 Subject: [core] renderer interface --- include/mbgl/map/map.hpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'include/mbgl/map/map.hpp') diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 22ac100c40..14f42d7fd5 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -4,13 +4,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include @@ -24,6 +21,7 @@ class Backend; class View; class FileSource; class Scheduler; +class RendererFrontend; namespace style { class Image; @@ -32,30 +30,25 @@ class Style; class Map : private util::noncopyable { public: - explicit Map(Backend&, + explicit Map(RendererFrontend&, MapObserver&, Size size, float pixelRatio, FileSource&, Scheduler&, MapMode mapMode = MapMode::Continuous, - GLContextMode contextMode = GLContextMode::Unique, ConstrainMode constrainMode = ConstrainMode::HeightOnly, - ViewportMode viewportMode = ViewportMode::Default, - optional programCacheDir = optional()); + ViewportMode viewportMode = ViewportMode::Default); ~Map(); // Register a callback that will get called (on the render thread) when all resources have // been loaded and a complete render occurs. using StillImageCallback = std::function; - void renderStill(View&, StillImageCallback callback); + void renderStill(StillImageCallback callback); // Triggers a repaint. void triggerRepaint(); - // Main render function. - void render(View&); - style::Style& getStyle(); const style::Style& getStyle() const; @@ -150,13 +143,6 @@ public: void updateAnnotation(AnnotationID, const Annotation&); void removeAnnotation(AnnotationID); - // Feature queries - std::vector queryRenderedFeatures(const ScreenCoordinate&, const RenderedQueryOptions& options = {}); - std::vector queryRenderedFeatures(const ScreenBox&, const RenderedQueryOptions& options = {}); - std::vector querySourceFeatures(const std::string& sourceID, const SourceQueryOptions& options = {}); - - AnnotationIDs queryPointAnnotations(const ScreenBox&); - // Tile prefetching // // When loading a map, if `PrefetchZoomDelta` is set to any number greater than 0, the map will @@ -166,9 +152,6 @@ public: void setPrefetchZoomDelta(uint8_t delta); uint8_t getPrefetchZoomDelta() const; - // Memory - void onLowMemory(); - // Debug void setDebug(MapDebugOptions); void cycleDebugOptions(); -- cgit v1.2.1