summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map_context.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-05-05 10:18:36 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-05-05 10:18:36 -0700
commit6260dbe043d9e836f4d5955f1a72e7965b7a7b29 (patch)
tree5dba188571ac0b4dc26f9b017470b3f71e19a695 /src/mbgl/map/map_context.hpp
parent81e6c2c6c3ece471e03456a49d3bb6dc1d5a7284 (diff)
parent19881f8b24c94ef66cc3ee72eebc73eeb37af2af (diff)
downloadqtlocation-mapboxgl-ios-v0.2.20.tar.gz
Merge pull request #1326 from mapbox/925-remove_promisesios-v0.2.20
Remove promises from the parsing pipeline
Diffstat (limited to 'src/mbgl/map/map_context.hpp')
-rw-r--r--src/mbgl/map/map_context.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp
index 93670fd1f2..0463d076b6 100644
--- a/src/mbgl/map/map_context.hpp
+++ b/src/mbgl/map/map_context.hpp
@@ -4,6 +4,7 @@
#include <mbgl/map/tile_id.hpp>
#include <mbgl/map/update.hpp>
#include <mbgl/map/environment.hpp>
+#include <mbgl/map/resource_loader.hpp>
#include <mbgl/map/transform_state.hpp>
#include <mbgl/util/ptr.hpp>
@@ -32,7 +33,7 @@ class StillImage;
struct LatLng;
struct LatLngBounds;
-class MapContext {
+class MapContext : public ResourceLoader::Observer {
public:
MapContext(uv_loop_t*, View&, FileSource&, MapData&, bool startPaused);
~MapContext();
@@ -58,6 +59,9 @@ public:
void setSourceTileCacheSize(size_t size);
void onLowMemory();
+ // ResourceLoader::Observer implementation.
+ void onTileDataChanged() override;
+
private:
util::ptr<Sprite> getSprite();
void updateTiles();
@@ -84,8 +88,7 @@ private:
std::unique_ptr<TexturePool> texturePool;
std::unique_ptr<Painter> painter;
std::unique_ptr<Style> style;
-
- util::ptr<Sprite> sprite;
+ std::unique_ptr<ResourceLoader> resourceLoader;
std::string styleURL;
std::string styleJSON;