diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-11-13 16:06:26 -0800 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-11-22 13:56:38 -0800 |
commit | f06ebcc96791838acb485fc37877725a443ca8f5 (patch) | |
tree | 54b32821974703a3fae30ee86668bba4115f06e9 /platform/android/src/style/sources/custom_geometry_source.hpp | |
parent | 3067b77c650f5dea0c00a7a92a9fc927e028c742 (diff) | |
download | qtlocation-mapboxgl-f06ebcc96791838acb485fc37877725a443ca8f5.tar.gz |
[android] Reuse Java Source objects by holding on to a strong reference in the C++ peer.
Diffstat (limited to 'platform/android/src/style/sources/custom_geometry_source.hpp')
-rw-r--r-- | platform/android/src/style/sources/custom_geometry_source.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/android/src/style/sources/custom_geometry_source.hpp b/platform/android/src/style/sources/custom_geometry_source.hpp index 50ced9298a..00d8dc918f 100644 --- a/platform/android/src/style/sources/custom_geometry_source.hpp +++ b/platform/android/src/style/sources/custom_geometry_source.hpp @@ -27,6 +27,8 @@ public: jni::String, jni::Object<>); + CustomGeometrySource(jni::JNIEnv&, mbgl::style::Source&, AndroidRendererFrontend&); + ~CustomGeometrySource(); void fetchTile(const mbgl::CanonicalTileID& tileID); @@ -39,7 +41,8 @@ public: jni::Array<jni::Object<geojson::Feature>> querySourceFeatures(jni::JNIEnv&, jni::Array<jni::Object<>> ); - jni::jobject* createJavaPeer(jni::JNIEnv&); +private: + jni::Object<Source> createJavaPeer(jni::JNIEnv&); jni::UniqueObject<CustomGeometrySource> javaPeer; }; // class CustomGeometrySource |