summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-05-06 11:31:23 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-05-21 06:49:17 -0700
commit100eb61fa4e8a4a83dfbe1c3a17c8468dfb4a1ca (patch)
treee091ddfae54b8614cc9df06ae7ed8ac27385199b /include
parentd24524440c949e02dddfbd9e4b23eb4e23ea9e69 (diff)
downloadqtlocation-mapboxgl-100eb61fa4e8a4a83dfbe1c3a17c8468dfb4a1ca.tar.gz
[core] Forward ImageManagerObserver::onRemoveUnusedStyleImages to MapObserver interface
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map_observer.hpp3
-rw-r--r--include/mbgl/renderer/renderer_observer.hpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/map/map_observer.hpp b/include/mbgl/map/map_observer.hpp
index 75e389df9f..a79f5ac82d 100644
--- a/include/mbgl/map/map_observer.hpp
+++ b/include/mbgl/map/map_observer.hpp
@@ -48,6 +48,9 @@ public:
virtual void onSourceChanged(style::Source&) {}
virtual void onDidBecomeIdle() {}
virtual void onStyleImageMissing(const std::string&) {}
+ // This method should return true if unused image can be removed,
+ // false otherwise. By default, unused image will be removed.
+ virtual bool onCanRemoveUnusedStyleImage(const std::string&) { return true; }
};
} // namespace mbgl
diff --git a/include/mbgl/renderer/renderer_observer.hpp b/include/mbgl/renderer/renderer_observer.hpp
index 1a9d3ff9bc..4d21a0aaee 100644
--- a/include/mbgl/renderer/renderer_observer.hpp
+++ b/include/mbgl/renderer/renderer_observer.hpp
@@ -35,6 +35,7 @@ public:
// Style is missing an image
using StyleImageMissingCallback = std::function<void()>;
virtual void onStyleImageMissing(const std::string&, StyleImageMissingCallback done) { done(); }
+ virtual void onRemoveUnusedStyleImages(const std::vector<std::string>&) {}
};
} // namespace mbgl