diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-09-14 21:23:07 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-09-22 23:33:56 +0300 |
commit | 5d12503302dff168137d6f3b1444e4dc32ad44dd (patch) | |
tree | 98128bdddb287c30b2c1445eb88d44e9a97d57ab /platform/android/src/native_map_view.hpp | |
parent | 15a47d116a0fc15d249b37574fcd932ce88909df (diff) | |
download | qtlocation-mapboxgl-5d12503302dff168137d6f3b1444e4dc32ad44dd.tar.gz |
[android] self-contained map renderer
- Isolates the GL thread in a MapRenderer class with a native peer
Diffstat (limited to 'platform/android/src/native_map_view.hpp')
-rwxr-xr-x | platform/android/src/native_map_view.hpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/platform/android/src/native_map_view.hpp b/platform/android/src/native_map_view.hpp index 7376f82c24..d88647914e 100755 --- a/platform/android/src/native_map_view.hpp +++ b/platform/android/src/native_map_view.hpp @@ -1,6 +1,5 @@ #pragma once -#include <mbgl/renderer/renderer_backend.hpp> #include <mbgl/map/change.hpp> #include <mbgl/map/camera.hpp> #include <mbgl/map/map.hpp> @@ -10,7 +9,6 @@ #include <mbgl/storage/default_file_source.hpp> #include <mbgl/storage/network_status.hpp> -#include "file_source.hpp" #include "annotation/marker.hpp" #include "annotation/polygon.hpp" #include "annotation/polyline.hpp" @@ -37,6 +35,8 @@ namespace mbgl { namespace android { class AndroidRendererFrontend; +class FileSource; +class MapRenderer; class NativeMapView : public MapObserver { public: @@ -50,8 +50,8 @@ public: NativeMapView(jni::JNIEnv&, jni::Object<NativeMapView>, jni::Object<FileSource>, - jni::jfloat pixelRatio, - jni::String programCacheDir); + jni::Object<MapRenderer>, + jni::jfloat pixelRatio); virtual ~NativeMapView(); @@ -72,28 +72,10 @@ public: void onDidFinishLoadingStyle() override; void onSourceChanged(mbgl::style::Source&) override; - // Signal the view system, we want to redraw - void requestRender(); - - // Request processing on the GL Thread - void requestProcessing(); - // JNI // - // Called on OpenGL Thread - void onSurfaceCreated(jni::JNIEnv&); - - // Called on OpenGL Thread - void process(jni::JNIEnv&); - - // Called on OpenGL Thread - void render(jni::JNIEnv&); - void resizeView(jni::JNIEnv&, int, int); - // Called on OpenGL Thread - void resizeFramebuffer(jni::JNIEnv&, int, int); - jni::String getStyleUrl(jni::JNIEnv&); void setStyleUrl(jni::JNIEnv&, jni::String); |