From 5527887c4bb1299fd2351e1a0c7550fab5f39bef Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Wed, 19 Oct 2016 17:52:43 +0300 Subject: [android] geojson source - remove explicit repaint requests --- platform/android/src/style/sources/geojson_source.cpp | 6 ------ platform/android/src/style/sources/source.cpp | 13 ------------- platform/android/src/style/sources/source.hpp | 1 - 3 files changed, 20 deletions(-) (limited to 'platform/android') diff --git a/platform/android/src/style/sources/geojson_source.cpp b/platform/android/src/style/sources/geojson_source.cpp index cb03cc06c6..234dccb315 100644 --- a/platform/android/src/style/sources/geojson_source.cpp +++ b/platform/android/src/style/sources/geojson_source.cpp @@ -36,17 +36,11 @@ namespace android { //Update the core source source.as()->GeoJSONSource::setGeoJSON(*converted); - - //Repaint - updateStyle(false); } void GeoJSONSource::setURL(jni::JNIEnv& env, jni::String url) { //Update the core source source.as()->GeoJSONSource::setURL(jni::Make(env, url)); - - //Repaint - updateStyle(false); } jni::Class GeoJSONSource::javaClass; diff --git a/platform/android/src/style/sources/source.cpp b/platform/android/src/style/sources/source.cpp index 4f306e7c54..f3daa777d1 100644 --- a/platform/android/src/style/sources/source.cpp +++ b/platform/android/src/style/sources/source.cpp @@ -35,19 +35,6 @@ namespace android { return jni::Make(env, source.getID()); } - void Source::updateStyle(jni::jboolean updateClasses) { - //Update the style only if attached - if (ownedSource == nullptr) { - Update flags = mbgl::Update::RecalculateStyle; - if(updateClasses) { - flags = flags | mbgl::Update::Classes; - } - map->update(flags); - } else { - mbgl::Log::Debug(mbgl::Event::JNI, "Not updating as source is not attached to map (yet)"); - } - } - std::unique_ptr Source::releaseCoreSource() { assert(ownedSource != nullptr); return std::move(ownedSource); diff --git a/platform/android/src/style/sources/source.hpp b/platform/android/src/style/sources/source.hpp index 7fdc43a833..5794cd4e62 100644 --- a/platform/android/src/style/sources/source.hpp +++ b/platform/android/src/style/sources/source.hpp @@ -40,7 +40,6 @@ public: std::unique_ptr releaseCoreSource(); protected: - void updateStyle(jni::jboolean); std::unique_ptr ownedSource; mbgl::style::Source& source; -- cgit v1.2.1