Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <bykoianko@gmail.com>2016-10-27 12:01:24 +0300
committerGitHub <noreply@github.com>2016-10-27 12:01:24 +0300
commitfb94f917c56a1d7f849fcb93a2b27b3bbb02ec36 (patch)
treee81a5f573ff3e66c5cde1eab185716603c8a2581 /map
parentb870b7e469a7b0a50b07eef25ea3649d17806c9c (diff)
parentbf4d27098b2610d93104d5b2347738e1f15d1476 (diff)
Merge pull request #4554 from rokuz/drape-api
Added Drape API
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp5
-rw-r--r--map/framework.hpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index 66b5a473b0..32fa8aba04 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -433,6 +433,7 @@ Framework::Framework()
Framework::~Framework()
{
+ m_drapeApi.SetEngine(nullptr);
m_drapeEngine.reset();
m_model.SetOnMapDeregisteredCallback(nullptr);
@@ -1654,6 +1655,8 @@ void Framework::CreateDrapeEngine(ref_ptr<dp::OGLContextFactory> contextFactory,
{
GetPlatform().RunOnGuiThread([this, sizes](){ m_searchMarksSizes = sizes; });
});
+
+ m_drapeApi.SetEngine(make_ref(m_drapeEngine));
}
void Framework::UpdateDrapeEngine(int width, int height)
@@ -1666,6 +1669,8 @@ void Framework::UpdateDrapeEngine(int width, int height)
UpdatePlacePageInfoForCurrentSelection();
+ m_drapeApi.Invalidate();
+
//TODO: update traffic data
}
}
diff --git a/map/framework.hpp b/map/framework.hpp
index 712aaa4b58..4e509a0d96 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -10,6 +10,7 @@
#include "map/track.hpp"
#include "drape_frontend/gui/skin.hpp"
+#include "drape_frontend/drape_api.hpp"
#include "drape_frontend/drape_engine.hpp"
#include "drape_frontend/user_event_stream.hpp"
#include "drape_frontend/watch/frame_image.hpp"
@@ -162,6 +163,8 @@ protected:
uber::Api m_uberApi;
+ df::DrapeApi m_drapeApi;
+
bool m_isRenderingEnabled;
tracking::Reporter m_trackingReporter;
@@ -192,6 +195,8 @@ public:
BookingApi & GetBookingApi() { return m_bookingApi; }
BookingApi const & GetBookingApi() const { return m_bookingApi; }
+ df::DrapeApi & GetDrapeApi() { return m_drapeApi; }
+
uber::Api & GetUberApi() { return m_uberApi;}
/// Migrate to new version of very different data.